Re: [WIP] Double-write with Fast Checksums - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: [WIP] Double-write with Fast Checksums
Date
Msg-id CAC_2qU8UqcGQXPyDYfT3twHSHEs6Vusr_V_W6E+uBt90HP3dsg@mail.gmail.com
Whole thread Raw
In response to Re: [WIP] Double-write with Fast Checksums  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jan 11, 2012 at 7:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> The question is how you prevent torn pages when a slave server crashes
> during replay.  Right now, the presence of FPIs in the WAL stream,
> together with the requirement that replay restart from a checkpoint,
> is sufficient to guarantee that any torn pages will be fixed up.  If
> you remove FPIs from WAL and don't transmit some substitute information,
> ISTM you've lost protection against slave server crashes.

This double-write stragegy is all an attempt to make "writes" durable.You remove the FPW from the WAL stream only
becauseyou're "writes" 
are make durable using some other stragegy, like the double-write.
Any standby will need to be using some stragegy to make sure it's
writes are durable, namely, the same double-write.

So on a standby crash, it will replay whatever FPWs it has in the
double-write buffer it has accumulated to make sure it's writes were
consistent.  Exactly as the master would do.

a.

--
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.


pgsql-hackers by date:

Previous
From: Misa Simic
Date:
Subject: Re: JSON for PG 9.2
Next
From: Robert Haas
Date:
Subject: measuring spinning