| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: pg_createsubscriber: Fix duplicate publication name rejection. |
| Date: | 2026-06-08 06:56:37 |
| Message-ID: | E1wWTuX-001YnU-0W@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
pg_createsubscriber: Fix duplicate publication name rejection.
pg_createsubscriber rejected duplicate --publication values while parsing
command-line options, even when the duplicate names referred to
publications in different databases. Since publication names are
database-local objects, the same name is perfectly valid across multiple
databases.
This restriction was not a practical problem before commit 85ddcc2f4c,
which added support for reusing pre-existing publications. After that
change, users who have identically-named publications in multiple
databases (a common convention) could not use the feature without renaming
their publications.
The analogous restriction on --subscription names is intentionally kept as
they are reused as replication slot names, which are cluster-global, so
allowing duplicate subscription names without additional guards could
cause a slot-name collision. That work is left for a future release.
Author: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Reviewed-by: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Discussion: https://postgr.es/m/B08A7C89-B3DE-4C1D-A671-32AD8BAB7E22@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6ce035ffff444479e63ea6276d56e33cc8b991d9
Modified Files
--------------
src/bin/pg_basebackup/pg_createsubscriber.c | 9 ++-------
src/bin/pg_basebackup/t/040_pg_createsubscriber.pl | 19 ++++---------------
2 files changed, 6 insertions(+), 22 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-06-08 08:14:43 | pgsql: ecpg: Reject multiple header items in GET/SET DESCRIPTOR |
| Previous Message | Michael Paquier | 2026-06-08 06:29:51 | pgsql: Fix memory leak in pgstat_progress_parallel_incr_param() |