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

From Heikki Linnakangas
Subject Re: Patch for fail-back without fresh backup
Date
Msg-id 51BB218E.5050402@vmware.com
Whole thread Raw
In response to Re: Patch for fail-back without fresh backup  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Patch for fail-back without fresh backup  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On 14.06.2013 16:15, Andres Freund wrote:
> On 2013-06-14 09:08:15 -0400, Tom Lane wrote:
>> I just had my nose in the part of the checksum patch that tediously
>> copies entire pages out of shared buffers to avoid possible instability
>> of the hint bits while we checksum and write the page.
>
> I am really rather uncomfortable with that piece of code, and I hacked
> it up after Jeff Janes had reported a bug there (The one aborting WAL
> replay to early...). So I am very happy that you are looking at it.

Hmm. In XLogSaveBufferForHint():

>  * Note that this only works for buffers that fit the standard page model,
>  * i.e. those for which buffer_std == true

The free-space-map uses non-standard pages, and MarkBufferDirtyHint(). 
Isn't that completely broken for the FSM? If I'm reading it correctly, 
what will happen is that replay will completely zero out all FSM pages 
that have been touched. All the FSM data is between pd_lower and 
pd_upper, which on standard pages is the "hole".

- Heikki



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: MD5 aggregate
Next
From: Andrew Dunstan
Date:
Subject: Re: MD5 aggregate