Re: pg_basebackup --create-slot-if-not-exists?

From: Michael Banck <mbanck(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Ashwin Agrawal <ashwinstar(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_basebackup --create-slot-if-not-exists?
Date: 2022-09-25 19:41:45
Message-ID: 6330aefa.5d0a0220.4fa4d.d60a@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hamid Akhtar 2022-09-25 20:50:54 Re: add checkpoint stats of snapshot and mapping files of pg_logical dir
Previous Message Andres Freund 2022-09-25 19:38:06 Re: [RFC] building postgres with meson - v13