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

Commit 3dde8a3

Browse files
committed
change MyXactAccessedTempRel to MyXactFlags
1 parent 253f710 commit 3dde8a3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

contrib/mmts/multimaster.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5173,7 +5173,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
51735173
pgClassTuple = SearchSysCache1(RELOID, tableOid);
51745174
pgClassStruct = (Form_pg_class) GETSTRUCT(pgClassTuple);
51755175
if (pgClassStruct->relpersistence == 't')
5176-
MyXactAccessedTempRel = true;
5176+
MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPREL;
51775177
ReleaseSysCache(pgClassTuple);
51785178
}
51795179
break;
@@ -5341,7 +5341,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
53415341
}
53425342
else MTM_LOG3("Skip utility statement '%s': skip=%d, insideDDL=%d", queryString, skipCommand, MtmDDLStatement != NULL);
53435343

5344-
prevMyXactAccessedTempRel = MyXactAccessedTempRel;
5344+
prevMyXactAccessedTempRel = MyXactFlags & XACT_FLAGS_ACCESSEDTEMPREL;
53455345

53465346
if (PreviousProcessUtilityHook != NULL)
53475347
{
@@ -5369,9 +5369,10 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
53695369
{
53705370
prevMyXactAccessedTempRel = true;
53715371
}
5372-
MyXactAccessedTempRel = prevMyXactAccessedTempRel;
5372+
if (prevMyXactAccessedTempRel)
5373+
MyXactFlags |= XACT_FLAGS_ACCESSEDTEMPREL;
53735374
}
5374-
if (MyXactAccessedTempRel)
5375+
if (MyXactFlags & XACT_FLAGS_ACCESSEDTEMPREL)
53755376
{
53765377
MTM_LOG1("Xact accessed temp table, stopping replication of statement '%s'", queryString);
53775378
MtmTx.isDistributed = false; /* Skip */

0 commit comments

Comments
 (0)