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

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: pgsql: walreceiver uses a temporary replication slot by default
Date: 2020-03-17 20:39:11
Message-ID: 3389391584476523@vla1-3991b5027d7d.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hello

> I have reworked that part, adding more comments about the use of GUC
> parameters when establishing the connection to the primary for a WAL
> receiver. And also I have added an extra comment to walreceiver.c
> about the use of GUcs in general, to avoid this stuff again in the
> future. There were some extra nits with the format of
> postgresql.conf.sample.

Thank you! I just noticed that you removed my proposed change to this condition in RequestXLogStreaming

- if (slotname != NULL)
+ if (slotname != NULL && slotname[0] != '\0')

We need this change to set is_temp_slot properly. PrimarySlotName GUC can usually be an empty string, so just "slotname != NULL" is not enough.

I attached patch with this change.

regards, Sergei

Attachment Content-Type Size
0001-v3-change-wal_receiver_create_temp_slot.patch text/x-diff 9.4 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2020-03-17 21:22:06 pgsql: Remove logical_read_local_xlog_page
Previous Message Alvaro Herrera 2020-03-17 19:22:17 pgsql: Fix consistency issues with replication slot copy

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-03-17 20:47:41 Re: Error on failed COMMIT
Previous Message Julien Rouhaud 2020-03-17 20:32:22 Re: WAL usage calculation patch