pgsql: Add commentary explaining why MaxIndexTuplesPerPage calculation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add commentary explaining why MaxIndexTuplesPerPage calculation
Date: 2018-04-14 16:33:25
Message-ID: E1f7O7B-00082k-K2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add commentary explaining why MaxIndexTuplesPerPage calculation is safe.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2a67d6440db4360efff2078a05bc172ca8f34b2b

Modified Files
--------------
src/include/access/itup.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-04-14 19:38:18 pgsql: Fix enforcement of SELECT FOR UPDATE permissions with nested vie
Previous Message Peter Eisentraut 2018-04-14 14:05:20 pgsql: Improve code comments