On Wed, Apr 28, 2010 at 07:00:39PM +0100, Simon Slavin scratched on the wall: > > 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 ?
No. That might keep the file structure consistent, but the data can (keys, constraints, etc.) still be inconsistent. Plus, it would still leak uncommitted changes to other connections, which is a Very Bad Idea. Leaking changes violates the "I" (Isolated) in ACID. http://en.wikipedia.org/wiki/ACID -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

