Quantcast

WAL and consistency

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

WAL and consistency

Rossel, Jonathan
Hi,

Let me first congratulate you for the awesome product that SQLite is! I just need a clarification with respect to a comment given in the docs (http://sqlite.org/pragma.html#pragma_synchronous):

"With synchronous=FULL in WAL mode, an additional sync operation of the WAL file happens after each transaction commit. The extra WAL sync following each transaction help ensure that transactions are durable across a power loss, but they do not aid in preserving consistency."

I don't understand the last bit about consistency preservation and couldn't find more clues on that subject in the docs. Why would consistency be lost ? Is SQLite in WAL mode not ACID when synchronous=FULL ? What kind of damage can we expect in case of power loss (assuming the disk performs the syncs as supposed) ?

Thanks in advance !

Jonathan



*******************************************************************************
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential. If you are not the intended
recipient please do not read, save, forward, disclose or copy the contents
of this e-mail. If this e-mail has been sent to you in error, please delete this
e-mail and any copies or links to this e-mail completely and immediately
from your system. We also like to inform you that communication via e-mail
over the Internet is insecure because third parties may have the possibility
to access and manipulate e-mails.

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
The Swatch Group Ltd.
*******************************************************************************
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WAL and consistency

Richard Hipp-3
On 2/2/17, Rossel, Jonathan <[hidden email]> wrote:

> Hi,
>
> Let me first congratulate you for the awesome product that SQLite is! I just
> need a clarification with respect to a comment given in the docs
> (http://sqlite.org/pragma.html#pragma_synchronous):
>
> "With synchronous=FULL in WAL mode, an additional sync operation of the WAL
> file happens after each transaction commit. The extra WAL sync following
> each transaction help ensure that transactions are durable across a power
> loss, but they do not aid in preserving consistency."

Transactions are fully consistent with our without the extra syncs.
Since transactions are already fully consistent without the extra
syncs, adding the extra syncs adds no additional consistency.

>
> I don't understand the last bit about consistency preservation and couldn't
> find more clues on that subject in the docs. Why would consistency be lost ?
> Is SQLite in WAL mode not ACID when synchronous=FULL ? What kind of damage
> can we expect in case of power loss (assuming the disk performs the syncs as
> supposed) ?
>
> Thanks in advance !
>
> Jonathan
>
>
>
> *******************************************************************************
> This e-mail message is intended only for the addressee(s) and contains
> information which may be confidential. If you are not the intended
> recipient please do not read, save, forward, disclose or copy the contents
> of this e-mail. If this e-mail has been sent to you in error, please delete
> this
> e-mail and any copies or links to this e-mail completely and immediately
> from your system. We also like to inform you that communication via e-mail
> over the Internet is insecure because third parties may have the possibility
> to access and manipulate e-mails.
>
> Any views expressed in this message are those of the individual sender,
> except where the sender specifically states them to be the views of
> The Swatch Group Ltd.
> *******************************************************************************
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WAL and consistency

Rossel, Jonathan
Dear Mr Hipp,

That's quite a privilege to get this answer from SQLite's creator himself ! Thanks for the clarification, I guess I didn't switch my brain to formal logic when I read this part of the docs...

Have a nice day,

Jonathan

-----Original Message-----
From: sqlite-users [mailto:[hidden email]] On Behalf Of Richard Hipp
Sent: vendredi 3 février 2017 05:05
To: SQLite mailing list
Subject: Re: [sqlite] WAL and consistency

On 2/2/17, Rossel, Jonathan <[hidden email]> wrote:

> Hi,
>
> Let me first congratulate you for the awesome product that SQLite is!
> I just need a clarification with respect to a comment given in the
> docs
> (http://sqlite.org/pragma.html#pragma_synchronous):
>
> "With synchronous=FULL in WAL mode, an additional sync operation of
> the WAL file happens after each transaction commit. The extra WAL sync
> following each transaction help ensure that transactions are durable
> across a power loss, but they do not aid in preserving consistency."

Transactions are fully consistent with our without the extra syncs.
Since transactions are already fully consistent without the extra syncs, adding the extra syncs adds no additional consistency.

>
> I don't understand the last bit about consistency preservation and
> couldn't find more clues on that subject in the docs. Why would consistency be lost ?
> Is SQLite in WAL mode not ACID when synchronous=FULL ? What kind of
> damage can we expect in case of power loss (assuming the disk performs
> the syncs as
> supposed) ?
>
> Thanks in advance !
>
> Jonathan
>
>
>
> **********************************************************************
> ********* This e-mail message is intended only for the addressee(s)
> and contains information which may be confidential. If you are not the
> intended recipient please do not read, save, forward, disclose or copy
> the contents of this e-mail. If this e-mail has been sent to you in
> error, please delete this e-mail and any copies or links to this
> e-mail completely and immediately from your system. We also like to
> inform you that communication via e-mail over the Internet is insecure
> because third parties may have the possibility to access and
> manipulate e-mails.
>
> Any views expressed in this message are those of the individual
> sender, except where the sender specifically states them to be the
> views of The Swatch Group Ltd.
> **********************************************************************
> ********* _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
*******************************************************************************
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential. If you are not the intended
recipient please do not read, save, forward, disclose or copy the contents
of this e-mail. If this e-mail has been sent to you in error, please delete this
e-mail and any copies or links to this e-mail completely and immediately
from your system. We also like to inform you that communication via e-mail
over the Internet is insecure because third parties may have the possibility
to access and manipulate e-mails.

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
The Swatch Group Ltd.
*******************************************************************************
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...