Avoid errors during ALTER SUBSCRIPTION.

Previously, when retrieving the old Subscription object, constructing
the conninfo could encounter an error during
ForeignServerConnectionString(). ACL errors were handled properly, but
other errors could interfere with a user fixing the problem with ALTER
SUBSCRIPTION.

Reported-by: Chao Li <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

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

Modified Files
--------------
src/backend/catalog/pg_subscription.c      |  72 +++++++++++--------
src/backend/commands/subscriptioncmds.c    | 111 +++++++++++++++++++++--------
src/backend/replication/logical/worker.c   |   4 +-
src/include/catalog/pg_subscription.h      |   3 +-
src/test/regress/expected/subscription.out |  29 ++++++--
src/test/regress/regress.c                 |   3 +
src/test/regress/sql/subscription.sql      |  35 +++++++--
7 files changed, 184 insertions(+), 73 deletions(-)

Reply via email to