Re: allow online change primary_conninfo

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "david(at)pgmasters(dot)net" <david(at)pgmasters(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: allow online change primary_conninfo
Date: 2020-01-22 15:51:06
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


> Yeah, you are right. I was not paying much attention but something
> does not stick here. My understanding is that we should have the WAL
> receiver receive the value it needs to use from the startup process
> (aka via RequestXLogStreaming from xlog.c), and that we ought to make
> this new parameter PGC_POSTMASTER instead of PGC_SIGHUP. HEAD is
> inconsistent here.

Thank you!

I attached two patches:
- first changes wal_receiver_create_temp_slot to PGC_POSTMASTER and moved the logic to RequestXLogStreaming
- second is based on last published v6 version of main patch. It changes wal_receiver_create_temp_slot back to PGC_SIGHUP along with primary_conninfo and primary_slot_name and will restart walreceiver if need.

Regarding the main patch: we have several possibilities for moving RequestXLogStreaming call. We need to choose one.
And, of course, changes in the text...

regards, Sergei

Attachment Content-Type Size
0002_v7_allow_reload_walreceiver_conninfo.patch text/x-diff 15.0 KB
0001_v7_move_temp_slot_logic_to_startup.patch text/x-diff 6.2 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Kornilov 2020-01-22 15:58:46 Re: pgsql: walreceiver uses a temporary replication slot by default
Previous Message Tom Lane 2020-01-22 15:22:21 Re: Do we need to handle orphaned prepared transactions in the server?