gunnar wrote: > What do you exactly mean with "But in any case, as others have already > said, it is not possible for a write transaction to lock out a read > transaction _in the middle_."? I do see that records are being inserted > while I made those stack traces.
The inserted records are appended to the write-ahead-log. Any read-only transaction started previously ignores them, and continues to read the old data. Once a transaction has started, it is guaranteed to be able to read everything in the database. > I have a fifteen minute window / 24hours, is it enough for VACUUM? Try it with a copy. (Anyway, VACUUM uses a proper transaction, so the worst that can happen is that the other processes run into their timeouts.) Another possibility for the slowdown might be a huge WAL file. Try "PRAGMA wal_checkpoint(TRUNCATE)", but this might be as slow as a VACUUM. Regards, Clemens