Re: allow online change primary_conninfo

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: allow online change primary_conninfo
Дата
Msg-id 20190216151025.GJ2240@paquier.xyz
обсуждение исходный текст
Ответ на Re: allow online change primary_conninfo  (Sergei Kornilov <sk@zsrv.org>)
Ответы Re: allow online change primary_conninfo  (Sergei Kornilov <sk@zsrv.org>)
Список pgsql-hackers
On Sat, Feb 16, 2019 at 02:50:35PM +0300, Sergei Kornilov wrote:
> +    if ((strcmp(conninfo, PrimaryConnInfo) != 0 ||
> +         strcmp(slotname, PrimarySlotName) != 0) &&
> +        WalRcvRunning())
> +    {
> +        ereport(LOG,
> +                (errmsg("terminating walreceiver process due to change of %s",
> +                        strcmp(conninfo, PrimaryConnInfo) != 0 ? "primary_conninfo" : "primary_slot_name"),
> +                 errdetail("In a moment starts streaming WAL with new configuration.")));
> +
> +        ShutdownWalRcv();
> +        lastSourceFailed = true;
> +    }

If you do that, the startup process would try to jump to a different
source to fetch WAL if archiving is enabled.  Is that really what we
want?  It would be nice to have one message for primary_conninfo being
updated, and one for primary_slot_name so as if both are changed at
the same time the user gets the correct information.

"In a moment starts streaming WAL with new configuration." sounds
strange.  It would be more natural to have something like "The WAL
receiver is going to be restarted with the new configuration", just a
suggestion.
--
Michael

Вложения

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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: ALTER TABLE on system catalogs
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Compressed TOAST Slicing