From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Andres Freund <andres@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, 05 Dec 2012 16:15:38 -0500
Message-ID: <12846.1354742138@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+U5nMLfV4OT31df7Uc2BXLM0-NUqk-qdLsYQ5jPTa4Ejwv+sw@mail.gmail.com>
References: <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>
<7015.1354725616@sss.pgh.pa.us>
<CA+U5nM+AHnYOv5+xE0ogFM82gdPfmZ4osRutT-BT2DW3LrGPfA@mail.gmail.com>
<CA+U5nMKKY4NTJa+i5OJYs2Mh8i=B3249A3ji=L0-hr4c1G7qMw@mail.gmail.com>
<20121205173025.GD27424@awork2.anarazel.de>
<8223.1354728999@sss.pgh.pa.us>
<9918.1354733333@sss.pgh.pa.us>
<CA+U5nMLfV4OT31df7Uc2BXLM0-NUqk-qdLsYQ5jPTa4Ejwv+sw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 5 December 2012 18:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> On further thought, it seems like recovery_pause_at_target is rather
>> misdesigned anyway, and taking recovery target parameters from
>> recovery.conf is an obsolete API that was designed in a world before hot
>> standby. What I suggest people really want, if they're trying to
>> interactively determine how far to roll forward, is this:
>> ...
> Can't remember why we didn't go for the full API last time. I'll have
> another go, in HEAD.
That's fine, but the immediate question is what are we doing to fix
the back branches. I think everyone is clear that we should be testing
LocalHotStandbyActive rather than precursor conditions to see if a pause
is allowed, but are we going to do anything more than that?
The only other thing I really wanted to do is not have the in-loop pause
occur after we've taken actions that are effectively part of the WAL
apply step. I think ideally it should happen just before or after the
recoveryStopsHere stanza. Last night I worried about adding an extra
spinlock acquire to make that work, but today I wonder if we couldn't
get away with just a naked
if (xlogctl->recoveryPause)
recoveryPausesHere();
The argument for this is that although we might fetch a slightly stale
value of the shared variable, it can't be very stale --- certainly no
older than the spinlock acquisition near the bottom of the previous
iteration of the loop. And this is a highly asynchronous feature
anyhow, so fuzziness of plus or minus one WAL record in when the pause
gets honored is not going to be detectable. Hence an extra spinlock
acquisition is not worth the cost.
regards, tom lane
--
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: tgl@sss.pgh.pa.us, simon@2ndQuadrant.com, andres@2ndQuadrant.com, jeff.janes@gmail.com, hlinnakangas@vmware.com, noah@leadboat.com
Subject: Re: PITR potentially broken in 9.2
In-Reply-To: <12846.1354742138@sss.pgh.pa.us>
References: <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> <7015.1354725616@sss.pgh.pa.us> <CA+U5nM+AHnYOv5+xE0ogFM82gdPfmZ4osRutT-BT2DW3LrGPfA@mail.gmail.com> <CA+U5nMKKY4NTJa+i5OJYs2Mh8i=B3249A3ji=L0-hr4c1G7qMw@mail.gmail.com> <20121205173025.GD27424@awork2.anarazel.de> <8223.1354728999@sss.pgh.pa.us> <9918.1354733333@sss.pgh.pa.us> <CA+U5nMLfV4OT31df7Uc2BXLM0-NUqk-qdLsYQ5jPTa4Ejwv+sw@mail.gmail.com> <12846.1354742138@sss.pgh.pa.us>
* 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