Re: Patch for fail-back without fresh backup - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch for fail-back without fresh backup
Date
Msg-id 9810.1371220891@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch for fail-back without fresh backup  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> On Fri, Jun 14, 2013 at 2:21 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So it's not that we actually need to log the individual hint bit
>> changes, it's that we need to WAL-log a full page image on the first
>> update after a checkpoint, so as to recover from torn-page cases.
>> Which one are we doing?

> Wal logging a full page image after a checkpoint wouldn't actually be
> enough since subsequent hint bits will dirty the page and not wal log
> anything creating a new torn page risk. FPI are only useful if all the
> subsequent updates are wal logged.

No, there's no new torn page risk, because any crash recovery would
replay starting from the checkpoint.  You might lose the
subsequently-set hint bits, but that's okay.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Patch for fail-back without fresh backup
Next
From: Tom Lane
Date:
Subject: Re: MD5 aggregate