From 568546f7e46a48c065c631338c0eba1de9264ff1 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Wed, 2 Nov 2022 10:06:55 +0530 Subject: [PATCH] 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 --- src/backend/access/rmgrdesc/standbydesc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/backend/access/rmgrdesc/standbydesc.c b/src/backend/access/rmgrdesc/standbydesc.c index 2dba39e349..4789df886a 100644 --- a/src/backend/access/rmgrdesc/standbydesc.c +++ b/src/backend/access/rmgrdesc/standbydesc.c @@ -33,7 +33,14 @@ standby_desc_running_xacts(StringInfo buf, xl_running_xacts *xlrec) } if (xlrec->subxid_overflow) - appendStringInfoString(buf, "; subxid ovf"); + appendStringInfoString(buf, "; subxid overflowed"); + + if (xlrec->subxcnt > 0) + { + appendStringInfo(buf, "; %d subxacts:", xlrec->subxcnt); + for (i = 0; i < xlrec->subxcnt; i++) + appendStringInfo(buf, " %u", xlrec->xids[xlrec->xcnt + i]); + } } void