Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7kJY-000646-Al for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Sep 2019 17:52:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i7kJX-0000P8-5g for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Sep 2019 17:52:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7kJW-0000MN-QC for pgsql-hackers@lists.postgresql.org; Tue, 10 Sep 2019 17:52:26 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7kJT-0007KH-TW for pgsql-hackers@postgresql.org; Tue, 10 Sep 2019 17:52:26 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 792D620A3C; Tue, 10 Sep 2019 13:52:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 10 Sep 2019 13:52:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=K2QJkDo7jBsAo5w2HjQo84H4MWtGPaYNYEAMEC2nlMI=; b=SBlW+IKk OhAgjpYqavDrJWFg2ntdQ4cLG119Vw2BWHzSMy7iAuDJHg5AlAEHdcnTGg8swexJ UBmOq+27ZffHY/yc9miQ3ACo0+d988ookxLxWcxXBoXrr/fxfrjuvT7yLdg7RZx3 s3I89oEjhuJSluKpJnEYMrqfgXep38Lg2aMQegRyfwRweRIkHZpwoOdgHWKGTWEF MV/m5yiF7P64D0BLjFu1y3ZW7Sa3TkGRoCCRGIe+Bi6BgQ+wB0xI0oV5IKoAzVxH JtKu9/I7Xd3e/uHc5flBzA0cPrYA3k/jTJBgv5NiDemOLMekMliSjfRGIdph/3aR TFUFsIdG33qpCQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrtddtgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjggfsehtkeertddtredunecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcufhhrohhmucdvnhgusfhurggurhgrnhhtuceorghlvhhhvghrrh gvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuffhomhgrihhnpedvnhguqhhurggurhgr nhhtrdgtohhmnecukfhppeduledtrdduvddurddvledrfeenucfrrghrrghmpehmrghilh hfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghenucevlhhushht vghrufhiiigvpedt X-ME-Proxy: Received: from nimloth.alvh.no-ip.org (unknown [190.121.29.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 7CE4580063; Tue, 10 Sep 2019 13:52:21 -0400 (EDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 8755F123A8B; Tue, 10 Sep 2019 14:52:19 -0300 (-03) Date: Tue, 10 Sep 2019 14:52:19 -0300 From: Alvaro Herrera from 2ndQuadrant To: Paul Guo Cc: Michael Paquier , Thomas Munro , pgsql-hackers , Jimmy Yih , Ashwin Agrawal Subject: Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown) Message-ID: <20190910175219.GA8826@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Sep-09, Paul Guo wrote: > > > > Thank for rebasing. > > > > I didn't like 0001 very much. > > > > * It seems now would be the time to stop pretending we're using a file > > called recovery.conf; I know we still support older server versions that > > use that file, but it sounds like we should take the opportunity to > > rename the function to be less misleading once those versions vanish out > > of existance. > > How about renaming the function names to > GenerateRecoveryConf -> GenerateRecoveryConfContents > WriteRecoveryConf -> WriteRecoveryConfInfo <- it writes standby.signal > on pg12+, so function name WriteRecoveryConfContents is not accurate. GenerateRecoveryConfig / WriteRecoveryConfig ? > > I wonder about putting this new file in src/fe_utils instead of keeping > > it in pg_basebackup and symlinking to pg_rewind. Maybe if we make it a > > true module (recovery_config_gen.c) it makes more sense there. > > > I thought some about where to put the common code also. It seems pg_rewind > and pg_basebackup are the only consumers of the small common code. I doubt > it deserves a separate file under src/fe_utils. Hmm, but other things there are also used by only two programs, say psqlscan.l and conditional.c are just for psql and pgbench. > > 0003: > > > > I still don't understand why we need a command-line option to do this. > > Why should it not be the default behavior? > > This was discussed but frankly speaking I do not know how other postgres > users or enterprise providers handle this (probably some have own scripts?). > I could easily remove the option code if more and more people agree on that > or at least we could turn it on by default? Well, I've seen no contrary votes, and frankly I see no use for the opposite (current) behavior. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services