Re: cleanup of pg_temp schemas

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Marcel Gsteiger <Marcel(dot)Gsteiger(at)milprog(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: cleanup of pg_temp schemas
Date: 2005-01-26 15:58:16
Message-ID: 20050126155811.GI23796@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Max 2005-01-26 16:00:36 Splitting queries across servers
Previous Message Martijn van Oosterhout 2005-01-26 15:49:58 Re: Recursive queries