Peter Geoghegan <p...@bowt.ie> writes: > On Sun, Jun 23, 2019 at 3:36 AM Thomas Munro <thomas.mu...@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. Yeah. I did some research into the provenance of that comment when Thomas pushed the change. It's *old*. The whole para exists verbatim in Postgres v4r2, src/backend/access/nbtree/nbtpage.c dated 1993-12-10 (in my copy of that tarball). The only change since then has been to change the whitespace for 4-space tabs. Even more interesting, the same para also exists verbatim in v4r2's src/backend/access/nobtree/nobtpage.c, which is dated 1991-10-29 in the same tarball. (If you're wondering, "nobtree" seems to stand for "no-overwrite btree"; so I suppose it went the way of all flesh when Stonebraker lost interest in write-once mass storage.) So presumably this comment dates back to some common ancestor of the mainline btree code and the no-overwrite code, which must have been even older than the 1991 date. This is only marginally relevant to what we should do about it today, but I think it's reasonable to conclude that the current locking considerations are nearly unrelated to what they were when the comment was written. > 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. +1 regards, tom lane