On Mon, 10 Feb 2020 at 12:53, Simon Slavin <slav...@bigfraud.org> wrote:
> On 10 Feb 2020, at 4:26am, Rowan Worth <row...@dug.com> wrote: > > > See also PRAGMA data_version when it comes to polling the DB, the return > value of which changes when another process modifies the DB. IIRC the > implementation of this depends on a value in the DB header page, so it may > be sufficient to only monitor the main DB file for changes. > > Theoretically, one monitors the database file for its "last change" > timestamp (you might know this as the "touch timestamp"). If, as previously suggested, you're using inotify or FSEvents (or ReadDirectoryChangesExW) you can avoid polling this metadata, although I realised that in WAL mode the if the updated DB header page might only be stored in the write ahead log for some period of time, in which case you definitely need to watch both. -Rowan _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users