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 1gRIf7-0000kN-VF for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 15:19:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRIf6-00046T-1K for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 15:19:00 +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 1gRIf5-00046M-QI for pgsql-hackers@lists.postgresql.org; Mon, 26 Nov 2018 15:18:59 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRIez-0002Yt-Ba for pgsql-hackers@postgresql.org; Mon, 26 Nov 2018 15:18:59 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 3FA235F7A4; Mon, 26 Nov 2018 10:18:52 -0500 (EST) Date: Mon, 26 Nov 2018 10:18:52 -0500 From: Stephen Frost To: Michael Paquier Cc: Peter Eisentraut , Sergei Kornilov , Postgres hackers Subject: Re: pgsql: Integrate recovery.conf into postgresql.conf Message-ID: <20181126151852.GW3415@tamriel.snowman.net> References: <20181126002849.GD1776@paquier.xyz> <27802171543235530@iva2-6ec8f0a6115e.qloud-c.yandex.net> <20181126131640.GD14598@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JkwjF0+O6jX31edR" Content-Disposition: inline In-Reply-To: <20181126131640.GD14598@paquier.xyz> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --JkwjF0+O6jX31edR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Michael Paquier (michael@paquier.xyz) wrote: > On Mon, Nov 26, 2018 at 02:06:36PM +0100, Peter Eisentraut wrote: > > What is the reason for allowing multiple recovery_target_* settings and > > taking the last one? >=20 > This came originally to check that recovery.conf handles correctly its > recovery targets when multiple ones are defined with the last one > winning, as users may want to append additional targets in an existing > recovery.conf. I have not checked the code in details, but I think that > we should be careful to keep that property, even with EXEC_BACKEND. Ugh, no, I don't agree that this property makes sense to keep and since we're making these changes, I'd argue that it's exactly the right time to do away with that. I would think we'd have the different GUCs and then the check functions would only validate that they're valid inputs and then when we get to the point where we're starting to do recovery we check and make sure we've been given a sane overall configuration- which means that only *one* is set, and it matches the recovery target requested. As with backup, recovery should be extremely clear and straight-forward, with alarms going off if there's something unclear or inconsistent. One of the arguments around using postgresql.auto.conf (or any other managed config file, as discussed elsewhere) is that it can be machine-processed and therefore tooling around it can make sure that what goes into that file is correct and sane and doesn't need to rely on being able to just append things to the file and hope that it works. Thanks! Stephen --JkwjF0+O6jX31edR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJb/A7bAAoJEO1sijiDR2RVYnIQAKy+6Zz+RB+bPuBVV7jn2fe9 azoz3Qf29B26bMjkoiAWMKXfdLhqn7VV/vNcM59CDIGxVy5HswlvXgEicn3K5+Ei hYZLlyCqig6vp7qOMOh4dqXzz3KYWLHjsDxTzaFQeFuFnhHLv2Ie2gRTE9TI++SC CNr38/fvEwtbAJLMx+48CXQ34hNMTZIeuq9/73Ft4vLg4/Tp0F42mEPjNbh8/yB4 zUDfj7pW+2jwNU/zsMBaxwHO6Nyat47Q+NuzwCyNA8ghPhOwDP4PsFJXCeGu4uUn 7R/FA9HcWpQgwCU04hsiVUw8KT6+akoAjX3K8qLN1cE4NEJ3EViQ3tR9t6G+fe/M dQ9bzVO6YsgFQ5MGzisGyPjSvjfIeLohl+qQd3anc9WDBWA/UhfxSN+p3cMPFjD3 1NVT/lMJIMpKWiVL6RQx7wRIgNvnVe/li4ZMqPYaDVbyFy/4SVZCfmhX2SbQGF0I WgsACRljNjfPH76bRYia5TOA5jU0ZHCu4RqusWVb2EDYVuS2uCFPAwIeo86QF2Ug gvmL92cNjkb5OXHApRW6Gu90xJaQja8MkZ2Rn7Cp+rp2x2Y1EFPr2J+J/cwtNSi6 t2K6KjxeYtdsc+0XvwaifHotZahx1Jgt6Ibhnu1+aFwjKeAb4zKPorinhLWBGWwn uvJJbJg/0mgb1cw+f7hx =7ox9 -----END PGP SIGNATURE----- --JkwjF0+O6jX31edR--