Re: Checkpoint cost, looks like it is WAL/CRC - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Checkpoint cost, looks like it is WAL/CRC
Date
Msg-id 200506300929.40793.josh@agliodbs.com
Whole thread Raw
In response to Re: Checkpoint cost, looks like it is WAL/CRC  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Checkpoint cost, looks like it is WAL/CRC
List pgsql-hackers
Tom,

> Database pages.  The current theory is that we can completely
> reconstruct from WAL data every page that's been modified since the
> last checkpoint.  So the first write of any page after a checkpoint
> dumps a full image of the page into WAL; subsequent writes only write
> differences.

What I'm confused about is that this shouldn't be anything new for 8.1.  Yet 
8.1 has *worse* performance on the STP machines than 8.0 does, and it's 
pretty much entirely due to this check.

> This is nice and secure ... at least when you are using hardware that
> guarantees write ordering ... otherwise it's probably mostly useless
> overhead.  Still, I'd not like to abandon the contract that if the disk
> does what it is supposed to do then we will do what we are supposed to.

Given the huge performance difference (30%), I think we have to give an option 
to turn it off.  So DBAs whose machines are in danger of being shut off a lot 
can have it on an the more performance-sensitive can turn it off.

One thing I am confused about, though: if the whole pages are in the database, 
why do we need a full copy in WAL instead of just the diffs?

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: WAL oddities (8.0.3)
Next
From: David Fetter
Date:
Subject: Re: Backend working directories and absolute file paths