Re: Possibly too stringent Assert() in b-tree code
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Antonin Houska <ah@cybertec.at>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-09-19T12:41:25Z
Lists: pgsql-hackers
On Mon, Sep 19, 2016 at 7:07 AM, Amit Kapila <amit.kapila16@gmail.com> wrote: >> Of course, the database could have been corrupted after having encountered >> many crashes during my experiments. Neverthelesss, even without in-depth >> knowledge of the b-tree code I suspect that this stack trace might reflect a >> legal situation. In partcular, if _bt_page_recyclable() returned on this >> condition: >> >> if (PageIsNew(page)) >> return true; >> > > I think you have a valid point. It seems we don't need to write WAL > for reuse page (aka don't call _bt_log_reuse_page()), if the page is > new, as the only purpose of that log is to handle conflict based on > transaction id stored in special area which will be anyway zero. +1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Avoid emitting a bogus WAL record when recycling an all-zero btree page.
- e8fe3bb23003 9.3.24 landed
- d80ec868fa3a 9.4.19 landed
- cfcfbd39b182 11.0 landed
- 7ddac4e8feba 9.5.14 landed
- 59b2dcbf45ab 10.5 landed
- 568995be6703 9.6.10 landed
- 0905fe8911ea 12.0 landed