Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgHm6-0002KR-8o for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Dec 2012 16:24:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TgHm5-0002bW-Kj for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Dec 2012 16:24:41 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgHm3-0002a2-P2 for pgsql-bugs@postgresql.org; Wed, 05 Dec 2012 16:24:39 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgHm2-00055h-F9 for pgsql-bugs@postgresql.org; Wed, 05 Dec 2012 16:24:39 +0000 Received: from anarazel.de (p5DDC4F13.dip.t-dialin.net [93.220.79.19]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MS2e2-1TmF803Q8g-00SfcQ; Wed, 05 Dec 2012 17:24:23 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 050981C00E6; Wed, 5 Dec 2012 17:24:21 +0100 (CET) Date: Wed, 5 Dec 2012 17:24:21 +0100 From: Andres Freund To: Tom Lane Cc: Simon Riggs , Jeff Janes , Heikki Linnakangas , Noah Misch , Pg Bugs Subject: Re: PITR potentially broken in 9.2 Message-ID: <20121205162421.GB20456@awork2.anarazel.de> References: <7787.1354482169@sss.pgh.pa.us> <20516.1354666844@sss.pgh.pa.us> <20121205021537.GB9811@awork2.anarazel.de> <22653.1354674454@sss.pgh.pa.us> <20121205143314.GA6420@awork2.anarazel.de> <6461.1354723883@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6461.1354723883@sss.pgh.pa.us> X-Provags-ID: V02:K0:LgpRe3WxHVPJyQkOrVWqIgKUU7dG4YrUtMsDoq8eipA xJ2FH25lhmXwlI23F66Perukw7zXdCVGzePByOjbl/1L5HeN2I YKr4RRGmFgKQowG7MDGsgrDQzp6X6hIghJGGWom/mMYbYfEUhy v09uxV3NeXpBnIgOdtdPzKDzdgIxv+1fWcYdH4xcp9D2T1G3ag ijTFkTax6Ey1D50TIpOtb1hl/Z6GYX6sL8KSLsOA3/vYSj95HT 2HF6JOyI+Km+2Gg2Yo44tjSpOjnPntHdxCHmm6i66+qro3bF7B psamqAzrvesHRMUhpTBW7Pdp5XGuHg8K3kYocSH9u/hEpz+lw0 uXExXBC+2quRwfGSLBY8WCDVNdqRnPr/dHzBvQ1OC X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2012-12-05 11:11:23 -0500, Tom Lane wrote: > Andres Freund 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