Re: CRCs
От | ncm@zembu.com (Nathan Myers) |
---|---|
Тема | Re: CRCs |
Дата | |
Msg-id | 20010112145445.W571@store.zembu.com обсуждение исходный текст |
Ответ на | RE: CRCs ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>) |
Ответы |
Re: CRCs
|
Список | 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@zembu.com
В списке pgsql-hackers по дате отправления: