Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vrp0w-0005bz-OJ for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Dec 2013 13:12:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vrp0v-0001Pd-So for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Dec 2013 13:12:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vrp0t-0001PS-Cc for pgsql-hackers@postgresql.org; Sat, 14 Dec 2013 13:12:11 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vrp0j-0003i6-GV for pgsql-hackers@postgresql.org; Sat, 14 Dec 2013 13:12:11 +0000 Received: from anarazel.de (p5DDC7254.dip0.t-ipconnect.de [93.220.114.84]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MW7C9-1W32Eb0I93-00XK6i; Sat, 14 Dec 2013 14:12:00 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 660FA100D8A; Sat, 14 Dec 2013 14:11:59 +0100 (CET) Date: Sat, 14 Dec 2013 14:11:59 +0100 From: Andres Freund To: Simon Riggs Cc: =?iso-8859-1?Q?Fabr=EDzio?= Mello , Robert Haas , Tom Lane , KONDO Mitsumasa , Pavel Stehule , Pgsql Hackers Subject: Re: Time-Delayed Standbys Message-ID: <20131214131159.GA3368@awork2.anarazel.de> References: <20131213115858.GI29402@awork2.anarazel.de> <20131213132203.GJ29402@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V02:K0:SyIFpWkAcNAdUSiu1Ad8MPq4Gfo4bqmhrv86GCoSwNb ZsI6Kzh6tDxOWbTkwTuurv0llmmaqdGR0Cy0CktXbb4C+WLqgc /ljzMteGpYygFnYt7PYwJfbA6G39qSaHfOMqfg26kGoZR82zUd y9MrNqOVIkFbFL1XENkyG7A8j7NNpcqBQmQcnL/uPWAmpzCjbw 8SEx1eYXLQMl6S+Kv/oMlAGJcCtDTG28Im0CMBPdHSkZROc1DL IePy3CQSbYn7VsAkQdTRUnbGwEOnN6SNX+hvfZ2mLUk7lxnhM2 Iyw19PdyFc5phz6Z5PK//UHBImVHehRIsDlpzmq4yiGfFWewtI flPH6Iefan7jPeMRcA/pcSsLFHGPEy6kILYz0n3P2 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2013-12-13 13:44:30 +0000, Simon Riggs wrote: > On 13 December 2013 13:22, Andres Freund wrote: > > On 2013-12-13 13:09:13 +0000, Simon Riggs wrote: > >> On 13 December 2013 11:58, Andres Freund wrote: > >> >> I removed it because it was after the pause. I'll replace it, but > >> >> before the pause. > >> > > >> > Doesn't after the pause make more sense? If somebody promoted while we > >> > were waiting, we want to recognize that before rolling forward? The wait > >> > can take a long while after all? > >> > >> That would change the way pause currently works, which is OOS for that patch. > > > > But this feature isn't pause itself - it's imo something > > independent. Note that we currently > > a) check pause again after recoveryApplyDelay(), > > b) do check for promotion if the sleep in recoveryApplyDelay() is > > interrupted. So not checking after the final sleep seems confusing. > > I'm proposing the attached patch. LOoks good, although I'd move it down below the comment ;) > This patch implements a consistent view of recovery pause, which is > that when paused, we don't check for promotion, during or immediately > after. That is user noticeable behaviour and shouldn't be changed > without thought and discussion on a separate thread with a clear > descriptive title. (I might argue in favour of it myself, I'm not yet > decided). Some more improvements in that are certainly would be good... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers