v2-0002-Better-gin-pg_waldump.patch
application/octet-stream
Filename: v2-0002-Better-gin-pg_waldump.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v2-0002
Subject: Better gin pg_waldump
| File | + | − |
|---|---|---|
| src/backend/access/rmgrdesc/gindesc.c | 11 | 2 |
From b4c5d6a81d29f097196901ff36bda103dd534a6d Mon Sep 17 00:00:00 2001
From: reshke <reshke@double.cloud>
Date: Mon, 22 Sep 2025 12:47:17 +0000
Subject: [PATCH v2 2/6] Better gin pg_waldump
---
src/backend/access/rmgrdesc/gindesc.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/rmgrdesc/gindesc.c b/src/backend/access/rmgrdesc/gindesc.c
index 229675775ff..9d5c944151b 100644
--- a/src/backend/access/rmgrdesc/gindesc.c
+++ b/src/backend/access/rmgrdesc/gindesc.c
@@ -150,10 +150,19 @@ gin_desc(StringInfo buf, XLogReaderState *record)
/* no further information */
break;
case XLOG_GIN_UPDATE_META_PAGE:
- /* no further information */
+ {
+ int32 ntuples;
+ ntuples = ((ginxlogUpdateMeta *) rec)->ntuples;
+ appendStringInfo(buf, "ntuples: %d", ntuples);
+ if (ntuples == 0)
+ appendStringInfo(buf, " prevTail: %d newRightLink: %d",
+ ((ginxlogUpdateMeta *) rec)->prevTail,
+ ((ginxlogUpdateMeta *) rec)->newRightlink);
+ }
break;
case XLOG_GIN_INSERT_LISTPAGE:
- /* no further information */
+ appendStringInfo(buf, "ntuples: %d",
+ ((ginxlogInsertListPage *) rec)->ntuples);
break;
case XLOG_GIN_DELETE_LISTPAGE:
appendStringInfo(buf, "ndeleted: %d",
--
2.43.0