Re: pg_createsubscriber: allow duplicate publication names

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Shubham Khanna <khannashubham1197(at)gmail(dot)com>
Subject: Re: pg_createsubscriber: allow duplicate publication names
Date: 2026-06-09 00:38:02
Message-ID: 4FA0A61E-2C09-492A-A535-62FD4B58AA66@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Jun 8, 2026, at 17:30, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Jun 3, 2026 at 7:56 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>>
>>> On Jun 2, 2026, at 18:01, Hayato Kuroda (Fujitsu) <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>>>
>>> Dear Amit,
>>>
>>>> Can't we use --replication-slot=name to avoid this ERROR? I mean use
>>>> different replication slot names.
>>>
>>> Are you saying the below case, right? It can work.
>>>
>>> ```
>>> $ pg_createsubscriber -D data_sta/ -P 'user=postgres port=5432' -d postgres --subscription sub --replication-slot=slot1 -d testdb --subscription sub --replication-slot=slot2 -U postgres
>>> ```
>>>
>>> BTW; slot creations are tried before the standby promotes, thus there may be a chance
>>> user read the error message, change the subscription name, and retry. But I still
>>> think we should guard the combination, which means it's too late for PG19.
>>>
>>
>> Hi Hayato-san, thanks for the comment. I’ll keep it in my notes for later reference.
>>
>> BTW, I just saw someone has added this patch to the Open Items list.
>>
>
> Pushed the fix. We can close the open item tomorrow morning if
> buildfarm doesn't complain and we didn't see any other comments
> related to this.
>
> --
> With Regards,
> Amit Kapila.

Thanks for pushing. I have moved the item to the “resolved” section.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2026-06-09 01:55:47 typedef struct WindowClause misleading comments
Previous Message Chao Li 2026-06-09 00:32:19 Re: Fix bug of CHECK constraint enforceability recursion