diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 5408edcfc2..681d208f81 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -57,7 +57,7 @@ static void parse_subscription_options(List *options, bool *connect, bool *enabled_given, bool *enabled, bool *create_slot, bool *slot_name_given, char **slot_name, - bool *copy_data, char **synchronous_commit, + bool *copy_data, char **synchr_commit, bool *refresh) { ListCell *lc; @@ -85,8 +85,8 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given, } if (copy_data) *copy_data = true; - if (synchronous_commit) - *synchronous_commit = NULL; + if (synchr_commit) + *synchr_commit = NULL; if (refresh) *refresh = true; @@ -150,17 +150,17 @@ parse_subscription_options(List *options, bool *connect, bool *enabled_given, *copy_data = defGetBoolean(defel); } else if (strcmp(defel->defname, "synchronous_commit") == 0 && - synchronous_commit) + synchr_commit) { - if (*synchronous_commit) + if (*synchr_commit) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("conflicting or redundant options"))); - *synchronous_commit = defGetString(defel); + *synchr_commit = defGetString(defel); /* Test if the given value is valid for synchronous_commit GUC. */ - (void) set_config_option("synchronous_commit", *synchronous_commit, + (void) set_config_option("synchronous_commit", *synchr_commit, PGC_BACKEND, PGC_S_TEST, GUC_ACTION_SET, false, 0, false); } @@ -317,7 +317,7 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel) bool enabled_given; bool enabled; bool copy_data; - char *synchronous_commit; + char *synchr_commit; char *conninfo; char *slotname; bool slotname_given; @@ -332,7 +332,7 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel) */ parse_subscription_options(stmt->options, &connect, &enabled_given, &enabled, &create_slot, &slotname_given, - &slotname, ©_data, &synchronous_commit, + &slotname, ©_data, &synchr_commit, NULL); /* @@ -375,8 +375,8 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel) slotname = stmt->subname; /* The default for synchronous_commit of subscriptions is off. */ - if (synchronous_commit == NULL) - synchronous_commit = "off"; + if (synchr_commit == NULL) + synchr_commit = "off"; conninfo = stmt->conninfo; publications = stmt->publication; @@ -407,7 +407,7 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel) else nulls[Anum_pg_subscription_subslotname - 1] = true; values[Anum_pg_subscription_subsynccommit - 1] = - CStringGetTextDatum(synchronous_commit); + CStringGetTextDatum(synchr_commit); values[Anum_pg_subscription_subpublications - 1] = publicationListToArray(publications); @@ -668,11 +668,11 @@ AlterSubscription(AlterSubscriptionStmt *stmt) { char *slotname; bool slotname_given; - char *synchronous_commit; + char *synchr_commit; parse_subscription_options(stmt->options, NULL, NULL, NULL, NULL, &slotname_given, &slotname, - NULL, &synchronous_commit, NULL); + NULL, &synchr_commit, NULL); if (slotname_given) { @@ -690,10 +690,10 @@ AlterSubscription(AlterSubscriptionStmt *stmt) replaces[Anum_pg_subscription_subslotname - 1] = true; } - if (synchronous_commit) + if (synchr_commit) { values[Anum_pg_subscription_subsynccommit - 1] = - CStringGetTextDatum(synchronous_commit); + CStringGetTextDatum(synchr_commit); replaces[Anum_pg_subscription_subsynccommit - 1] = true; }