Re: allow online change primary_conninfo

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: allow online change primary_conninfo
Дата
Msg-id CAHGQGwE7pEOYHPMGW6ARncJeb66sJ_dTEv-_5Gtn12XeoQNg-w@mail.gmail.com
обсуждение исходный текст
Ответ на 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 Wed, Aug 28, 2019 at 6:50 PM Sergei Kornilov <sk@zsrv.org> wrote:
>
> Hello
>
> Updated patch attached. (also I merged into one file)

Thanks for updating the patch! Here are some comments from me.

    #primary_conninfo = '' # connection string to sending server
    # (change requires restart)
    #primary_slot_name = '' # replication slot on sending server
    # (change requires restart)

ISTM that you need to update the above parts in postgresql.conf.sample.


    /* we don't expect primary_conninfo to change */

ISTM that you need to update the above comment in walreceiver.c.


+         <para>
+          The WAL receiver is restarted after an update of
<varname>primary_conninfo</varname>.
+         </para>

If primary_conninfo is set to an empty string, walreceiver just shuts down,
not restarts. The above description in the doc is not always true.
So I'm thinking something like the following description is better.
Thought?

    If primary_conninfo is changed while WAL receiver is running,
    the WAL receiver shuts down and then restarts with new setting,
    except when primary_conninfo is an empty string.


There is the case where walreceiver doesn't shut down immediately
after the change of primary_conninfo. If the change happens while
the startup process in paused state (e.g., by pg_wal_replay_pause(),
recovery_min_apply_delay, recovery conflict, etc), the startup
process tries to terminate walreceiver after it gets out of such state.
Shouldn't this fact be documented as a note?

Regards,

-- 
Fujii Masao



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Psql patch to show access methods info
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_upgrade check fails on Solaris 10