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>
Cc: Peter Eisentraut <peter@eisentraut.org>, Postgres hackers <pgsql-hackers@lists.postgresql.org>, Andres Freund <andres@anarazel.de>
Date: 2020-02-17T13:57:04Z
Lists: pgsql-hackers

Attachments

Hello

> Thanks for posting this patch, Sergei. Here is a review to make
> things move on.

Thank you, here is updated patch

> The set of comments you are removing from walreceiver.c to decide if a
> temporary slot needs to be created or not should be moved to
> walreceiverfuncs.c as you move the logic from the WAL receiver startup
> phase to the moment the WAL receiver spawn is requested.

I changed this comments because they describes behavior during change value of wal_receiver_create_temp_slot.
But yes, I need to add some comments to RequestXLogStreaming.

> It would be more consistent with primary_conn_info and
> primary_slot_name if wal_receiver_create_temp_slot is passed down as
> an argument of RequestXLogStreaming().

Yep, I thought about that. Changed.

> As per the discussion done on this thread, let's also switch the
> parameter default to be disabled.

Done (my vote is also for disabling this option by default).

regards, Sergei

Commits

  1. Set wal_receiver_create_temp_slot PGC_POSTMASTER

  2. walreceiver uses a temporary replication slot by default