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

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

Heikki Linnakangas napsal(a):
> Zdenek Kotala wrote:
>> Heikki Linnakangas napsal(a):
>>> Zdenek Kotala wrote:
>>>> Just a very quick look on your patch. See my comments:
>>>>
>>>> ...
>>>>
>>>> 2) PG_PAGE_LAYOUT_VERSION should be bump
>>>
>>> The patch doesn't change the page layout AFAICS.
>>>
>>
>> It is good question what is and what is not page layout. I think that
>> toast implementation is a member of page layout. OK it is called page
>> layout but better name should be On Disk Format (ODF). You will not
>> able to read 8.3 toasted table in 8.4.
>
> It's clearly just a catalog change; the number and meaning of attributes
> has changed, and that's reflected in CATALOG_VERSION_NO.

By by opinion it is not only catalog change. Probably you are right that it is
not part of page layout version. However, It changed column meaning on data
tables. You need to convert whole toast table and reindex toast table indext. It
is something what you cannot do online or you can but you need to exclusive lock
on toast table.

> We need to be pragmatic, though, and think about how the conversion
> would work, and if the version number change would help or hurt that
> process. I'm not clear how we would handle the toast table change. If
> we're going to handle it by retoasting all attributes when the main heap
> page is read in, then I suppose we'd actually change the version number
> of the *heap* page, not toast table pages, when the heap page is
> retoasted. However, if you want to do it toast-page at a time, or
> toast-tuple at a time, you can just look at the number of attributes on
> the toast tuple to determine which format it's in.

I'm trying to write down a toast conversion concept. It looks like that
it is more complex that I expected.

> Note that bumping the version number is not free. We haven't made any
> changes in 8.4 this far that would require bumping it. If we do bump it,
> the next version with online-upgrade support will need to deal with it,
> if only to increment and write back the page.

Yes, I know about it. But I'm afraid that 8.3->8.4 in-place upgrade will not work.

Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2008-11-18 15:11:42 Re: Updated posix fadvise patch v19
Previous Message Pavel Stehule 2008-11-18 15:06:00 is any reason why only one columns subselect are allowed in array()?