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 1gROLP-0003B3-HY for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 21:23:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gROLO-0001Sl-7A for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 21:23:02 +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 1gROLO-0001Sc-01 for pgsql-hackers@lists.postgresql.org; Mon, 26 Nov 2018 21:23:02 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gROLG-0002OM-Vo for pgsql-hackers@postgresql.org; Mon, 26 Nov 2018 21:23:01 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id B3F5A5F7A4; Mon, 26 Nov 2018 16:22:53 -0500 (EST) Date: Mon, 26 Nov 2018 16:22:53 -0500 From: Stephen Frost To: Sergei Kornilov Cc: Michael Paquier , Peter Eisentraut , Postgres hackers Subject: Re: pgsql: Integrate recovery.conf into postgresql.conf Message-ID: <20181126212253.GC3415@tamriel.snowman.net> References: <20181126131640.GD14598@paquier.xyz> <20181126151852.GW3415@tamriel.snowman.net> <29465041543250389@iva4-f774db2b5297.qloud-c.yandex.net> <20181126172118.GY3415@tamriel.snowman.net> <145311543257278@sas1-0a6c2e2b59d7.qloud-c.yandex.net> <20181126191253.GZ3415@tamriel.snowman.net> <457381543264217@iva5-84bc572481fe.qloud-c.yandex.net> <20181126204855.GA3415@tamriel.snowman.net> <459131543267195@sas1-4b7566131ec9.qloud-c.yandex.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4OxkfA0LVqADv3Vx" Content-Disposition: inline In-Reply-To: <459131543267195@sas1-4b7566131ec9.qloud-c.yandex.net> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --4OxkfA0LVqADv3Vx Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Sergei Kornilov (sk@zsrv.org) wrote: > > I'd encourage you to look through the diff after you're finished hacking > > before sending it to the list, in case things get left in that should be > > removed, as below... > I am so sorry. I have a look before sending, but... > It's night in my timezone. I will fix tomorrow. Sure, I don't think there's any need to rush any of this. > >> =A0+ if (targetSettingsCount > 1) > >> =A0+ ereport(FATAL, > >> =A0+ (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > >> =A0+ errmsg("can not specify multiple recovery targets"))); > > > > Doesn't look like you changed this based on my prior comment..? > Do you mean this one? > > I think I would have done 'if (targetSettingsCount !=3D 1)' here. > To be sure, we need check we have one recovery target without standby mod= e and none or one in standby mode? Or some another check? Right, I think that's what the idea was, although that might require something for the explicit 'recover to the end case', now that I think about it, so perhaps the >1 isn't so bad. Still seems a bit odd to me though and I do wonder if there might be a better approach. Thanks! Stephen --4OxkfA0LVqADv3Vx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJb/GQtAAoJEO1sijiDR2RVHhoQAIByLuOSetzVVwKwasrnzUcB nOuiyOq7qBDqugJuzsj8P+EeVcHh0rVzdzDY6rcNYPr1NW7G0AmRurFXnFzAHqvO SSQ/WL5UYEg+mlCLssLU4QEIco612koZZyEayq6nN1PRnPS3Z7ZFpPkhTLmp3WQ8 9c1FIFUtaEZYT0/FqgrpDXFfhJvt6RwONbftXpoY6687A8grhD/tvXsdOd4LxdyI 7WZ8Z/P8yRFdYv8eysMb4tqB2Ry157I/rZYnWW6iJaQkr8apTfUp85kxZj+hHhUM 2hdN/uj7c/RVCaRv7cmasud7WmVpIc92/kacFyPc+cKY4Tzo5VPoEaLI2U+UvDN5 dmBbvAiIze+mWO0edxIosC0lywUaXp8YuRnQ1hj91OU5rONgwBCNc00ZFVUbQlcL HPAtlVqGeXMgX2ax74sI76AZODfzbPaJ8ppu4F/cUik6xLwGbCtMYUEK0/mowsME oAES6NO0JDjoUePLeW72emKf/une4yzqUQADQCX4SNk5agEOJZGI0TlvJ9UnHbGK gagAGv+eyZHtBoQKWgK5aOf9EHP5zT51Brtse4D3YLSv3BTbF0Y1NYRttc9TDhdl tFnt9ZqKiRkqpsCfdi+BvskXlyr5thBrefeCoSYUbryXCyKRfiNgUuCs80vBUgkb PNElcQtSjEMkmXUGBjhh =SrJW -----END PGP SIGNATURE----- --4OxkfA0LVqADv3Vx--