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