Re: allow online change primary_conninfo

From: Maxim Orlov <m(dot)orlov(at)postgrespro(dot)ru>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Sergei Kornilov <sk(at)zsrv(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, andres(at)anarazel(dot)de, david(at)pgmasters(dot)net, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: allow online change primary_conninfo
Date: 2020-10-16 16:50:01
Message-ID: 4cd4107ed423c8757636ec04342457bf@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-03-28 02:39, Alvaro Herrera wrote:
> On 2020-Mar-27, Alvaro Herrera wrote:
>
>> On 2020-Mar-27, Alvaro Herrera wrote:
>>
>> > I pushed the wal_receiver_create_temp_slot bugfix, because I realized
>> > after looking for long enough at WalReceiverMain() that the code was
>> > beyond saving. I'll be pushing the rest of this later today.
>>
>> So here's the next one. I still have to go over the doc changes here,
>> but at least the tests are passing for me.
>
> Pushed with some documentation tweaks.
>
> Many thanks for working on this!

Nice work! What do you think of possibility to add restore_command?

Is it a good idea to make a restore_command to be reloadable via SUGHUP
too?

On the one hand it looks reasonable since primary_conninfo got such
ability. On the other hand we don't exactly know whether the actual
process after reload config would use "new" command or "old" since it
may take a long time to finish running old command (in case of scp or
smth).

Also setting faulty restore_command lead to server termination, which is
rather unexpectedly.
If anyone makes some minor typo in restore_command, say write
restore_command='cp1 /mnt/srv/%f %p' instead of restore_command='cp
/mnt/srv/%f %p' and do SELECT pg_reload_conf() then server will
terminate.

Do you consider this feature useful? Any suggestions?

---
Best regards,
Maxim Orlov.

Attachment Content-Type Size
restore_command-sighup.patch text/x-diff 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-10-16 16:59:34 Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers
Previous Message Bruce Momjian 2020-10-16 16:47:12 Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?