Dave Dyer <[EMAIL PROTECTED]> wrote:
> >
> >The main purpose of the journal is so that if the program
> >or OS crashes or there is a power failure, once the machine
> >reboots and some other process tries to read the database,
> >the other process can see the journal and roll it back.
> >Private anonymous mapped objects defeat that purpose, it
> >would seem.
> 
> I thought the purpose was to prevent corruption in the main
> database.  If you assume the power fails, or some other
> program disaster occurs, it doesn't really matter if the 
> last transaction was made persistant or not.  It's just
> like the power failed a few seconds sooner.
> 
> So as long as sqlite is still safe if a journal file is deleted
> after a restart, I don't think there's a problem.
> 

The point is that SQLite is NOT safe if the journal file is
deleted after a restart.  In fact, the whole point of the
journal file is to make SQLite safe following program or
OS crashes or power failures.

Sometimes users try to get clever and delete a journal
file after a power failure.  This leads to database
corruption.  See, for example,

   http://www.sqlite.org/cvstrac/tktview?tn=2224

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to