Re: Leftover TEMPORARY tables? - Mailing list pgsql-admin

From Tom Lane
Subject Re: Leftover TEMPORARY tables?
Date
Msg-id 13232.1051192183@sss.pgh.pa.us
Whole thread Raw
In response to Re: Leftover TEMPORARY tables?  (Jeff Boes <jboes@nexcerpt.com>)
List pgsql-admin
Jeff Boes <jboes@nexcerpt.com> 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


pgsql-admin by date:

Previous
From: Jeff Boes
Date:
Subject: Re: Leftover TEMPORARY tables?
Next
From: "Mario Alberto Soto Cordones"
Date:
Subject: MAX CONNECTIONS PROBLEM