Re: Code comment change
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Vik Fearing <vik.fearing@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-07-02T02:03:24Z
Lists: pgsql-hackers
On Sun, Jun 23, 2019 at 3:36 AM Thomas Munro <thomas.munro@gmail.com> wrote: > Pushed. Thanks! I wonder what the comment is supposed to mean. I think that it's addressing the situation prior to commit 70508ba7aed in 2003, which was the point when the "fast" root concept was introduced. Prior to that commit, there was only what we would now call a true root, and _bt_getroot() had to loop to make sure that it reliably found it without deadlocking, while dealing with concurrent splits. This was necessary because the old design also involved maintaining a pointer to each page's parent in each page, which sounds like a seriously bad approach to me. I think that the whole sentence about "the standard class of race conditions" should go. There is no more dance. Nothing in _bt_getroot() is surprising to me. The other comments explain things comprehensively. -- Peter Geoghegan
Commits
-
Remove obsolete nbtree "get root" comment.
- 66c5bd3a6fd8 13.0 landed
-
Remove unnecessary comment.
- 89ff7c08eee3 12.0 landed
-
Make btree index structure adjustments and WAL logging changes needed to
- 70508ba7aed7 7.4.1 cited