Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgIY2-00033h-Uj for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Dec 2012 17:14:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TgIY2-0004Bw-Dy for pgsql-bugs@arkaria.postgresql.org; Wed, 05 Dec 2012 17:14:14 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgIY1-0004B9-AD for pgsql-bugs@postgresql.org; Wed, 05 Dec 2012 17:14:13 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgIXz-0004kT-Fp for pgsql-bugs@postgresql.org; Wed, 05 Dec 2012 17:14:13 +0000 Received: from anarazel.de (p5DDC4F13.dip.t-dialin.net [93.220.79.19]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MUEV8-1ToeW02GoM-00QUHH; Wed, 05 Dec 2012 18:14:10 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 812E21C00E6; Wed, 5 Dec 2012 18:14:09 +0100 (CET) Date: Wed, 5 Dec 2012 18:14:09 +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: <20121205171409.GB27424@awork2.anarazel.de> References: <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> <20121205162421.GB20456@awork2.anarazel.de> <7015.1354725616@sss.pgh.pa.us> <20121205170801.GA27424@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121205170801.GA27424@awork2.anarazel.de> X-Provags-ID: V02:K0:l95IqVe9CR2gN7gjiZl1yr0nr+jUVCcHKiIlTmlaf3P +Oi+AcG6jtsf8BvyRBciUdAPV1XvHZkdeiBN3/bdr2CX4Uatar 2uRpUB1SuDay4iaFeljc18IChH/qKmOPWHeNAoFqw59ZpQPZNF MP8ZP98/AtBlw93IEiZy0Eu0QrkHpg+5Cx7XNS7Gpfd2Y9hlP+ guxW/WKiq0yV4NNcB4A/gH8ksRrQa96b7LAsp0WxV1N8aIH6ux lWQS3GqBvsbyszrq01kIg+AAetmkaWQn7PxtBOz4kF1VMDssb0 PT6e76JasB/salQATi3q9TioSvC3mQmZtIiTcYRnsU4fqvVpvn k0seq0SjhjtldPhT2I5AjJgK5cghy7e32io1hbUhL 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 18:08:01 +0100, Andres Freund wrote: > On 2012-12-05 11:40:16 -0500, Tom Lane wrote: > > Andres Freund writes: > > > 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. > > > > Huh? That break is after the pause: > > > > /* > > * Have we reached our recovery target? > > */ > > if (recoveryStopsHere(record, &recoveryApply)) > > { > > /* > > * Pause only if users can connect to send a resume > > * message > > */ > > if (recoveryPauseAtTarget && standbyState == STANDBY_SNAPSHOT_READY) > > { > > SetRecoveryPause(true); > > recoveryPausesHere(); > > } > > reachedStopPoint = true; /* see below */ > > recoveryContinue = false; > > if (!recoveryApply) > > break; > > } > > Oh, yea. I mixed what I read in the patch and what exists today in my > mind, sorry for that. > > But it still seems rather strange that we break out of the loop > depending on recovery_target_inclusive which is what recoveryApply > basically is set to. That part is obviously bullshit as we also set recoveryContinue = false which means we will jump out of the loop later. Only after waiting for another record though ... Man, that file is confusing. 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