Re: What does Page Layout version mean? (Was: Re: Reducing NUMERIC size for 8.3)

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org, Zdenek Kotala <Zdenek.Kotala@Sun.COM>, Andrew Sullivan <ajs@crankycanuck.ca>
Date: 2007-06-21T18:31:16Z
Lists: pgsql-hackers
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> * Page format changes that grow data size are problematic, because there 
> can be pages that can't be expanded to the new format because there's 
> not enough space. However, it would be possible to write a pre-upgrade 
> program to look for the problematic pages, and do a dummy UPDATE on some 
> tuples to move them away from such pages, to make room. The pre-upgrade 
> program could be run while the old database is still up, so it doesn't 
> cause downtime.

That sounds good, but there are corner cases where it wouldn't work ---
consider a page containing a single maximum-length tuple.

In general I don't see us accepting changes that would increase data
size, but there's at least one troubling exception on the horizon:
per-column or per-value locale support.  Another problem is that a strict
rule of "no data size increase ever" might forbid acceptance of changes
that achieve average space savings at the cost of increasing the size of
some lesser-used cases.

In short, this point seems to need more thought.

			regards, tom lane