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

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, 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-23 21:24:33
Message-ID: 1222205073.7229.8.camel@huvostro
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2008-09-22 at 07:53 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> > I think the issue is identifying the problem. Reading the title of the
> > post, I think Tom says "no" to *deleting* the toast table. He also says
> > "no" to cleaning the table as part of DROP COLUMN. That still leaves you
> > an opening for an out-of-line command/function to perform a clean,

As i understood the initial post, the situation is even worse for TOAST
tables than for ordinary tables - there is _NO_ way, except cluster or
explicit (CREATE TABLE new AS SELECT + create indexes + drop old table +
rename new to old) to clean up toast. For removing an inline column you
can let a (update pk_id=pk_id limit 1000 ; vacuum) script run in
background for a few weeks and get your space back.

> ... see CLUSTER ...
>
> regards, tom lane

CLUSTER is something, you could use, if you had a mostly idle database
and a lot of time.

On real-life databases where this actually matters, you usually have
neither.

----------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2008-09-23 21:29:34 Re: Toasted table not deleted when no out of line columns left
Previous Message Bruce Momjian 2008-09-23 21:24:31 Re: [HACKERS] 0x1A in control file on Windows