Re: pg_basebackup --create-slot-if-not-exists? - Mailing list pgsql-hackers

From Michael Banck
Subject Re: pg_basebackup --create-slot-if-not-exists?
Date
Msg-id 6330aefa.5d0a0220.4fa4d.d60a@mx.google.com
Whole thread Raw
In response to Re: pg_basebackup --create-slot-if-not-exists?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On Wed, Sep 21, 2022 at 09:12:04PM -0400, Tom Lane wrote:
> In any case I agree with the point that --create-slot seems
> rather obsolete.  If you are trying to resume in a previous
> replication stream (which seems like the point of persistent
> slots) then the slot had better already exist.  If you are
> satisfied with just starting replication from the current
> instant, then a temp slot seems like what you want.

One advantage of using a permanent slot is that it's getting written
into the recovery configuration when you use --write-recovery-conf and
you only need to start the standby after intial bootstrap to have it
connect using the slot.

Not sure that's worth keeping it around, but it makes automating things
somewhat simpler I guess. I do somewhat agree with the thread starter,
that --create-slot-if-not-exists would make things even easier, but in
the light of your concerns regarding security it's probably not the best
idea and would make things even more convoluted than they are now.


Michael



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [RFC] building postgres with meson - v13
Next
From: Hamid Akhtar
Date:
Subject: Re: add checkpoint stats of snapshot and mapping files of pg_logical dir