A Syncthing and SQLite Gotcha
ibobev
18 points
6 comments
August 24, 2026
Related Discussions
Found 5 related stories in 60.5ms across 4,281 title embeddings via pgvector HNSW
- Learning a few things about running SQLite surprisetalk · 206 pts · July 17, 2026 · 59% similar
- Three ways to smuggle SQLite into Nix domenkozar · 21 pts · August 21, 2026 · 57% similar
- Choose DuckDB rather than SQLite rubenvanwyk · 85 pts · July 29, 2026 · 53% similar
- After rewriting SQLite in Rust, Turso turns its sights on Postgres theanonymousone · 12 pts · July 30, 2026 · 52% similar
- Lobste.rs is now running on SQLite ahamez · 12 pts · July 14, 2026 · 49% similar
Discussion Highlights (3 comments)
euroderf
Shouldn't this return errors to the "other processes [that] had open file descriptors pointing to new" ?
zbentley
I think there is an important typo: > what happens if other processes had open file descriptors pointing to new Should end with “old”, not “new”.
zbentley
Yes, handle statefulness is very important. A cheap way to detect and handle this condition in your application code is to call fstat on the open file handle and check the number of references. If that number drops to zero, you have an orphan. Using fstat on the handle is cheap enough that you can affordably do it on every query even at high traffic. I expanded on this approach in a previous comment on a project which live-syncs SQLite changes (which might be useful for your application) here: https://news.ycombinator.com/item?id=47884461