On Mon, Sep 10, 2012 at 09:50:58PM -0500, Jay A. Kreibich scratched on the wall:
> On Tue, Sep 11, 2012 at 01:58:23AM +0100, Simon Slavin scratched on the wall:
> > On 11 Sep 2012, at 12:55am, Keith Chew <keith.c...@gmail.com> wrote:
> 
> > > and I know FULL (1)  will provide that. The question is why
> > > NORMAL (1) cannot provide the same.
> > 
> > Because NORMAL doesn't flush changes to disk after every single
> > transaction.  It queues a few of them up and flushes them all in one go. 
> 
>   That's not quite true.

  Oh wait, you're talking about WAL mode, aren't you?  Sorry,
  apparently I wasn't following the whole thread as closely as I should
  have been.

  In that case, yes... the WAL file will "save up" several transactions
  and only fully sync them when the checkpoint happens to clear the WAL
  file.

> > NORMAL) Faster but if you lose power more transactions are lost, but
> >         the database is still not corrupt.
> >   FULL) Every COMMIT will take more time, but a power-failure can
> >         lose a maximum of one transaction.
> 
>   That's also incorrect.

  In WAL mode that's only half incorrect.  Your description of NORMAL
  seems correct, but FULL should be fully durable.  The WAL file may
  need to be checkpointed on startup, but the if the commit happens in
  WAL/FULL, you should have full durability.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to