Skip to content

Commit 45c3a43

Browse files
knizhnikkelvich
authored andcommitted
Fix bug in get_cluster_info
1 parent f947553 commit 45c3a43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

multimaster.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ MtmAdjustOldestXid(TransactionId xid)
460460
MtmTransState *ts = (MtmTransState*)hash_search(MtmXid2State, &xid, HASH_FIND, NULL);
461461
MTM_LOG2("%d: MtmAdjustOldestXid(%d): snapshot=%ld, csn=%ld, status=%d", MyProcPid, xid, ts != NULL ? ts->snapshot : 0, ts != NULL ? ts->csn : 0, ts != NULL ? ts->status : -1);
462462
Mtm->gcCount = 0;
463+
463464
if (ts != NULL) {
464465
oldestSnapshot = ts->snapshot;
465466
Mtm->nodes[MtmNodeId-1].oldestSnapshot = oldestSnapshot;
@@ -486,6 +487,7 @@ MtmAdjustOldestXid(TransactionId xid)
486487
}
487488
}
488489
}
490+
489491
if (MtmUseDtm)
490492
{
491493
if (prev != NULL) {
@@ -2536,7 +2538,6 @@ mtm_get_cluster_info(PG_FUNCTION_ARGS)
25362538
tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);
25372539
PQclear(result);
25382540
PQfinish(conn);
2539-
usrfctx->nodeId += 1;
25402541
SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(tuple));
25412542
}
25422543

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy