It turns out that the item size limit for btree indexes is about BLCKSZ/3,

Tom Lane <tgl@sss.pgh.pa.us>

Commit: a6a70315afb4da24a992b2078c46df1d5d19b5c0
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 1999-12-26T03:48:22Z
Releases: 7.1.1
It turns out that the item size limit for btree indexes is about BLCKSZ/3,
not BLCKSZ/2 as some of us thought.  Add check for oversize item so that
failure is detected before corrupting the index, not after.

Files

PathChange+/−
src/backend/access/nbtree/nbtinsert.c modified +44 −26