Re: Check for existing replication slot in pg_createsubscriber - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Check for existing replication slot in pg_createsubscriber
Date
Msg-id CAA4eK1+nEH9ZaeL+gLxnovpLL8945W6wnnyaafE=YLJNLmYD=Q@mail.gmail.com
Whole thread Raw
In response to Check for existing replication slot in pg_createsubscriber  (Zane Duffield <duffieldzane@gmail.com>)
Responses Re: Check for existing replication slot in pg_createsubscriber
List pgsql-hackers
On Fri, Jun 27, 2025 at 1:13 PM Zane Duffield <duffieldzane@gmail.com> wrote:
>
> Hackers,
>
> I noticed in testing and usage that pg_createsubscriber doesn't check for an existing replication slot before
attemptingto create one, whereas it *does* check for existing publications. 
>

I see the difference you are pointing to. Ideally, the checks should
be the same unless there is a specific reason for them to be
different, which should be mentioned in the comments. BTW, do you see
any problems due to name conflicts while using this tool, or is it a
code-level observation? AFAICS, the names for the objects created by
pg_subscriber are either generated names (with an intention that it
doesn't conflict) or user-provided. In both cases, chances should be
less that they conflict with existing objects.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Tender Wang
Date:
Subject: Re: MergeJoin beats HashJoin in the case of multiple hash clauses
Next
From: Zane Duffield
Date:
Subject: Re: Check for existing replication slot in pg_createsubscriber