aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/ref/drop_subscription.sgml8
-rw-r--r--src/backend/commands/subscriptioncmds.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/drop_subscription.sgml b/doc/src/sgml/ref/drop_subscription.sgml
index aee96155463..d79f137c1e8 100644
--- a/doc/src/sgml/ref/drop_subscription.sgml
+++ b/doc/src/sgml/ref/drop_subscription.sgml
@@ -85,9 +85,11 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable
for the subscription on the remote host are released. If this fails,
either because the remote host is not reachable or because the remote
replication slot cannot be dropped or does not exist or never existed,
- the <command>DROP SUBSCRIPTION</command> command will fail. To proceed in
- this situation, disassociate the subscription from the replication slot by
- executing <literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>.
+ the <command>DROP SUBSCRIPTION</command> command will fail. To proceed
+ in this situation, first disable the subscription by executing
+ <literal>ALTER SUBSCRIPTION ... DISABLE</literal>, and then disassociate
+ it from the replication slot by executing
+ <literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>.
After that, <command>DROP SUBSCRIPTION</command> will no longer attempt any
actions on a remote host. Note that if the remote replication slot still
exists, it (and any related table synchronization slots) should then be
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 83cb67e7a59..404b3965596 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -1860,7 +1860,8 @@ ReportSlotConnectionError(List *rstates, Oid subid, char *slotname, char *err)
errmsg("could not connect to publisher when attempting to drop replication slot \"%s\": %s",
slotname, err),
/* translator: %s is an SQL ALTER command */
- errhint("Use %s to disassociate the subscription from the slot.",
+ 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)")));
}