Skip to content

Commit 3c28fd2

Browse files
committed
Fix description of WAL record XLOG_BTREE_META_CLEANUP
This record uses one metadata buffer and registers some data associated to the buffer, but when parsing the record for its description a direct access to the record data was done, but there is none. This leads usually to an incorrect description, but can also cause crashes like in pg_waldump. Instead, fix things so as the parsing uses the data associated to the metadata block. This is an oversight from 3d92796, so backpatch down to 11. Author: Michael Paquier Description: https://postgr.es/m/20190617013059.GA3153@paquier.xyz Backpatch-through: 11
1 parent 2322456 commit 3c28fd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/access/rmgrdesc/nbtdesc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ btree_desc(StringInfo buf, XLogReaderState *record)
9797
}
9898
case XLOG_BTREE_META_CLEANUP:
9999
{
100-
xl_btree_metadata *xlrec = (xl_btree_metadata *) rec;
100+
xl_btree_metadata *xlrec;
101101

102+
xlrec = (xl_btree_metadata *) XLogRecGetBlockData(record, 0,
103+
NULL);
102104
appendStringInfo(buf, "oldest_btpo_xact %u; last_cleanup_num_heap_tuples: %f",
103105
xlrec->oldest_btpo_xact,
104106
xlrec->last_cleanup_num_heap_tuples);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy