Re: Leftover TEMPORARY tables?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Boes <jboes(at)nexcerpt(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Leftover TEMPORARY tables?
Date: 2003-04-24 13:49:43
Message-ID: 13232.1051192183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jeff Boes <jboes(at)nexcerpt(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Boes 2003-04-24 15:16:59 Rename constraint?
Previous Message Jeff Boes 2003-04-24 13:40:06 Re: Leftover TEMPORARY tables?