X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 41C69475CBC for ; Thu, 24 Apr 2003 09:40:06 -0400 (EDT) Received: from yapok.nexcerpt.com (mail.nexcerpt.com [64.147.202.2]) by postgresql.org (Postfix) with ESMTP id 684F4474E42 for ; Thu, 24 Apr 2003 09:40:05 -0400 (EDT) Received: from takin.private.nexcerpt.com (zorro.nexcerpt.com [64.147.202.1]) by yapok.nexcerpt.com (8.11.6/8.11.6) with ESMTP id h3ODe6k24895; Thu, 24 Apr 2003 09:40:06 -0400 Subject: Re: Leftover TEMPORARY tables? From: Jeff Boes To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <10774.1051156267@sss.pgh.pa.us> References: <10774.1051156267@sss.pgh.pa.us> Content-Type: text/plain Organization: Nexcerpt, Inc. Message-Id: <1051191606.26849.8.camel@takin.private.nexcerpt.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 24 Apr 2003 09:40:06 -0400 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-38.6 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/329 X-Sequence-Number: 8484 On Wed, 2003-04-23 at 23:51, Tom Lane wrote: > In theory, never. Do you have frequent backend crashes? Is it possible > that the backend sessions that created these tables are actually still > running? Not "frequent", although I suppose that depends on what you mean. We get this error: The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory. about every 2 weeks or so ... I think that's where the leftover tables come from. The tables persist through a database shutdown and restart. > > If you're quite certain that the sessions that created those tables are > dead, it is safe to issue DROPs against them. I am not sure whether you > have to jump through any hoops to do so though --- the protection > checks against dropping system tables look for "pg_XXX" and so are > likely to mutiny :-(. You might need to run a standalone backend with > the -O command-line switch to get around that protection check. > No, the permissions were no problem: I DROPped them from a superuser account. (I also found out, while doing this on a non-production server, that if you DROP a temporary table that's owned by a LIVE process, you can trigger the aforementioned Postmaster shared memory complaint!) > PG 7.3 handles this scenario a little better, but I take it you haven't > upgraded yet ... Nope, not yet ... -- Jeff Boes vox 269.226.9550 ext 24 Database Engineer fax 269.349.9076 Nexcerpt, Inc. http://www.nexcerpt.com ...Nexcerpt... Extend your Expertise