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

Commit9bacc10

Browse files
committed
temp index fix
1 parent6c1733d commit9bacc10

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

‎multimaster.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,9 +2230,10 @@ static void MtmBroadcastUtilityStmt(char const* sql, bool ignoreError)
22302230
}
22312231
if (!MtmRunUtilityStmt(conns[i],sql,&utility_errmsg)&& !ignoreError)
22322232
{
2233-
// errorMsg = "Failed to run command at node %d";
2234-
// XXX: add check for our node
2235-
errorMsg=utility_errmsg;
2233+
if (i+1==MtmNodeId)
2234+
errorMsg=utility_errmsg;
2235+
else
2236+
errorMsg="Failed to run command at node %d";
22362237

22372238
failedNode=i;
22382239
break;
@@ -2433,6 +2434,27 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
24332434
skipCommand=stmt->relation->relpersistence==RELPERSISTENCE_TEMP;
24342435
}
24352436
break;
2437+
caseT_IndexStmt:
2438+
{
2439+
Oidrelid;
2440+
LOCKMODElockmode;
2441+
Relationrel;
2442+
2443+
IndexStmt*stmt= (IndexStmt*)parsetree;
2444+
lockmode=stmt->concurrent ?ShareUpdateExclusiveLock
2445+
:ShareLock;
2446+
relid=RangeVarGetRelidExtended(stmt->relation,lockmode,
2447+
false, false,
2448+
NULL,// ???
2449+
NULL);
2450+
2451+
rel=heap_open(relid,lockmode);
2452+
2453+
skipCommand=rel->rd_rel->relpersistence==RELPERSISTENCE_TEMP;
2454+
2455+
heap_close(rel,NoLock);
2456+
}
2457+
break;
24362458
default:
24372459
skipCommand= false;
24382460
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp