Re: Page Checksums + Double Writes - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Page Checksums + Double Writes
Date
Msg-id 4EF303790200002500044005@gw.wicourts.gov
Whole thread Raw
In response to Re: Page Checksums + Double Writes  (Jignesh Shah <jkshah@gmail.com>)
Responses Re: Page Checksums + Double Writes
List pgsql-hackers
Jignesh Shah <jkshah@gmail.com> wrote:
> When we use Doublewrite with checksums, we can safely disable
> full_page_write causing a HUGE reduction to the WAL traffic
> without loss of reliatbility due to a write fault since there are
> two writes always. (Implementation detail discussable).
The "always" there surprised me.  It seemed to me that we only need
to do the double-write where we currently do full page writes or
unlogged writes.  In thinking about your message, it finally struck
me that this might require a WAL record to be written with the
checksum (or CRC; whatever we use).  Still, writing a WAL record
with a CRC prior to the page write would be less data than the full
page.  Doing double-writes instead for situations without the torn
page risk seems likely to be a net performance loss, although I have
no benchmarks to back that up (not having a double-write
implementation to test).  And if we can get correct behavior without
doing either (the checksum WAL record or the double-write), that's
got to be a clear win.
-Kevin


pgsql-hackers by date:

Previous
From: Benedikt Grundmann
Date:
Subject: Re: Typed hstore proposal
Next
From: Robert Haas
Date:
Subject: Re: CLOG contention