| From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
|---|---|
| To: | 'Chao Li' <li(dot)evan(dot)chao(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Cc: | 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-02 07:32:59 |
| Message-ID: | OS9PR01MB12149A19E7E69A7EB437BF1D2F5122@OS9PR01MB12149.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear Chao, Amit,
> In theory, yes, since subscription names are also unique per database. I didn’t
> include that in v1 because the publication-name issue affects the new PG19
> feature for reusing existing publications, whereas allowing duplicate subscription
> names seems like an improvement that could be a material of v20.
>
> As you ask, I put the subscription-name change in 0002. Please decide how to
> proceed. If you decide to accept both, they can be squashed.
For subscription side, I had a concern that name duplication error can be more likely
to happen if we specify the same subscription name for two databases. Because the
same will be reused for the slot name. Reproducer:
```
$ pg_createsubscriber -D data_sta/ -P 'user=postgres port=5432' -d postgres --subscription sub -d testdb --subscription sub -U postgres
...
pg_createsubscriber: error: could not create replication slot "sub" in database "testdb": ERROR: replication slot "sub" already exists
```
Personally -1 to accept the idea as-is.
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2026-06-02 07:41:33 | Re: Proposal: Conflict log history table for Logical Replication |
| Previous Message | lin teletele | 2026-06-02 07:14:04 | Re: Use pg_current_xact_id() instead of deprecated txid_current() |