Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 0111B2E003B for ; Sun, 11 May 2008 14:09:57 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 20465-07 for ; Sun, 11 May 2008 14:09:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by developer.postgresql.org (Postfix) with ESMTP id 2F0A02E0038 for ; Sun, 11 May 2008 14:09:50 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m4BH9m9a020554; Sun, 11 May 2008 13:09:48 -0400 (EDT) To: "James Farrugia" cc: pgsql-admin@postgresql.org Subject: Re: Orphan TOAST object In-reply-to: <8d01be800805110946r792efacdp3dbe02829b6da7a9@mail.gmail.com> References: <8d01be800805110946r792efacdp3dbe02829b6da7a9@mail.gmail.com> Comments: In-reply-to "James Farrugia" message dated "Sun, 11 May 2008 18:46:23 +0200" Date: Sun, 11 May 2008 13:09:48 -0400 Message-ID: <20553.1210525788@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/82 X-Sequence-Number: 29166 "James Farrugia" writes: > I wonder whether any of you can help me out with this problem. What PG version is this? > To get vacuum the TOAST object we created a temporary table foo (col1 > char(1)) and assigned its reltoastrelid (up till now set to 0) to > pg_toast_35027430's OID and then vacuumed foo. The plan worked and > immediately age(datfrozenxid) in pg_database reflected a much younger XID. > We then decided to get rid of pg_toast_35027430 by dropping foo. Foo > disappeared but pg_toast_35027430 persisted. Well, yeah, because you didn't create a pg_depend link. We have seen a couple prior reports of toast tables not going away when their parent was dropped, but nobody's been able to create a reproducible case yet. The most likely idea is probably that pg_depend got corrupted somehow, causing the toast table not to get found by DROP. Can you find any rows in pg_depend having objid equal to the OID of pg_toast_35027430? Try reindexing pg_depend and then see if you find any. regards, tom lane