On 28 Apr 2010, at 6:53pm, Jay A. Kreibich wrote:

>  Once (some) pages are written to disk, you have uncommitted changes
>  in the database file.  Allowing readers could "leak" those
>  uncommitted changes to other database connections, which is not
>  allowed under the ACID transaction model.
> 
>  Further, because only some pages get written out, the database file
>  might very well be inconsistent and unusable.  You need the full
>  picture of file pages plus cached pages to have a consistent database
>  image.  At that point in time, the file alone cannot provide that.
> 
>  Everything is still safe, thanks to the journal file, but no readers
>  can touch the file until the transaction is either fully committed or
>  fully rolled back.

Could you add a mode that meant every time /some/ pages were written out, /all/ 
pages were written out, and the lock could be relaxed back down to RESERVED 
mode ?  Or would that create problems where a lot of transactions had to be 
committed all at once to keep the database consistent ?

Of course, this would slow down situations where one process was going to keep 
refilling the memory cache, but it would reduces times when one process hogs 
the EXCLUSIVE lock.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to