Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vqrcn-0005Cx-4k for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Dec 2013 21:47:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vqrcm-0001LL-FS for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Dec 2013 21:47:20 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vqrcl-0001LD-8O for pgsql-hackers@postgresql.org; Wed, 11 Dec 2013 21:47:19 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vqrci-0000OS-ED for pgsql-hackers@postgresql.org; Wed, 11 Dec 2013 21:47:18 +0000 Received: from anarazel.de (p5DDC44E8.dip0.t-ipconnect.de [93.220.68.232]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0Lj4zW-1VGy6x2P9C-00cVT6; Wed, 11 Dec 2013 22:47:13 +0100 Received: by anarazel.de (Postfix, from userid 1000) id C9BA4101ED3; Wed, 11 Dec 2013 22:47:12 +0100 (CET) Date: Wed, 11 Dec 2013 22:47:12 +0100 From: Andres Freund To: =?iso-8859-1?Q?Fabr=EDzio?= de Royes Mello Cc: Simon Riggs , KONDO Mitsumasa , Robert Haas , Pgsql Hackers Subject: Re: Time-Delayed Standbys Message-ID: <20131211214712.GA536@awork2.anarazel.de> References: <52A59D10.7020209@lab.ntt.co.jp> <52A5A095.5020002@lab.ntt.co.jp> <20131209112937.GA27840@awork2.anarazel.de> <52A697F3.8030403@lab.ntt.co.jp> <20131210093848.GG27840@awork2.anarazel.de> <52A807F5.4020203@lab.ntt.co.jp> 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:e5GO4WC5qQvdHDFSykIMdSBuIANYOpNgDK75YTZkffI g0iOeOPitLCkj4alIIVzB3Mvu4sPcwiBoqNi8rWhAqSfBmII6b Pkv9wOCindhotpl12p2+/0kFs44Z/ge5UIj2wbcsTfGuYlYiJI z8mp9lmR7KOFMAN5eZjvB+ggsNFPwOUjjplrfXMTtRjjvqjBMb isZ3GngZVbP3kK+E1ElWByaPkclEVa+P084xN/nEvGKsoaX9MP B0gOl7NaFB5l23Logxu8lyllJzstDpO77uviJfuo6pVx8XSz2s tWddNdZ42VapsDEnCI/VoeDB2/uQWvFg06KJKjKC9Ef7bJ8Y4v qb05N1kmN2/zjOxECtJzQZm1tW3N5SzO+7AN7gzZp 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-11 16:37:54 -0200, Fabr=EDzio de Royes Mello wrote: > On Wed, Dec 11, 2013 at 6:27 AM, Simon Riggs wrot= e: > > >> I think this feature will be used in a lot of scenarios in > > >> which PITR is currently used. > > > > > > We have to judge which is better, we get something potential or to pr= otect > > > stupid. > > > And we had better to wait author's comment... > > > > I'd say just document that it wouldn't make sense to use it for PITR. > > > > There may be some use case we can't see yet, so specifically > > prohibiting a use case that is not dangerous seems too much at this > > point. I will no doubt be reminded of these words in the future... > I tend to agree with Simon, but I confess that I don't liked to delay a > server with standby_mode =3D 'off'. > The main goal of this patch is delay the Streaming Replication, so if the > slave server isn't a hot-standby I think makes no sense to delay it. > Mitsumasa suggested to add "StandbyModeRequested" in conditional branch to > skip this situation. I agree with him! I don't think that position has any merit, sorry: Think about the way this stuff gets setup. The user creates a new basebackup (pg_basebackup, manual pg_start/stop_backup, shutdown primary). Then he creates a recovery conf by either starting from scratch, using --write-recovery-conf or by copying recovery.conf.sample. In none of these cases delay will be configured. So, with that in mind, the only way it could have been configured is by the user *explicitly* writing it into recovery.conf. And now you want to to react to this explicit step by just *silently* ignoring the setting based on some random criteria (arguments have been made about hot_standby=3Don/off, standby_mode=3Don/off which aren't directly related). Why on earth would that by a usability improvement? Also, you seem to assume there's no point in configuring it for any of hot_standby=3Doff, standby_mode=3Doff, recovery_target=3D*. Why? There's usecases for all of them: * hot_standby=3Doff: Makes delay useable with wal_level=3Darchive (and thus a lower WAL volume) * standby_mode=3Doff: Configurations that use tools like pg_standby and similar simply don't need standby_mode=3Don. If you want to trigger failover from within the restore_command you *cannot* set it. * recovery_target_*: It can still make sense if you use pause_at_recovery_target. In which scenarios does your restriction actually improve anything? 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