Re: Leftover TEMPORARY tables?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Leftover TEMPORARY tables?
Дата
Msg-id 10774.1051156267@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Leftover TEMPORARY tables?  (jboes@nexcerpt.com (Jeff Boes))
Ответы Re: Leftover TEMPORARY tables?  (Andrew Biagioni <andrew.biagioni@e-greek.net>)
Re: Leftover TEMPORARY tables?  (Jeff Boes <jboes@nexcerpt.com>)
Список pgsql-admin
jboes@nexcerpt.com (Jeff Boes) writes:
> I just noticed that there are a number of tables in our schema with
> names fo the form pg_temp_*; these correspond to temporary tables
> created by our application, but they shouldn't still exist. Under what
> circumstances would a temporary table become permanent?

In theory, never.  Do you have frequent backend crashes?  Is it possible
that the backend sessions that created these tables are actually still
running?

If you're quite certain that the sessions that created those tables are
dead, it is safe to issue DROPs against them.  I am not sure whether you
have to jump through any hoops to do so though --- the protection
checks against dropping system tables look for "pg_XXX" and so are
likely to mutiny :-(.  You might need to run a standalone backend with
the -O command-line switch to get around that protection check.

PG 7.3 handles this scenario a little better, but I take it you haven't
upgraded yet ...

            regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: point-in-time recovery
Следующее
От: "shreedhar"
Дата:
Сообщение: Re: HOW TO UPGRADE POSTGRES 7.2 TO 7.3 IN RPM FORMAT