Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrSh4-0001uJ-Km for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Dec 2013 13:22:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VrSh4-0000fO-41 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Dec 2013 13:22:14 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrSh2-0000fF-Dz for pgsql-hackers@postgresql.org; Fri, 13 Dec 2013 13:22:12 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VrSgz-00007M-5y for pgsql-hackers@postgresql.org; Fri, 13 Dec 2013 13:22:11 +0000 Received: from anarazel.de (p5DDC4048.dip0.t-ipconnect.de [93.220.64.72]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MflIG-1WEeN60N88-00N6GF; Fri, 13 Dec 2013 14:22:04 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 7351D1053C3; Fri, 13 Dec 2013 14:22:03 +0100 (CET) Date: Fri, 13 Dec 2013 14:22:03 +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: <20131213132203.GJ29402@awork2.anarazel.de> References: <3398.1386859959@sss.pgh.pa.us> <20131213115858.GI29402@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable X-Provags-ID: V02:K0:HxkDOVStHChh6j8tbs/KWLb8HzdvA0qG6x0w7zfn6+g yMyYRNqClSkd4+ajfc51TG9kuS83avzBNeSkjNCrAqyYLI3CAZ FKe6RbFFSnvJWzK/0gkN16SvXdRJm+HtvNGC8N9EaMp0Kn/Ai2 hfdPfyuR079za5pDSZod9ch1fxacCegF2kFgvkWVnB8zMyNp6H KoBfdlQ6Zd/qGs4kkLy+VYwNNTHbthytWh/L1n4X1ptPyzuKG0 csfy86CYilngTikFEL9yj/3BkSLA2dLFH9uHuk9AoSyfaStG3F Dx/uviAPzLrgSumaaOFFWbxMcIzokPd0HYMHFjtqdrJDSyEbB3 yNVh6+6h7J/PT3rGQEpA7m+VKMwqjSwi6Bryer5j4 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:09:13 +0000, Simon Riggs wrote: > On 13 December 2013 11:58, Andres Freund wrote: > > On 2013-12-13 11:56:47 +0000, Simon Riggs wrote: > >> On 12 December 2013 21:58, Fabr=EDzio de Royes Mello > >> wrote: > >> > Reviewing the committed patch I noted that the "CheckForStandbyTrigg= er()" > >> > after the delay was removed. > >> > > >> > If we promote the standby during the delay and don't check the trigg= er > >> > immediately after the delay, then we will replay undesired WALs reco= rds. > >> > > >> > The attached patch add this check. > >> > >> 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? >=20 > That would change the way pause currently works, which is OOS for that pa= tch. 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. Greetings, Andres Freund --=20 Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers