Re: Delete temp tables - Mailing list pgsql-general

From Tom Lane
Subject Re: Delete temp tables
Date
Msg-id 28554.972487384@sss.pgh.pa.us
Whole thread Raw
In response to Re: Delete temp tables  ("Vilson farias" <vilson.farias@digitro.com.br>)
List pgsql-general
"Vilson farias" <vilson.farias@digitro.com.br> writes:
> Now why?
> relatorio=#  DROP TABLE "pg_temp.1823.17";
> ERROR:  class "pg_temp.1823.17" is a system catalog

Tables named pg_something are normally system tables, and so there's a
check to prevent you from deleting them.  Perhaps it's being overly
enthusiastic by preventing you from deleting temp tables (comments
anyone?), but in the meantime, you can override the check by starting
the postmaster with -o "-O".

> I really need to erase these tables, because they are not been auto-removed
> after my application crashes. I have more than 100 zombie temp tables in my
> system.

That implies that you're suffering backend crashes, not just application
failures, and should be looked into.

            regards, tom lane

pgsql-general by date:

Previous
From: Rodrigo Castro
Date:
Subject: Postgres with Solaris 2.6
Next
From: KuroiNeko
Date:
Subject: Re: Using pgsql to archive e-mail