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 <[email protected]> Reviewed-by: Shlok Kyal <[email protected]> Reviewed-by: Amit Kapila <[email protected]> Reviewed-by: Hayato Kuroda <[email protected]> Discussion: https://postgr.es/m/[email protected] 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(-)
