Skip to content

Commit 5fc8be1

Browse files
Amit Kapilapull[bot]
authored andcommitted
Improve the description of XLOG_RUNNING_XACTS.
Previously, the description of XLOG_RUNNING_XACTS showed only top-transaction XIDs and whether subtransactions overflowed. This commit improves it to show individual subtransaction XIDs. This also improves the description of overflowed subtransactions. This additional information can be helpful for testing and debugging purposes. Author: Masahiko Sawada Reviewd by: Fujii Masao, Kyotaro Horiguchi, Ashutosh Bapat, Bharath Rupireddy Discussion: https://postgr.es/m/CAD21AoAqvaE+XEeXHHPdAGQPcCoGXxuoeutq_nWhUSQvTt5+tA@mail.gmail.com
1 parent a8221f0 commit 5fc8be1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/backend/access/rmgrdesc/standbydesc.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ standby_desc_running_xacts(StringInfo buf, xl_running_xacts *xlrec)
3333
}
3434

3535
if (xlrec->subxid_overflow)
36-
appendStringInfoString(buf, "; subxid ovf");
36+
appendStringInfoString(buf, "; subxid overflowed");
37+
38+
if (xlrec->subxcnt > 0)
39+
{
40+
appendStringInfo(buf, "; %d subxacts:", xlrec->subxcnt);
41+
for (i = 0; i < xlrec->subxcnt; i++)
42+
appendStringInfo(buf, " %u", xlrec->xids[xlrec->xcnt + i]);
43+
}
3744
}
3845

3946
void

0 commit comments

Comments
 (0)