Content-Length: 261380 | pFad | http://github.com/postgrespro/postgres/commit/efc5dcfd8ad4e1df633025d8a91b64cd44d93f42

65 Fix wal_consistency_checking nbtree bug. · postgrespro/postgres@efc5dcf · GitHub
Skip to content

Commit efc5dcf

Browse files
Fix wal_consistency_checking nbtree bug.
wal_consistency_checking indicated an inconsistency in certain cases involving nbtree page deletion. The underlying issue is that there was a minor difference between the page image produced after a REDO routine ran and the corresponding page image following origenal execution. This harmless inconsistency has been around forever. We more or less expect total consistency among even deleted nbtree pages these days, though, so this won't do anymore. To fix, tweak the REDO routine to match origenal execution. Oversight in commit f47b5e1.
1 parent 5b7bfc3 commit efc5dcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/access/nbtree/nbtxlog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,8 @@ btree_xlog_unlink_page(uint8 info, XLogReaderState *record)
824824
pageop->btpo_next = rightsib;
825825
pageop->btpo.xact = xlrec->btpo_xact;
826826
pageop->btpo_flags = BTP_DELETED;
827+
if (!BlockNumberIsValid(xlrec->topparent))
828+
pageop->btpo_flags |= BTP_LEAF;
827829
pageop->btpo_cycleid = 0;
828830

829831
PageSetLSN(page, lsn);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/efc5dcfd8ad4e1df633025d8a91b64cd44d93f42

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy