xref: /netbsd-src/external/public-domain/sqlite/man/SQLITE_SYNC_NORMAL.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE_SYNC_NORMAL 3
3.Os
4.Sh NAME
5.Nm SQLITE_SYNC_NORMAL ,
6.Nm SQLITE_SYNC_FULL ,
7.Nm SQLITE_SYNC_DATAONLY
8.Nd synchronization type flags
9.Sh SYNOPSIS
10.In sqlite3.h
11.Fd #define SQLITE_SYNC_NORMAL
12.Fd #define SQLITE_SYNC_FULL
13.Fd #define SQLITE_SYNC_DATAONLY
14.Sh DESCRIPTION
15When SQLite invokes the xSync() method of an sqlite3_io_methods
16object it uses a combination of these integer values as the second
17argument.
18.Pp
19When the SQLITE_SYNC_DATAONLY flag is used, it means that the sync
20operation only needs to flush data to mass storage.
21Inode information need not be flushed.
22If the lower four bits of the flag equal SQLITE_SYNC_NORMAL, that means
23to use normal fsync() semantics.
24If the lower four bits equal SQLITE_SYNC_FULL, that means to use Mac
25OS X style fullsync instead of fsync().
26.Pp
27Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags with
28the PRAGMA synchronous=NORMAL and PRAGMA synchronous=FULL
29settings.
30The synchronous pragma determines when calls to the
31xSync VFS method occur and applies uniformly across all platforms.
32The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how energetic
33or rigorous or forceful the sync operations are and only make a difference
34on Mac OSX for the default SQLite code.
35(Third-party VFS implementations might also make the distinction between
36SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the operating systems
37natively supported by SQLite, only Mac OSX cares about the difference.)
38.Sh IMPLEMENTATION NOTES
39These declarations were extracted from the
40interface documentation at line 688.
41.Bd -literal
42#define SQLITE_SYNC_NORMAL        0x00002
43#define SQLITE_SYNC_FULL          0x00003
44#define SQLITE_SYNC_DATAONLY      0x00010
45.Ed
46.Sh SEE ALSO
47.Xr sqlite3_io_methods 3
48