Re: Leftover TEMPORARY tables?

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

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-04-24 13:49:43 Re: Leftover TEMPORARY tables?
Previous Message Tom Lane 2003-04-24 13:28:49 Re: Leftover TEMPORARY tables?