Skip to content

Commit 0c48543

Browse files
committed
Merge branch 'master' of github.com:postgrespro/postgres_cluster
2 parents 2ca51b4 + 757c245 commit 0c48543

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

contrib/mmts/multimaster.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,20 +2165,21 @@ Datum mtm_dump_lock_graph(PG_FUNCTION_ARGS)
21652165
{
21662166
size_t size;
21672167
char *data = RaftableGet(psprintf("lock-graph-%d", i+1), &size, NULL, true);
2168-
if (!data) continue;
2169-
GlobalTransactionId *gtid = (GlobalTransactionId *)data;
2170-
GlobalTransactionId *last = (GlobalTransactionId *)(data + size);
2171-
appendStringInfo(s, "node-%d lock graph: ", i+1);
2172-
while (gtid != last) {
2173-
GlobalTransactionId *src = gtid++;
2174-
appendStringInfo(s, "%d:%d -> ", src->node, src->xid);
2175-
while (gtid->node != 0) {
2176-
GlobalTransactionId *dst = gtid++;
2177-
appendStringInfo(s, "%d:%d, ", dst->node, dst->xid);
2168+
if (data) {
2169+
GlobalTransactionId *gtid = (GlobalTransactionId *)data;
2170+
GlobalTransactionId *last = (GlobalTransactionId *)(data + size);
2171+
appendStringInfo(s, "node-%d lock graph: ", i+1);
2172+
while (gtid != last) {
2173+
GlobalTransactionId *src = gtid++;
2174+
appendStringInfo(s, "%d:%d -> ", src->node, src->xid);
2175+
while (gtid->node != 0) {
2176+
GlobalTransactionId *dst = gtid++;
2177+
appendStringInfo(s, "%d:%d, ", dst->node, dst->xid);
2178+
}
2179+
gtid += 1;
21782180
}
2179-
gtid += 1;
2181+
appendStringInfo(s, "\n");
21802182
}
2181-
appendStringInfo(s, "\n");
21822183
}
21832184
return CStringGetTextDatum(s->data);
21842185
}

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