summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmit Kapila2023-06-21 04:01:32 +0000
committerAmit Kapila2023-06-21 04:49:54 +0000
commit6973868c9dbc8d6242a7419c0807d301dd6d5fe3 (patch)
tree9e2e08ceb547848a404fc3b5487cea972bc4294e /src
parentf6345f03f358887877942b266d6992ed8be60153 (diff)
Fix the errhint message and docs for drop subscription failure.
The existing errhint message and docs were missing the fact that we can't disassociate from the slot unless the subscription is disabled. Author: Robert Sjöblom, Peter Smith Reviewed-by: Peter Eisentraut, Amit Kapila Backpatch-through: 11 Discussion: https://postgr.es/m/807bdf85-61ea-88e2-5712-6d9fcd4eabff@fortnox.se
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/subscriptioncmds.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 7c981212e75..b03a9871ca6 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -975,8 +975,10 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
(errmsg("could not connect to publisher when attempting to "
"drop the replication slot \"%s\"", slotname),
errdetail("The error was: %s", err),
- errhint("Use ALTER SUBSCRIPTION ... SET (slot_name = NONE) "
- "to disassociate the subscription from the slot.")));
+ /* translator: %s is an SQL ALTER command */
+ errhint("Use %s to disable the subscription, and then use %s to disassociate it from the slot.",
+ "ALTER SUBSCRIPTION ... DISABLE",
+ "ALTER SUBSCRIPTION ... SET (slot_name = NONE)")));
PG_TRY();
{