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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: walreceiver uses a temporary replication slot by default
Дата
Msg-id 20200122055510.GH174860@paquier.xyz
обсуждение исходный текст
Ответы Re: pgsql: walreceiver uses a temporary replication slot by default
Re: pgsql: walreceiver uses a temporary replication slot by default
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: progress report for ANALYZE
Следующее
От: Amit Langote
Дата:
Сообщение: Re: progress report for ANALYZE