Re: [sqlite] How good is pragma integrity_check

2014-03-24 Thread Simon Slavin
On 24 Mar 2014, at 1:34pm, Tim Streater wrote: > My app does some periodic housekeeping, which includes occasional vacuuming > of some files. From the logs, I deduce that the OS completely lost this file > [1], which got recreated at the next housekeeping and then

Re: [sqlite] How good is pragma integrity_check

2014-03-24 Thread Tim Streater
On 24 Mar 2014 at 08:36, Dominique Devienne wrote: > On Mon, Mar 24, 2014 at 6:23 AM, Roger Binns wrote: >> So you don't have to use it. Those of us who would rather proactively >> know about data corruption (to the best of SQLite's ability to

Re: [sqlite] How good is pragma integrity_check

2014-03-24 Thread Simon Slavin
On 24 Mar 2014, at 12:10pm, Markus Schaber wrote: > Not agreed. Another way to solve this problem is to include the file offset > or sector number into the checksum - this will also detect "movements" of > data to the wrong place, without the need for an atomically

Re: [sqlite] How good is pragma integrity_check

2014-03-24 Thread Markus Schaber
Hi, Simon, Von: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On 24 Mar 2014, at 5:23am, Roger Binns wrote: > > On 21/03/14 15:24, Simon Slavin wrote: > >> Checksums stored with the page index lists, > > > > SQLite already has the ability to

Re: [sqlite] How good is pragma integrity_check

2014-03-24 Thread Simon Slavin
On 24 Mar 2014, at 5:23am, Roger Binns wrote: > On 21/03/14 15:24, Simon Slavin wrote: >> Checksums stored with the page index lists, > > SQLite already has the ability to carve out data on each page for other > uses. For example the encryption extension uses this.

Re: [sqlite] How good is pragma integrity_check

2014-03-24 Thread Dominique Devienne
On Mon, Mar 24, 2014 at 6:23 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > On 21/03/14 15:24, Simon Slavin wrote: >> Checksums stored with the page index lists, > > SQLite already has the ability to carve out data on each page for other > uses. For example

Re: [sqlite] How good is pragma integrity_check

2014-03-23 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/03/14 15:24, Simon Slavin wrote: > Checksums stored with the page index lists, SQLite already has the ability to carve out data on each page for other uses. For example the encryption extension uses this. > Nevertheless, the basic SQLite

Re: [sqlite] How good is pragma integrity_check

2014-03-21 Thread Simon Slavin
On 21 Mar 2014, at 7:57pm, Roger Binns wrote: > It also doesn't check the data, just the structure of the data. There was > a feature request ticket for several years for checksums to at least catch > unexpected changes to the data itself: > >

Re: [sqlite] How good is pragma integrity_check

2014-03-21 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/03/14 18:06, Simon Slavin wrote: > All useful as far as SQLite itself goes, and better than nothing. > Unfortunately, failing hard disks do weird things in weird orders. And > the interaction between the physical hard disk and the on-board

Re: [sqlite] How good is pragma integrity_check

2014-03-21 Thread Tim Streater
On 21 Mar 2014 at 01:06, Simon Slavin wrote: > On 20 Mar 2014, at 11:33pm, Richard Hipp wrote: > >> On Thu, Mar 20, 2014 at 7:18 PM, Tim Streater wrote: >> >>> I had a case where attempts to access a table in a user's db gave "no

Re: [sqlite] How good is pragma integrity_check

2014-03-20 Thread Simon Slavin
On 20 Mar 2014, at 11:33pm, Richard Hipp wrote: > On Thu, Mar 20, 2014 at 7:18 PM, Tim Streater wrote: > >> I had a case where attempts to access a table in a user's db gave "no such >> table", where 60 mins previously (according to the log) querying

Re: [sqlite] How good is pragma integrity_check

2014-03-20 Thread Richard Hipp
On Thu, Mar 20, 2014 at 7:18 PM, Tim Streater wrote: > I had a case where attempts to access a table in a user's db gave "no such > table", where 60 mins previously (according to the log) querying that table > gave no problems. About a day and a half later the user's

[sqlite] How good is pragma integrity_check

2014-03-20 Thread Tim Streater
I had a case where attempts to access a table in a user's db gave "no such table", where 60 mins previously (according to the log) querying that table gave no problems. About a day and a half later the user's machine had what he described as a "bad crash", so I'm suspecting he has a failing