Skip site navigation (1) Skip section navigation (2)

pgsql: Rename MaxTupleSize to MaxHeapTupleSize to clarify that it's not

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rename MaxTupleSize to MaxHeapTupleSize to clarify that it's not
Date: 2007-02-05 04:22:18
Message-ID: 20070205042218.AA01F9FB1E7@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/access/heap:
        heapam.c (r1.226 -> r1.227)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c.diff?r1=1.226&r2=1.227)
        hio.c (r1.64 -> r1.65)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/hio.c.diff?r1=1.64&r2=1.65)
    pgsql/src/backend/commands:
        vacuum.c (r1.344 -> r1.345)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c.diff?r1=1.344&r2=1.345)
    pgsql/src/include/access:
        htup.h (r1.89 -> r1.90)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/htup.h.diff?r1=1.89&r2=1.90)
        nbtree.h (r1.109 -> r1.110)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/nbtree.h.diff?r1=1.109&r2=1.110)
        tuptoaster.h (r1.31 -> r1.32)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/tuptoaster.h.diff?r1=1.31&r2=1.32)
    pgsql/src/include:
        c.h (r1.217 -> r1.218)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/c.h.diff?r1=1.217&r2=1.218)
    pgsql/src/include/catalog:
        catversion.h (r1.379 -> r1.380)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h.diff?r1=1.379&r2=1.380)

pgsql-committers by date

Next:From: Andrew DunstanDate: 2007-02-05 15:22:18
Subject: pgsql: Pass modern COPY syntax to backend, since copy (query) does not
Previous:From: Tom LaneDate: 2007-02-04 20:00:49
Subject: pgsql: Don't MAXALIGN in the checks to decide whether a tuple is over

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group