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

From Tom Lane
Subject Re: Checkpoint cost, looks like it is WAL/CRC
Date
Msg-id 7198.1120743057@sss.pgh.pa.us
Whole thread Raw
In response to Re: Checkpoint cost, looks like it is WAL/CRC  ("Zeugswetter Andreas DAZ SD" <ZeugswetterA@spardat.at>)
Responses Re: Checkpoint cost, looks like it is WAL/CRC
Re: Checkpoint cost, looks like it is WAL/CRC
Re: Checkpoint cost, looks like it is WAL/CRC
List pgsql-hackers
"Zeugswetter Andreas DAZ SD" <ZeugswetterA@spardat.at> writes:
> Only workable solution would imho be to write the LSN to each 512
> byte block (not that I am propagating that idea). 

We're not doing anything like that, as it would create an impossible
space-management problem (or are you happy with limiting tuples to
500 bytes?).  What we *could* do is calculate a page-level CRC and
store it in the page header just before writing out.  Torn pages
would then manifest as a wrong CRC on read.  No correction ability,
but at least a reliable detection ability.

However, this will do nothing to solve the performance problem if
the core of that problem is the cost of computing page-sized CRCs :-(

We still don't know enough about the situation to know what a solution
might look like.  Is the slowdown Josh is seeing due to the extra CPU
cost of the CRCs, or the extra I/O cost, or excessive locking of the
WAL-related data structures while we do this stuff, or ???.  Need more
data.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas DAZ SD"
Date:
Subject: Re: Checkpoint cost, looks like it is WAL/CRC
Next
From: Tom Lane
Date:
Subject: Re: Checkpoint cost, looks like it is WAL/CRC