nbtree: reduce code redundancy by using _bt_getmeta() in _bt_gettrueroot()
Chao Li <li.evan.chao@gmail.com>
From: Chao Li <li.evan.chao@gmail.com>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-01-15T08:10:42Z
Lists: pgsql-hackers
Attachments
- v1-0001-nbtree-deduplicate-metapage-sanity-checks-in-_bt_.patch (application/octet-stream) patch v1-0001
Hi Hackers, I noticed this while reviewing [1]. _bt_gettrueroot() performs the same metapage checks as _bt_getmeta(), so using _bt_getmeta() here removes the duplicated code. Build passed without warning and "make check" passed. [1] https://postgr.es/m/fvfmkr5kk4nyex56ejgxj3uzi63isfxovp2biecb4bspbjrze7@az2pljabhnff Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
Commits
-
Make heap TID a tiebreaker nbtree index column.
- dd299df8189b 12.0 cited