Re: management of pg-schemas: pg_temp_n and pg_toast_n ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: management of pg-schemas: pg_temp_n and pg_toast_n ?
Дата
Msg-id 16387.1284835807@sss.pgh.pa.us
обсуждение исходный текст
Ответ на management of pg-schemas: pg_temp_n and pg_toast_n ?  (Mark Rostron <mrostron@ql2.com>)
Список 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Mark Rostron
Дата:
Сообщение: management of pg-schemas: pg_temp_n and pg_toast_n ?
Следующее
От: Dinesh Bhandary
Дата:
Сообщение: Re: files under pg_clog directories are missing