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

From Pavan Deolasee
Subject Re: Patch for fail-back without fresh backup
Date
Msg-id CABOikdMm8deUjzhNhnha+UfA++5OdZO4OC4nVQ6YQhJu2gzNXQ@mail.gmail.com
Whole thread Raw
In response to Re: Patch for fail-back without fresh backup  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Patch for fail-back without fresh backup  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Re: Patch for fail-back without fresh backup  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On Thu, Oct 24, 2013 at 4:22 PM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
.

To fix that, pg_rewind could always start the rewinding process from the last checkpoint before the point that the histories diverge, instead of the exact point of divergence.

Is that something required even if someone plans to use pg_rewind for a cluster with checksums enabled ? I mean since only first update after checkpoint is WAL logged, pg_rewind will break if another update happens after standby forks. Or would the recovery logic apply first WAL without looking at the page lsn ? (Sorry, may be I should read the code instead of asking you)

If we do what you are suggesting, it seems like a single line patch to me. In XLogSaveBufferForHint(), we probably need to look at this additional GUC to decide whether or not to backup the block.

That would make the rewinding more expensive as it needs to read through a lot more WAL, but I think it would still be OK.

Yeah, probably you are right. Though the amount of additional work could be significantly higher and some testing might be warranted. 

Thanks,

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Ident context leak during reloading of conf files when no ident information is present in the file
Next
From: Pavan Deolasee
Date:
Subject: Re: Patch for fail-back without fresh backup