From: | ncm(at)zembu(dot)com (Nathan Myers) |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: CRCs |
Date: | 2001-01-12 22:54:45 |
Message-ID: | 20010112145445.W571@store.zembu.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 12, 2001 at 02:16:07PM -0800, Mikheev, Vadim wrote:
> > > You know - this is *core* assumption. If drive lies about this then
> > > *nothing* will help you. Do you remember core rule of WAL?
> > > "Changes must be logged *before* changed data pages written".
> > > If this rule will be broken then data files will be inconsistent
> > > after crash recovery and you will not notice this, w/wo CRC in
> > > data blocks.
> >
> > You can include the data blocks' CRCs in the log entries.
>
> How could it help?
It wouldn't help you recover, but you would be able to report that
you cannot recover.
To be more specific, if the blocks referenced in the log are partially
written, their CRCs will (probably) be wrong. If they are not
physically written at all, their CRCs will be correct but will
not match what is in the log. In either case the user will know
immediately that the database has been corrupted, and must fall
back on a failover image or backup.
It would be no bad thing to include the CRC of the block referenced
wherever in the file format that a block reference lives.
Nathan Myers
ncm(at)zembu(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-01-12 23:06:21 | Re: CRCs |
Previous Message | Tom Lane | 2001-01-12 22:38:54 | Re: CVS updates on committers list... |