Re: Stale temp tables - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Stale temp tables
Date
Msg-id 20020312095310.B28330@svana.org
Whole thread Raw
In response to Re: Stale temp tables  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Stale temp tables  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
On Mon, Mar 11, 2002 at 03:49:22PM -0500, Bruce Momjian wrote:
> Peter Darley wrote:
> > Friends,
> >     I've got a whole bunch (8,000 or so) of old stale temp tables that were the
> > result of a hung backend.  I can see them using pgAdmin II, but not through
> > psql.  Is there any way to dump these guys, should I dump them, are they
> > likely to be causing problems?  What should I do about this?
>
> Wow, that is a good question.  You can stop the postmaster and start the
> 'postgres' binary with the -O option and drop them.  -O is required
> because they are system tables.

Isn't this something VACUUM should be checking for? Assuming that it could
tell if a temporary table was still in use by another backend, it would be
possible for the system to go through the data directory and delete any
temporary tables not in use.
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> If the company that invents a cure for AIDS is expected to make their
> money back in 17 years, why can't we ask the same of the company that
> markets big-titted lip-syncing chicks and goddamn cartoon mice?

pgsql-general by date:

Previous
From: "Jeff Martin"
Date:
Subject: Re: Can't get ODBC from Windows to Linux/Postgres to work
Next
From: Bruce Momjian
Date:
Subject: Re: Stale temp tables