logical_replication_slot_disable_doc_update_v3.patch
application/x-patch
Filename: logical_replication_slot_disable_doc_update_v3.patch
Type: application/x-patch
Part: 0
Patch
Format: unified
Series: patch v3
| File | + | − |
|---|---|---|
| doc/src/sgml/ref/drop_subscription.sgml | 3 | 2 |
| src/backend/commands/subscriptioncmds.c | 1 | 1 |
diff --git a/doc/src/sgml/ref/drop_subscription.sgml b/doc/src/sgml/ref/drop_subscription.sgml
index 8d997c983f..4be6ddb873 100644
--- a/doc/src/sgml/ref/drop_subscription.sgml
+++ b/doc/src/sgml/ref/drop_subscription.sgml
@@ -86,8 +86,9 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable
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>.
+ this situation, first <literal>DISABLE</literal> the subscription, 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 e8b288d01c..9ecb91ab15 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -2185,7 +2185,7 @@ 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 disassociate the subscription from the slot after disabling the subscription.",
"ALTER SUBSCRIPTION ... SET (slot_name = NONE)")));
}