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

Commit4b4ee1e

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 parent2f97105 commit4b4ee1e

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
@@ -84,9 +84,11 @@ DROP SUBSCRIPTION [ IF EXISTS ] <replaceable class="parameter">name</replaceable
8484
for the subscription on the remote host are released. If this fails,
8585
either because the remote host is not reachable or because the remote
8686
replication slot cannot be dropped or does not exist or never existed,
87-
the <command>DROP SUBSCRIPTION</command> command will fail. To proceed in
88-
this situation, disassociate the subscription from the replication slot by
89-
executing <literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>.
87+
the <command>DROP SUBSCRIPTION</command> command will fail. To proceed
88+
in this situation, first disable the subscription by executing
89+
<literal>ALTER SUBSCRIPTION ... DISABLE</literal>, and then disassociate
90+
it from the replication slot by executing
91+
<literal>ALTER SUBSCRIPTION ... SET (slot_name = NONE)</literal>.
9092
After that, <command>DROP SUBSCRIPTION</command> will no longer attempt any
9193
actions on a remote host. Note that if the remote replication slot still
9294
exists, it should then be dropped manually; otherwise it will continue to

‎src/backend/commands/subscriptioncmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,8 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
992992
"drop the replication slot \"%s\"",slotname),
993993
errdetail("The error was: %s",err),
994994
/* translator: %s is an SQL ALTER command */
995-
errhint("Use %s to disassociate the subscription from the slot.",
995+
errhint("Use %s to disable the subscription, and then use %s to disassociate it from the slot.",
996+
"ALTER SUBSCRIPTION ... DISABLE",
996997
"ALTER SUBSCRIPTION ... SET (slot_name = NONE)")));
997998

998999
PG_TRY();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp