Re: cleanup of pg_temp schemas - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: cleanup of pg_temp schemas
Date
Msg-id 20050126155811.GI23796@svana.org
Whole thread Raw
In response to cleanup of pg_temp schemas  ("Marcel Gsteiger" <Marcel.Gsteiger@milprog.ch>)
List pgsql-general
On Wed, Jan 26, 2005 at 02:28:46PM +0100, Marcel Gsteiger wrote:
> Hi all,
>
> My PostgreSQL app uses temporary tables. After some time, my database
> shows lots of pg_temp_xxx schemas with no data inside. I tried to do
> a vacuum full analyze to get rid of them, but they still persisted.

In general there will be up to one for each possible connection. So if
you are setup for 50 simultaneous connection, you could have up to 50
pg_temp_xxx schemas.

> Who takes care for removing these schemas? Can I safely ignore them,
> or do I have to clean them up periodically? How should this be done
> preferably?

Why remove them? Next time somebody creates a temp table it gets
created again. They get emptied so it's not like they take up space...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: "Max"
Date:
Subject: Splitting queries across servers
Next
From: "Frank D. Engel, Jr."
Date:
Subject: Export a column in a view without "announcing" it?