Re: Re: toast by chunk-end (was Re: PG_PAGE_LAYOUT_VERSION 5 - time for change)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: toast by chunk-end (was Re: PG_PAGE_LAYOUT_VERSION 5 - time for change)
Date: 2008-11-18 15:44:48
Message-ID: 19781.1227023088@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Zdenek Kotala wrote:
>> If I'm thinking more, it is not probably CATALOG_VERSION_NO as well.
>> Because toast table is created on demand. It is not in BKI.

> It's not catversion in the sense that there's no catalog change, but it
> certainly requires a catversion bump due to internal changes.
> Otherwise, developers who have working data directories today will see
> weird errors when they update to a CVS version after this commit.

Yes. The real purpose of catversion is to keep developers from wasting
time using an incompatible data directory.

As far as the point at hand goes: the original discussion about this
assumed that we'd add at least one "identity" column to toast tables,
which would allow the t_natts of a toast tuple to effectively serve
as a version number. So that fixes the problem of how to know what
you are looking at. What it doesn't solve is the problem of how to
know what range of index values to search for in a partial-fetch
operation. If you just scan what would be the expected range of
converted chunk positions, you might miss all the old-format entries.

Anyone have a clue on that?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2008-11-18 16:01:18 Re: TABLE command
Previous Message David Fetter 2008-11-18 15:37:44 Re: is any reason why only one columns subselect are allowed in array()?