Re: pgsql: walreceiver uses a temporary replication slot by default - Mailing list pgsql-hackers

From Sergei Kornilov
Subject Re: pgsql: walreceiver uses a temporary replication slot by default
Date
Msg-id 3389391584476523@vla1-3991b5027d7d.qloud-c.yandex.net
Whole thread Raw
In response to Re: pgsql: walreceiver uses a temporary replication slot by default  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgsql: walreceiver uses a temporary replication slot by default  (Michael Paquier <michael@paquier.xyz>)
List 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

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: WAL usage calculation patch
Next
From: Bruce Momjian
Date:
Subject: Re: Error on failed COMMIT