Teach TID store to skip bitmap for small numbers of offsets
authorJohn Naylor <john.naylor@postgresql.org>
Mon, 8 Apr 2024 11:38:11 +0000 (18:38 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Mon, 8 Apr 2024 11:47:09 +0000 (18:47 +0700)
commitf35bd9bf359d3d740063997e1cbab9b69df7af99
tree73897cbf0f5703ef37457e58aa34f738e990d323
parentdd1f6b0c172a643a73d6b71259fa2d10378b39eb
Teach TID store to skip bitmap for small numbers of offsets

The header portion of BlocktableEntry has enough padding space for
an array of 3 offsets (1 on 32-bit platforms). Use this space instead
of having a sparse bitmap array. This will take up a constant amount
of space no matter what the offsets are.

Reviewed (in an earlier version) by Masahiko Sawada

Discussion: https://postgr.es/m/CANWCAZYw+_KAaUNruhJfE=h6WgtBKeDG32St8vBJBEY82bGVRQ@mail.gmail.com
Discussion: https://postgr.es/m/CAD21AoBci3Hujzijubomo1tdwH3XtQ9F89cTNQ4bsQijOmqnEw@mail.gmail.com
src/backend/access/common/tidstore.c
src/test/modules/test_tidstore/expected/test_tidstore.out
src/test/modules/test_tidstore/sql/test_tidstore.sql