Re: pg_upgrade: How to deal with toast

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade: How to deal with toast
Date: 2008-11-20 18:34:52
Message-ID: 4925ADCC.6030307@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian napsal(a):
> Zdenek Kotala wrote:
>> Tom Lane napsal(a):
>>> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>>>> Heikki Linnakangas napsal(a):
>>>>> Perhaps we should just add the new attid attribute to the toast table,
>>>>> but mark it as nullable?
>>>> Hmm, It seems to me as a good idea.
>>> No, it's a really horrid idea. Nullable attributes complicate the C
>>> code, and what in the world are we buying with it anyway? Just decide
>>> what the field should contain and put it in there.
>> The problem what we try to solve is to perform this change during upgrade from
>> 8.3->8.4. Extra value is a problem because it requires extra space and there is
>> not free space. It is temporal solution(hack) for 8.3->8.4.
>
> Once we have the 'require free space' capability in a major Postgres
> release, can't we use that to make space for the new TOAST field we will
> need?
>

The problem is between 8.3 and 8.4. Unfortunately 8.3 does not have this
capability. And if it will be backported then space reservation on toast table
will be too expensive - you need to move one tuple which usually has BLCKSZ/4).

Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-11-20 18:35:38 Re: Autoconf, libpq and replacement function
Previous Message Bruce Momjian 2008-11-20 18:29:13 Re: pg_upgrade: How to deal with toast