Cope with smaller-than-normal BLCKSZ setting in SPGiST indexes on text.
authorTom Lane <[email protected]>
Tue, 26 Jun 2012 18:36:29 +0000 (14:36 -0400)
committerTom Lane <[email protected]>
Tue, 26 Jun 2012 18:36:29 +0000 (14:36 -0400)
commit00e5844592a8c51ceee1682013b94ac50031a9ac
treee61a50384d5c65c5faee9e633be6327fbf8f2070
parent2b79c6ffcfd586667c60d04b5df69695915c4ee2
Cope with smaller-than-normal BLCKSZ setting in SPGiST indexes on text.

The original coding failed miserably for BLCKSZ of 4K or less, as reported
by Josh Kupershmidt.  With the present design for text indexes, a given
inner tuple could have up to 256 labels (requiring either 3K or 4K bytes
depending on MAXALIGN), which means that we can't positively guarantee no
failures for smaller blocksizes.  But we can at least make it behave sanely
so long as there are few enough labels to fit on a page.  Considering that
btree is also more prone to "index tuple too large" failures when BLCKSZ is
small, it's not clear that we should expend more work than this on this
case.
src/backend/access/spgist/spgtextproc.c