agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Amit Kapila <akapila@postgresql.org>
Subject: [PATCH v4 2/2] Update comments for AlterSubscription.
Date: Fri, 16 Jul 2021 10:55:59 +0530
Add explanation as to why the subscription needs to be disabled to allow
slot_name as none.
Author: Japin Li and Amit Kapila
Discussion: https://postgr.es/m/MEYP282MB1669CBD98E721C77CA696499B61A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
---
src/backend/commands/subscriptioncmds.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index fb0b0058f2..41c8397902 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -912,6 +912,13 @@ AlterSubscription(AlterSubscriptionStmt *stmt, bool isTopLevel)
if (IsSet(opts.specified_opts, SUBOPT_SLOT_NAME))
{
+ /*
+ * The subscription must be disabled to allow slot_name as
+ * 'none', otherwise, the apply worker will repeatedly try
+ * to stream the data using that slot_name which neither
+ * exists on the publisher nor the user will be allowed to
+ * create it.
+ */
if (sub->enabled && !opts.slot_name)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
--
2.28.0.windows.1
--=-=-=--
view thread (5+ messages) latest in thread
Message-ID: <no-message-id-1861669@localhost>
Permalink: ../../no-message-id-1861669@localhost/
Also on: postgresql.org/message-id/no-message-id-1861669@localhost
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: akapila@postgresql.org
Subject: Re: [PATCH v4 2/2] Update comments for AlterSubscription.
In-Reply-To: <no-message-id-1861669@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox