From: Michael Paquier <michael@paquier.xyz>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Cc: Sergei Kornilov <sk@zsrv.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: pgsql: walreceiver uses a temporary replication slot by default
Date: Wed, 22 Jan 2020 14:55:10 +0900
Message-ID: <20200122055510.GH174860@paquier.xyz> (raw)
In-Reply-To: <E1irMhK-00021w-9z@gemulon.postgresql.org>
References: <E1irMhK-00021w-9z@gemulon.postgresql.org>
Hi Peter,
(Adding Andres and Sergei in CC.)
On Tue, Jan 14, 2020 at 01:57:34PM +0000, Peter Eisentraut wrote:
> walreceiver uses a temporary replication slot by default
>
> If no permanent replication slot is configured using
> primary_slot_name, the walreceiver now creates and uses a temporary
> replication slot. A new setting wal_receiver_create_temp_slot can be
> used to disable this behavior, for example, if the remote instance is
> out of replication slots.
A recent message from Seigei Kornilov has attracted my attention to
this commit:
https://www.postgresql.org/message-id/370331579618998@vla3-6a5326aeb4ee.qloud-c.yandex.net
In the thread about switching primary_conninfo to be reloadable, we
have argued at great lengths that we should never have the WAL
receiver fetch by itself the GUC parameters used for the connection
with its primary. Here is the main area of the discussion:
https://www.postgresql.org/message-id/20190217192720.qphwrraj66rht5lj@alap3.anarazel.de
The previous thread was long enough so it can easily be missed.
However, it seems to me that we may need to revisit a couple of things
for this commit? 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.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, peter@eisentraut.org, pgsql-hackers@lists.postgresql.org, sk@zsrv.org, andres@anarazel.de
Subject: Re: pgsql: walreceiver uses a temporary replication slot by default
In-Reply-To: <20200122055510.GH174860@paquier.xyz>
References: <E1irMhK-00021w-9z@gemulon.postgresql.org> <20200122055510.GH174860@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox