Re: Toasted table not deleted when no out of line columns left

From: Hans-Jürgen Schönig <hs(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zoltan Boszormenyi <zb(at)cybertec(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Toasted table not deleted when no out of line columns left
Date: 2008-09-21 20:02:43
Message-ID: FF16C486-BB9C-40E7-998E-8F9631599CCE@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>

*snip*

>> Judging from that, the toasted table
>> cleanup may be part of ALTER TABLE DROP COLUMN.
>
> That would only help if you were dropping the last potentially-
> toastable
> column of a table. And implementing it would require introducing
> weird
> corner cases into the tuple toaster, because it might now come across
> TOAST pointers that point to a no-longer-existent table, and have to
> consider that to be a no-op instead of an error condition.
>
> regards, tom lane

tom,

in our test case we had a table with 10 integer columns (nothing else)
along with a 10 gb toast table - this is why we were a little surprised.
in this case it can definitely be cleaned up.
it is clear that we definitely don't want to change columns directly
here when a column is dropped. - however, if there is not a single
toastable column left, we should definitely clean up.
we will compile a patch within the next days to cover this case.

many thanks,

hans

--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: www.postgresql-support.de

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Koterov 2008-09-21 20:03:23 Re: Predictable order of SQL commands in pg_dump
Previous Message Tom Lane 2008-09-21 19:57:22 Re: Predictable order of SQL commands in pg_dump