Re: allow online change primary_conninfo

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, David Steele <david(at)pgmasters(dot)net>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: allow online change primary_conninfo
Date: 2019-09-19 08:02:57
Message-ID: 47681568880177@myt5-b646bde4b8f3.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

Thank you for review!

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

Good catch, I forgot about conf sample.

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

Changed

> 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.

Ok, changed.
I leave primary_slot_name description as before.

> 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?

Hmm. Is somewhere documented that walreceiver will receive WAL while the startup process in paused state?
(didn't add such note in current version)

regards, Sergei

Attachment Content-Type Size
v4_allow_reload_walreceiver_conninfo.patch text/x-diff 12.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Filip Rembiałkowski 2019-09-19 08:10:15 one line doc patch for v12
Previous Message Peter Eisentraut 2019-09-19 07:37:04 Re: ecpglib major version changed