Rename MaxTupleSize to MaxHeapTupleSize to clarify that it's not meant to
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Feb 2007 04:22:18 +0000 (04:22 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Feb 2007 04:22:18 +0000 (04:22 +0000)
commitd62376ee9926f1369a1a86a561b388939ff3e100
tree04cc2a55fb606465b5e164b8f268849e1f50d596
parentf8f3171ca761c5652e64f710c8e5929869cdae35
Rename MaxTupleSize to MaxHeapTupleSize to clarify that it's not meant to
describe the maximum size of index tuples (which is typically AM-dependent
anyway); and consequently remove the bogus deduction for "special space"
that was built into it.

Adjust TOAST_TUPLE_THRESHOLD and TOAST_MAX_CHUNK_SIZE to avoid wasting two
bytes per toast chunk, and to ensure that the calculation correctly tracks any
future changes in page header size.  The computation had been inaccurate in a
way that didn't cause any harm except space wastage, but future changes could
have broken it more drastically.

Fix the calculation of BTMaxItemSize, which was formerly computed as 1 byte
more than it could safely be.  This didn't cause any harm in practice because
it's only compared against maxalign'd lengths, but future changes in the size
of page headers or btree special space could have exposed the problem.

initdb forced because of change in TOAST_MAX_CHUNK_SIZE, which alters the
storage of toast tables.
src/backend/access/heap/heapam.c
src/backend/access/heap/hio.c
src/backend/commands/vacuum.c
src/include/access/htup.h
src/include/access/nbtree.h
src/include/access/tuptoaster.h
src/include/c.h
src/include/catalog/catversion.h