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

Commit4696afa

Browse files
committed
2 parents463c1bc +8652d7c commit4696afa

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

‎contrib/mmts/multimaster.c‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,9 +2247,10 @@ static void MtmBroadcastUtilityStmt(char const* sql, bool ignoreError)
22472247
}
22482248
if (!MtmRunUtilityStmt(conns[i],sql,&utility_errmsg)&& !ignoreError)
22492249
{
2250-
// errorMsg = "Failed to run command at node %d";
2251-
// XXX: add check for our node
2252-
errorMsg=utility_errmsg;
2250+
if (i+1==MtmNodeId)
2251+
errorMsg=utility_errmsg;
2252+
else
2253+
errorMsg="Failed to run command at node %d";
22532254

22542255
failedNode=i;
22552256
break;
@@ -2454,6 +2455,23 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
24542455
skipCommand=stmt->relation->relpersistence==RELPERSISTENCE_TEMP;
24552456
}
24562457
break;
2458+
caseT_IndexStmt:
2459+
{
2460+
Oidrelid;
2461+
Relationrel;
2462+
IndexStmt*stmt= (IndexStmt*)parsetree;
2463+
boolisTopLevel= (context==PROCESS_UTILITY_TOPLEVEL);
2464+
2465+
if (stmt->concurrent)
2466+
PreventTransactionChain(isTopLevel,
2467+
"CREATE INDEX CONCURRENTLY");
2468+
2469+
relid=RelnameGetRelid(stmt->relation->relname);
2470+
rel=heap_open(relid,ShareLock);
2471+
skipCommand=rel->rd_rel->relpersistence==RELPERSISTENCE_TEMP;
2472+
heap_close(rel,NoLock);
2473+
}
2474+
break;
24572475
default:
24582476
skipCommand= false;
24592477
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp