Be precise about when ALTER SUBSCRIPTION needs conninfo.

Decide early whether the original conninfo is needed so that errors
happen consistently.

Addresses finding 12 in report from linked discussion.

Co-authored-by: Shlok Kyal <[email protected]>
Reported-by: Noah Misch <[email protected]>
Reviewed-by: Hayato Kuroda (Fujitsu) <[email protected]>
Reviewed-by: Amit Kapila <[email protected]>
Discussion: https://postgr.es/m/20260710195902.4f.noahmisch%40microsoft.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ae420d66e72051b7ceab49d14f990094f1c8c6b4

Modified Files
--------------
src/backend/commands/subscriptioncmds.c    | 79 +++++++++++++++++++-----------
src/test/regress/expected/subscription.out |  8 +++
src/test/regress/sql/subscription.sql      |  9 ++++
3 files changed, 68 insertions(+), 28 deletions(-)

Reply via email to