Richard Hipp <[email protected]> writes:
> On Tue, May 17, 2011 at 5:11 PM, Nikolaus Rath 
> <[email protected]> wrote:
>> Please consider the attached testcase. The WAL file should grow to at
>> most 1 MB. This limit is exceeded, because the script adds data while a
>> second cursor has an active SELECT query. However, when the SELECT query
>> finishes, the WAL file is not auto-checkpointed either.
>>
>> An access pattern similar to the one in the testcase thus results in
>> unbounded growth of the WAL file, even though auto-checkpointing is
>> enabled, and there are time slots where it could be performed (no
>> transaction active).
>>
>> $ python bug_or_not.py test.sqlite
>> Max WAL file should be 1 MB
>> Starting query with cursor 2..
>> Inserting 5 MB of data with cursor 1
>> Size of WAL file is now: 16467.0 kB
>> Finishing cursor 2 query..
>> Size of WAL file is now: 16467.0 kB
>> Starting query with cursor 2..
>> Inserting 5 MB of data with cursor 1
>> Size of WAL file is now: 32954.0 kB
>> Finishing cursor 2 query..
>> Size of WAL file is now: 32954.0 kB
>>
>> Bug or not?
>>
>
> Not.  It is working as it was designed and documented to work.  Perhaps you
> mean that you want to start a discussion about the design, perhaps leading
> to a change in design.
>
> I'm rather pedantic about the use of the word "bug".  To me, a "bug" means
> it gets the wrong answer.  And for the purpose of that definition, crashing
> is considered the wrong answer.  Failing to do a checkpoint when you think
> it ought to, even though it is checkpointing as advertised, is not a "bug".
> You can argue that there is a need to enhance auto-checkpoint to make it
> more programmer-friendly.  But that is a feature request, not a bug.

That's why I posed it as a question, not a statement :-). My apologies
if it still came across the wrong way.


So considering this as feature request: do you have any thoughts on
making SQLite consider auto-checkpointing when a read transaction
finishes?


Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to