From dc2e2788799aa92eb4b98855408ccafcf5b6023b Mon Sep 17 00:00:00 2001 From: shihao zhong Date: Sun, 29 Nov 2026 23:17:51 -0500 Subject: [PATCH] Fix BRIN redo of insertion into a missing page Reported-by: Zheng Hacker Discussion: https://postgr.es/m/19909-6bd7fafaead0184c@postgresql.org Backpatch-through: 15 --- src/backend/access/brin/brin_xlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/access/brin/brin_xlog.c b/src/backend/access/brin/brin_xlog.c index a07f1d11dde..0b598633912 100644 --- a/src/backend/access/brin/brin_xlog.c +++ b/src/backend/access/brin/brin_xlog.c @@ -69,7 +69,7 @@ brin_xlog_insert_update(XLogReaderState *record, } /* need this page's blkno to store in revmap */ - regpgno = BufferGetBlockNumber(buffer); + XLogRecGetBlockTag(record, 0, NULL, NULL, ®pgno); /* insert the index item into the page */ if (action == BLK_NEEDS_REDO) -- 2.37.1 (Apple Git-137.1)