Skip to content

Commit dcecdfa

Browse files
author
Amit Kapila
committed
Update comments for AlterSubscription.
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
1 parent 2dbe890 commit dcecdfa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/backend/commands/subscriptioncmds.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,13 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
894894

895895
if (IsSet(opts.specified_opts, SUBOPT_SLOT_NAME))
896896
{
897+
/*
898+
* The subscription must be disabled to allow slot_name as
899+
* 'none', otherwise, the apply worker will repeatedly try
900+
* to stream the data using that slot_name which neither
901+
* exists on the publisher nor the user will be allowed to
902+
* create it.
903+
*/
897904
if (sub->enabled && !opts.slot_name)
898905
ereport(ERROR,
899906
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy