Re: pgsql: Integrate recovery.conf into postgresql.conf

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: pgsql: Integrate recovery.conf into postgresql.conf
Дата
Msg-id 20181126172118.GY3415@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: pgsql: Integrate recovery.conf into postgresql.conf  (Sergei Kornilov <sk@zsrv.org>)
Ответы Re: pgsql: Integrate recovery.conf into postgresql.conf  (Sergei Kornilov <sk@zsrv.org>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Lætitia Avrot
Дата:
Сообщение: Re: Constraint documentation
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Handling of REGRESS_OPTS in MSVC for regression tests