X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 91DE911F622A for ; Sat, 29 Apr 2006 16:13:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 03390-01-7 for ; Sat, 29 Apr 2006 16:12:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 335FA11F8BC4 for ; Sat, 29 Apr 2006 15:48:29 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3TImPuk025285; Sat, 29 Apr 2006 14:48:27 -0400 (EDT) To: Warren Little cc: pgsql-admin@postgresql.org Subject: Re: questions on toast tables In-reply-to: <1146321258.4995.22.camel@wjlnotebook> References: <1146240597.9528.17.camel@wlittle.meridias.local> <15655.1146254635@sss.pgh.pa.us> <1146315175.4995.15.camel@wjlnotebook> <1146321258.4995.22.camel@wjlnotebook> Comments: In-reply-to Warren Little message dated "Sat, 29 Apr 2006 08:34:18 -0600" Date: Sat, 29 Apr 2006 14:48:25 -0400 Message-ID: <25284.1146336505@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/361 X-Sequence-Number: 21530 Warren Little writes: > Could this be the reference to the toast table that is preventing the > vacuum from deleting the toast data? And what purges "dropped" columns > if not a full vacuum. Actually, the way that toast references work is that they'll go away at the next update of the row containing the reference. The reason you've still got a pile of unremovable toast data is evidently that a lot of the parent table's rows have remained untouched since the wide bytea column existed. (We choose not to do this housekeeping immediately during DROP COLUMN, but to defer it until the next row update.) One way to clean up the junk would be to do a trivial full-table update ("UPDATE foo SET f1 = f1") and then VACUUM FULL, but there are other ways that are more efficient. If you're using a PG version released within the last year, CLUSTER will do the job nicely. regards, tom lane