pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Rostron <mrostron@ql2.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: management of pg-schemas: pg_temp_n and pg_toast_n ?
Date: Sat, 18 Sep 2010 14:50:07 -0400
Message-ID: <16387.1284835807@sss.pgh.pa.us> (raw)
In-Reply-To: <FD020D3E50E7FA479567872E5F5F31E30459FB4D73@ex01.corp.ql2.com>
References: <FD020D3E50E7FA479567872E5F5F31E30459FB4D73@ex01.corp.ql2.com>

Mark Rostron <mrostron@ql2.com> writes:
> We do a lot of work with temp tables here, and over time a lot of pg_temp_[n] schemas have appeared.
> Similarly, we notice build-up of pg_toast_[n] schemas.

This is expected.  There'll be one for each backend slot that's ever
used any temp tables.

> Is it ok to drop these if they contain no tables?

It's risky: you have the race condition that some backend might be just
starting to use a temp schema when you decide to blow away the schema.

It's also pretty pointless, since the schema will just come back again
next time it's needed.  I'd say just ignore the temp schemas.

			regards, tom lane



view thread (2+ messages)

Message-ID: <16387.1284835807@sss.pgh.pa.us>
Permalink:  ../16387.1284835807@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16387.1284835807@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mrostron@ql2.com
  Subject: Re: management of pg-schemas: pg_temp_n and pg_toast_n ?
  In-Reply-To: <16387.1284835807@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox