Re: clog_redo causing very long recovery time - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: clog_redo causing very long recovery time
Date
Msg-id BANLkTikY7acSmBaJBiXWLxyTiJP2v9BX2g@mail.gmail.com
Whole thread Raw
In response to Re: clog_redo causing very long recovery time  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: clog_redo causing very long recovery time  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, May 6, 2011 at 4:22 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

>> The attached fix-clogredo diff is my proposal for a fix for this.
>
> That seems pretty grotty :-(
>
> I think a more elegant fix might be to just swap the order of the
> ExtendCLOG and ExtendSUBTRANS calls in GetNewTransactionId.  The
> reason that would help is that pg_subtrans isn't WAL-logged, so if
> we succeed doing ExtendSUBTRANS and then fail in ExtendCLOG, we
> won't have written any XLOG entry, and thus repeated failures will not
> result in repeated XLOG entries.  I seem to recall having considered
> exactly that point when the clog WAL support was first done, but the
> scenario evidently wasn't considered when subtransactions were stuck
> in :-(.

I agree with Tom about the need for a fix that prevents generation of
repeated WAL records.

OTOH, I also like Joe's fix in the recovery code to avoid responding
to repeated records.

Can we have both please?

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Proposed patch: Smooth replication during VACUUM FULL
Next
From: Peter Geoghegan
Date:
Subject: Re: Process wakeups when idle and power consumption