X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 82841476358 for ; Thu, 24 Apr 2003 09:49:43 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 7E0D1476350 for ; Thu, 24 Apr 2003 09:49:40 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3ODnhU6013233; Thu, 24 Apr 2003 09:49:43 -0400 (EDT) To: Jeff Boes Cc: pgsql-admin@postgresql.org Subject: Re: Leftover TEMPORARY tables? In-reply-to: <1051191606.26849.8.camel@takin.private.nexcerpt.com> References: <10774.1051156267@sss.pgh.pa.us> <1051191606.26849.8.camel@takin.private.nexcerpt.com> Comments: In-reply-to Jeff Boes message dated "24 Apr 2003 09:40:06 -0400" Date: Thu, 24 Apr 2003 09:49:43 -0400 Message-ID: <13232.1051192183@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES 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/330 X-Sequence-Number: 8485 Jeff Boes writes: > On Wed, 2003-04-23 at 23:51, Tom Lane wrote: >> In theory, never. Do you have frequent backend crashes? > 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. Yeah, if a backend crashes then there is no mechanism that can cause its temp tables to go away (before 7.3 anyway). Also, because a crash in one backend is a crash in all, thanks to the postmaster's scorched-earth approach to crash recovery, you could be leaking temp tables from backends that didn't have anything directly to do with the crash. So I think the above observation explains your leaked temp tables. But a backend crash every two weeks is too often for my taste. Have you tried to gather any more info about the crashes? A stack backtrace from the core dump would be valuable information. (If you don't get core dumps, it's probably because the postmaster is started under "ulimit -c 0", which is the default setting on far too many Unixen. Try putting "ulimit -c unlimited" into the script that starts the postmaster.) regards, tom lane