Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] Undetected corruption of table files

From: Decibel! <decibel(at)decibel(dot)org>
To: Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at>
Cc: Jan Wieck *EXTERN* <JanWieck(at)Yahoo(dot)com>,Tom Lane *EXTERN* <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Undetected corruption of table files
Date: 2007-08-31 15:49:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-hackers
On Fri, Aug 31, 2007 at 02:34:09PM +0200, Albe Laurenz wrote:
> I have thought some more about it, and tend to agree now:
> Checksums will only detect disk failure, and that's only
> one of the many integrity problems that can happen.
> And one that can be reduced to a reasonable degree with good
> storage systems.
> So the benefit of checksums is not enough to bother.

Uhm... how often do we get people asking about corruption on -admin
alone? 2-3x a month? ISTM it would be very valuable to those folks to
be able to tell them if the corruption occurred between writing a page
out and reading it back in.

Even if we don't care about folks running on suspect hardware, having a
CRC would make it far more reasonable to recommend full_page_writes=off.
I never turn that off and recommend to folks that they don't turn it off
because there's no way to know if it will or has corrupted data.

BTW, a method that would buy additional protection would be to compute
the CRC for a page every time you modify it in such a way that generates
a WAL record, and record that CRC with the WAL record. That would
protect from corruption that happened anytime after the page was
modified, instead of just when smgr went to write it out. How useful
that is I don't know...
Decibel!, aka Jim Nasby                        decibel(at)decibel(dot)org
EnterpriseDB      512.569.9461 (cell)

In response to


pgsql-hackers by date

Next:From: Dave PageDate: 2007-08-31 16:00:58
Subject: Re: Password requirement in windows installer
Previous:From: Decibel!Date: 2007-08-31 15:39:19
Subject: Re: Password requirement in windows installer

pgsql-general by date

Next:From: Erik JonesDate: 2007-08-31 15:53:03
Subject: Re: URGENT: Whole DB down ("no space left on device")
Previous:From: Tom LaneDate: 2007-08-31 15:07:20
Subject: Re: Out of shared memory (locks per process) using table-inheritance style partitioning

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group