2 ms·
From SQLite's autoconf/configure.ac: AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r]) In other words, it automatically uses fdatasync if
by jlokier 6y ago
From SQLite's autoconf/configure.ac:
AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
In other words, it automatically uses fdatasync if that's available on any target OS.
SQLite's os_unix.c actually confirms my suspicions about fdatasync:
/* fdatasync() on HFS+ doesn't yet flush the file size if it changed correctly
Given its portability, and the folklore around fdatasync not flushing the file size on other OSes at some time (and the current FreeBSD man page), I'm still surprised the code as written assumes the size issue only exists on OSX.