On Wed, 2007-02-28 at 14:10 -0500, Jonah H. Harris wrote:
> On 2/28/07, Bruce Momjian <[EMAIL PROTECTED]> wrote:
> > > But if the system was shut down uncleanly as the result of a Postgres 
> > > crash or
> > > fast shutdown of Postgres then that isn't an issue. And many users may 
> > > prefer
> > > to bring the system up as soon as possible as long as they know any 
> > > corrupt
> > > pages will be spotted and throw errors as soon as it's seen.
> >
> > I don't think we should start up a system and only detect the errors
> > later.
> 
> Which is, of course, how everyone else does it.  On block access, the
> checksum is verified (if you've turned checksum checking on).  I
> *really* doubt you want to pull in every page in the database at
> startup time to verify the checksum or sequence.  Even pages from the
> last checkpoint would be a killer.
> 

Under normal operations, shutting down the database does a checkpoint,
right? So unless you're in recovery mode, there's no additional cost.
And I can't think of any reason you'd need to see any pages before the
last checkpoint (unless you don't trust your disk and just want to check
all the pages, which is more than we can do now anyway).

So the additional cost of doing CRCs every time would be the CPU cost,
and also the cost during recovery of reading in all the data pages since
the last checkpoint. That's 5 minutes of data, in the default
configuration.

Regards,
        Jeff Davis


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to