Hello Richard,

That's what I was hoping to hear. Thanks,



Wednesday, November 30, 2011, 2:01:46 PM, you wrote:

RH> On Wed, Nov 30, 2011 at 1:39 PM, Teg <t...@djii.com> wrote:

>> Hello Richard,
>>
>> Appreciate the reply but, it doesn't address my question (unless I'm
>> missing something). I get that checkpointing doesn't reduce the size
>> of the WAL. Assuming a single writer and no readers, If I perform a
>> transaction that generates a WAL file. Does it eventually get deleted
>> when I finish my transaction? How about when I close the DB?


RH> The wal file persists until the last connection to the database closes,
RH> then the wal file is deleted.  Meanwhile, the wal file is recycled (meaning
RH> that SQLite starts reusing it again from the beginning) after each
RH> successful checkpoint.  Checkpoints are automatically run by transactions
RH> that cause the size of the wal file to exceed 1000 pages (though this can
RH> be tuned or disabled if desired).

RH> For most applications, WAL mode just works and you don't have to think
RH> about how.



>> I haven't
>> updated to the most current SQlite because I was unclear about how
>> persistent the WAL files actually were. Some of my DB's are 30 GB+. I
>> don't mind the WAL's growing as long as they go away when the process
>> is finished.
>>
>>
>>
>>
>>
>> Wednesday, November 30, 2011, 1:10:50 PM, you wrote:
>>
>> RH> 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.
>> >>
>>
>> RH> SQLite starts writing the WAL file from the beginning again on the
>> first
>> RH> write transaction that follows a checkpoint that ran to completion and
>> RH> where there are no readers using the WAL file.  A checkpoint will
>> normally
>> RH> run to completion if there are no readers still using prior
>> transactions.
>> RH> If there are readers on prior transactions, then the checkpoint cannot
>> run
>> RH> to completion since that would delete content out from under the
>> readers.
>>
>>
>>
>>
>>
>>
>>
>> --
>> Best regards,
>>  Teg                            mailto:t...@djii.com
>>
>>





-- 
Best regards,
 Teg                            mailto:t...@djii.com

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to