Re: Toasted table not deleted when no out of line columns left - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Toasted table not deleted when no out of line columns left
Date
Msg-id 1222205073.7229.8.camel@huvostro
Whole thread Raw
In response to Re: Toasted table not deleted when no out of line columns left  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2008-09-22 at 07:53 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.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





pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 0x1A in control file on Windows
Next
From: Hannu Krosing
Date:
Subject: Re: Toasted table not deleted when no out of line columns left