Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita734caa

Browse files
author
Amit Kapila
committed
Fix the errhint message and docs for drop subscription failure.
The existing errhint message and docs were missing the fact that we can'tdisassociate from the slot unless the subscription is disabled.Author: Robert Sjöblom, Peter SmithReviewed-by: Peter Eisentraut, Amit KapilaBackpatch-through: 11Discussion:https://postgr.es/m/807bdf85-61ea-88e2-5712-6d9fcd4eabff@fortnox.se
1 parent5b1a879 commita734caa

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎doc/src/sgml/ref/drop_subscription.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable
8585
for the subscription on the remote host are released. If this fails,
8686
either because the remote host is not reachable or because the remote
8787
replication slot cannot be dropped or does not exist or never existed,
88-
the <command>DROP SUBSCRIPTION</command> command will fail. To proceed in
89-
this situation, disassociate the subscription from the replication slot by
90-
executing <literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>.
88+
the <command>DROP SUBSCRIPTION</command> command will fail. To proceed
89+
in this situation, first disable the subscription by executing
90+
<literal>ALTER SUBSCRIPTION ... DISABLE</literal>, and then disassociate
91+
it from the replication slot by executing
92+
<literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>.
9193
After that, <command>DROP SUBSCRIPTION</command> will no longer attempt any
9294
actions on a remote host. Note that if the remote replication slot still
9395
exists, it (and any related table synchronization slots) should then be

‎src/backend/commands/subscriptioncmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2185,7 +2185,8 @@ ReportSlotConnectionError(List *rstates, Oid subid, char *slotname, char *err)
21852185
errmsg("could not connect to publisher when attempting to drop replication slot \"%s\": %s",
21862186
slotname,err),
21872187
/* translator: %s is an SQL ALTER command */
2188-
errhint("Use %s to disassociate the subscription from the slot.",
2188+
errhint("Use %s to disable the subscription, and then use %s to disassociate it from the slot.",
2189+
"ALTER SUBSCRIPTION ... DISABLE",
21892190
"ALTER SUBSCRIPTION ... SET (slot_name = NONE)")));
21902191
}
21912192

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp