From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: PITR potentially broken in 9.2
Date: Wed, 5 Dec 2012 17:24:21 +0100
Message-ID: <20121205162421.GB20456@awork2.anarazel.de> (raw)
In-Reply-To: <6461.1354723883@sss.pgh.pa.us>
References: <CAMkU=1wC230iJ9OjJnO5jwP32iR-HtMNqDbXHLaPhudGCZ2x1Q@mail.gmail.com>
<7787.1354482169@sss.pgh.pa.us>
<CAMkU=1wo9+TvTy-w9UkSEgwc49kXuu=V=8cEdyaH8CBFyUVeww@mail.gmail.com>
<20516.1354666844@sss.pgh.pa.us>
<CAMkU=1zo2j7bVfPDSgaGRffdkoZW2hNCRztDd2hLQSy+eKcpVg@mail.gmail.com>
<20121205021537.GB9811@awork2.anarazel.de>
<22653.1354674454@sss.pgh.pa.us>
<CA+U5nMKOsUWKP++QH=0nMff27t-KbLTEz560CzXz_upn-k1LDQ@mail.gmail.com>
<20121205143314.GA6420@awork2.anarazel.de>
<6461.1354723883@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2012-12-05 11:11:23 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2012-12-05 13:34:05 +0000, Simon Riggs wrote:
> >> @@ -5883,6 +5889,17 @@ StartupXLOG(void)
> >> } while (record != NULL && recoveryContinue);
> >>
> >> /*
> >> + * We've reached stop point, but not yet applied last
> >> + * record. Pause AFTER final apply, if requested, but
> >> + * only if users can connect to send a resume message
> >> + */
> >> + if (reachedStopPoint && recoveryPauseAtTarget && recoveryApply)
> >> + {
> >> + SetRecoveryPause(true);
> >> + recoveryPausesHere();
> >> + }
> >> +
> >> + /*
>
> > I find the above comment a bit misleading because by now we have in fact
> > applied the last record...
>
> I'd go further than that: a pause after we've exited the loop is
> completely stupid. The only reason for pausing is to let the user
> choose whether to continue applying WAL or not. If you've already
> made that choice, you might as well let the system come up fully.
Yes, that puzzles me as well.
Basically the whole logical arround recoveryApply seems to be broken
currently. Because if recoveryApply=false we currently don't pause at
all because we jump out of the apply loop with the break. I guess thats
what Simon tried to address with the patch. But the new behaviour seems
to be strane as well a
> But I can't make any sense of the rest of this patch, because it seems
> to be randomly rearranging a whole lot of stuff that's unrelated to
> pausing. If you think all these changes are in fact necessary, could
> you break it down a little more?
I think part !recoveryApply changes makes sense, but it needs more...
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@2ndquadrant.com, tgl@sss.pgh.pa.us, simon@2ndquadrant.com, jeff.janes@gmail.com, hlinnakangas@vmware.com, noah@leadboat.com
Subject: Re: PITR potentially broken in 9.2
In-Reply-To: <20121205162421.GB20456@awork2.anarazel.de>
References: <CAMkU=1wC230iJ9OjJnO5jwP32iR-HtMNqDbXHLaPhudGCZ2x1Q@mail.gmail.com> <7787.1354482169@sss.pgh.pa.us> <CAMkU=1wo9+TvTy-w9UkSEgwc49kXuu=V=8cEdyaH8CBFyUVeww@mail.gmail.com> <20516.1354666844@sss.pgh.pa.us> <CAMkU=1zo2j7bVfPDSgaGRffdkoZW2hNCRztDd2hLQSy+eKcpVg@mail.gmail.com> <20121205021537.GB9811@awork2.anarazel.de> <22653.1354674454@sss.pgh.pa.us> <CA+U5nMKOsUWKP++QH=0nMff27t-KbLTEz560CzXz_upn-k1LDQ@mail.gmail.com> <20121205143314.GA6420@awork2.anarazel.de> <6461.1354723883@sss.pgh.pa.us> <20121205162421.GB20456@awork2.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox