Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e13a96f

Browse files
knizhnikkelvich
authored andcommitted
#PGPRO-1179 implicitly treat mtm.alter_sequences as remote
1 parent d584aab commit e13a96f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

multimaster.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2546,13 +2546,19 @@ static void MtmInitializeRemoteFunctionsMap()
25462546
}
25472547
clist = FuncnameGetCandidates(stringToQualifiedNameList(p), -1, NIL, false, false, true);
25482548
if (clist == NULL) {
2549-
MTM_ELOG(ERROR, "Failed to lookup function %s", p);
2549+
MTM_ELOG(WARNING, "Failed to lookup function %s", p);
25502550
} else if (clist->next != NULL) {
25512551
MTM_ELOG(ERROR, "Ambigious function %s", p);
2552+
} else {
2553+
hash_search(MtmRemoteFunctions, &clist->oid, HASH_ENTER, NULL);
25522554
}
2553-
hash_search(MtmRemoteFunctions, &clist->oid, HASH_ENTER, NULL);
25542555
p = q;
25552556
} while (p != NULL);
2557+
2558+
clist = FuncnameGetCandidates(stringToQualifiedNameList("mtm.alter_sequences"), -1, NIL, false, false, true);
2559+
if (clist != NULL) {
2560+
hash_search(MtmRemoteFunctions, &clist->oid, HASH_ENTER, NULL);
2561+
}
25562562
}
25572563

25582564
/*
@@ -3211,12 +3217,12 @@ _PG_init(void)
32113217

32123218
DefineCustomStringVariable(
32133219
"multimaster.remote_functions",
3214-
"List of fnuction names which should be executed remotely at all multimaster nodes instead of executing them at master and replicating result of their work",
3220+
"List of function names which should be executed remotely at all multimaster nodes instead of executing them at master and replicating result of their work",
32153221
NULL,
32163222
&MtmRemoteFunctionsList,
32173223
"lo_create,lo_unlink",
32183224
PGC_USERSET, /* context */
3219-
GUC_LIST_INPUT | GUC_LIST_QUOTE, /* flags */
3225+
GUC_LIST_INPUT, /* flags */
32203226
NULL, /* GucStringCheckHook check_hook */
32213227
MtmSetRemoteFunction, /* GucStringAssignHook assign_hook */
32223228
NULL /* GucShowHook show_hook */

0 commit comments

Comments
 (0)