logoalt Hacker News

ncrucesyesterday at 5:52 PM2 repliesview on HN

If you're not making any changes to the database, does the SELECT "kill" you?

And if you are making changes, don't you have to poll regardless after the file watcher wakes you?

For WAL mode, SQLite can probably satisfy this query just by inspecting some shared memory. But it is busy waiting, sure.


Replies

billywhizzyesterday at 8:42 PM

SQLite has a wal hook which calls you back every time a transaction is committed to the WAL. https://www.sqlite.org/c3ref/wal_hook.html

show 1 reply
redsocksfan45yesterday at 7:37 PM

[dead]