From: Stephen Frost <sfrost@snowman.net>
To: Sergei Kornilov <sk@zsrv.org>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Integrate recovery.conf into postgresql.conf
Date: Mon, 26 Nov 2018 12:21:18 -0500
Message-ID: <20181126172118.GY3415@tamriel.snowman.net> (raw)
In-Reply-To: <29465041543250389@iva4-f774db2b5297.qloud-c.yandex.net>
References: <E1gQwex-0001Vd-OW@gemulon.postgresql.org>
<20181126002849.GD1776@paquier.xyz>
<27802171543235530@iva2-6ec8f0a6115e.qloud-c.yandex.net>
<cd804d8f-0873-f81c-2420-2f1b0f99d889@2ndquadrant.com>
<20181126131640.GD14598@paquier.xyz>
<20181126151852.GW3415@tamriel.snowman.net>
<29465041543250389@iva4-f774db2b5297.qloud-c.yandex.net>
Greetings,
* Sergei Kornilov (sk@zsrv.org) wrote:
> > 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.
> How about something like attached patch?
I've not been following this very closely, but seems like
recovery_target_string is a bad idea.. Why not just make that
'recovery_target_immediate' and make it a boolean? Having a GUC that's
only got one valid value seems really odd.
> + if (targetSettingsCount > 1)
> + ereport(FATAL,
> + (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
> + errmsg("can not specify multiple recovery targets")));
I think I would have done 'if (targetSettingsCount != 1)' here.
> -# Multiple targets
> -# Last entry has priority (note that an array respects the order of items
> -# not hashes).
You could (and imv should) include a test that throws an expected error
if multiple targets are specified.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: sfrost@snowman.net, sk@zsrv.org, michael@paquier.xyz, peter.eisentraut@2ndquadrant.com, pgsql-hackers@postgresql.org
Subject: Re: pgsql: Integrate recovery.conf into postgresql.conf
In-Reply-To: <20181126172118.GY3415@tamriel.snowman.net>
References: <E1gQwex-0001Vd-OW@gemulon.postgresql.org> <20181126002849.GD1776@paquier.xyz> <27802171543235530@iva2-6ec8f0a6115e.qloud-c.yandex.net> <cd804d8f-0873-f81c-2420-2f1b0f99d889@2ndquadrant.com> <20181126131640.GD14598@paquier.xyz> <20181126151852.GW3415@tamriel.snowman.net> <29465041543250389@iva4-f774db2b5297.qloud-c.yandex.net> <20181126172118.GY3415@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox