pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
management of pg-schemas: pg_temp_n and pg_toast_n ? 2+ messages / 2 participants [nested] [flat]
* management of pg-schemas: pg_temp_n and pg_toast_n ? @ 2010-09-18 18:41 Mark Rostron <mrostron@ql2.com> 0 siblings, 1 reply; 2+ messages in thread From: Mark Rostron @ 2010-09-18 18:41 UTC (permalink / raw) To: pgsql-admin This is occurring In an 8.4.2 pg database, and I have noticed it in 8.3.10 as well. 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. Is it ok to drop these if they contain no tables? Or is there a way to prevent them from persisting past a given life-time?? Mr ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: management of pg-schemas: pg_temp_n and pg_toast_n ? @ 2010-09-18 18:50 Tom Lane <tgl@sss.pgh.pa.us> parent: Mark Rostron <mrostron@ql2.com> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2010-09-18 18:50 UTC (permalink / raw) To: Mark Rostron <mrostron@ql2.com>; +Cc: pgsql-admin 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-09-18 18:50 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2010-09-18 18:41 management of pg-schemas: pg_temp_n and pg_toast_n ? Mark Rostron <mrostron@ql2.com> 2010-09-18 18:50 ` Tom Lane <tgl@sss.pgh.pa.us>
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