v3-0001-Better-gin-pg_waldump.patch

application/octet-stream

Filename: v3-0001-Better-gin-pg_waldump.patch
Type: application/octet-stream
Part: 0
Message: Re: Remove custom redundant full page write description from GIN

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 v3-0001
Subject: Better gin pg_waldump
File+
src/backend/access/rmgrdesc/gindesc.c 12 2
From 99dd310fe8c53d3e400bff68e289c19def832feb Mon Sep 17 00:00:00 2001
From: reshke <reshke@double.cloud>
Date: Mon, 22 Sep 2025 12:47:17 +0000
Subject: [PATCH v3] Better gin pg_waldump

---
 src/backend/access/rmgrdesc/gindesc.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/backend/access/rmgrdesc/gindesc.c b/src/backend/access/rmgrdesc/gindesc.c
index 229675775ff..69994cb4593 100644
--- a/src/backend/access/rmgrdesc/gindesc.c
+++ b/src/backend/access/rmgrdesc/gindesc.c
@@ -150,10 +150,20 @@ gin_desc(StringInfo buf, XLogReaderState *record)
 			/* no further information */
 			break;
 		case XLOG_GIN_UPDATE_META_PAGE:
-			/* no further information */
+			{
+				int32		ntuples;
+				ginxlogUpdateMeta *xlrec = (ginxlogUpdateMeta *) rec;
+				ntuples = xlrec->ntuples;
+				appendStringInfo(buf, "ntuples: %d", ntuples);
+				if (ntuples == 0)
+					appendStringInfo(buf, " prevTail: %u newRightLink: %u",
+								xlrec->prevTail,
+								xlrec->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