Add commentary explaining why MaxIndexTuplesPerPage calculation is safe

Enterprise / PostgreSQL - Tom Lane [sss.pgh.pa.us] - 14 April 2018 16:33 EDT

MaxIndexTuplesPerPage ignores the fact that btree indexes sometimes store tuples with no data payload. But it also ignores the possibility of "special space" on index pages, which offsets that, so that the result isn't an underestimate. This all seems worth documenting, though.

In passing, remove #define MinIndexTupleSize, which was added by commit 2c03216d8 but not used in that commit nor later ones.

Comment text by me; issue noticed by Peter Geoghegan.

Discussion: https://postgr.es/m/CAH2-WzkQmb54Kbx-YHXstRKXcNc+_87jwV3DRb54xcybLR7Oig@mail.gmail.com

2a67d6440d Add commentary explaining why MaxIndexTuplesPerPage calculation is safe.
src/include/access/itup.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Upstream: git.postgresql.org


  • Share