Re: pgsql: walreceiver uses a temporary replication slot by default

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: Michael Paquier <michael@paquier.xyz>, Peter Eisentraut <peter@eisentraut.org>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>, Andres Freund <andres@anarazel.de>
Date: 2020-01-22T15:58:46Z
Lists: pgsql-hackers

Attachments

Hello

> In short, the following things:
> - wal_receiver_create_temp_slot should be made PGC_POSTMASTER,
> similarly to primary_slot_name and primary_conninfo.
> - WalReceiverMain() should not load the parameter from the GUC context
> by itself.
> - RequestXLogStreaming(), called by the startup process, should be in
> charge of defining if a temp slot should be used or not.

I would like to cross-post here a patch with such changes that I posted in "allow online change primary_conninfo" thread.
This thread is more appropriate for discussion about wal_receiver_create_temp_slot.

PS: I posted this patch in both threads mostly to make cfbot happy.

regards, Sergei

Commits

  1. Set wal_receiver_create_temp_slot PGC_POSTMASTER

  2. walreceiver uses a temporary replication slot by default