Re: COMMIT NOWAIT Performance Option - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: COMMIT NOWAIT Performance Option
Date
Msg-id 1172692090.13722.59.camel@dogma.v10.wvs
Whole thread Raw
In response to Re: COMMIT NOWAIT Performance Option  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Responses Re: COMMIT NOWAIT Performance Option  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Re: COMMIT NOWAIT Performance Option  ("Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>)
List pgsql-hackers
On Wed, 2007-02-28 at 14:10 -0500, Jonah H. Harris wrote:
> On 2/28/07, Bruce Momjian <bruce@momjian.us> 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



pgsql-hackers by date:

Previous
From: "Jonah H. Harris"
Date:
Subject: Re: COMMIT NOWAIT Performance Option
Next
From: Bruce Momjian
Date:
Subject: Re: COMMIT NOWAIT Performance Option