Maybe we need a "pragma wal_trim" ?? This would automatically trim it after a checkpoint? Or make it an explicit action?
Waiting for another write before truncating it seems too late and not a logical thing to expect. Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Richard Hipp [d...@sqlite.org] Sent: Wednesday, November 30, 2011 12:10 PM To: Teg; General Discussion of SQLite Database Subject: EXT :Re: [sqlite] WAL file size On Wed, Nov 30, 2011 at 1:04 PM, Teg <t...@djii.com> wrote: > Hello Richard, > > When does the WAL get trimmed down? If my transaction completes, does > the WAL file get deleted? I've seen the WAL grow to 4 times my actual > DB size so, I don't really want 160 Gigs of WAL hanging out when the > process that generated it is only run once a month. > SQLite starts writing the WAL file from the beginning again on the first write transaction that follows a checkpoint that ran to completion and where there are no readers using the WAL file. A checkpoint will normally run to completion if there are no readers still using prior transactions. If there are readers on prior transactions, then the checkpoint cannot run to completion since that would delete content out from under the readers. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users