Re: [PROPOSAL] Drop orphan temp tables in single-mode

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PROPOSAL] Drop orphan temp tables in single-mode
Дата
Msg-id 8593.1551969588@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PROPOSAL] Drop orphan temp tables in single-mode  (Arthur Zakirov <a.zakirov@postgrespro.ru>)
Ответы Re: [PROPOSAL] Drop orphan temp tables in single-mode
Список pgsql-hackers
Arthur Zakirov <a.zakirov@postgrespro.ru> writes:
> In some cases if PostgreSQL encounters with wraparound PostgreSQL might 
> leave created temporary tables even after shutdown.
> This orphan temporary tables prevent VACUUM to fix wraparound. It is 
> because in single mode VACUUM considers orphan temp tables as temp 
> tables of other backends.

Hm.

> This patch fixes the issue. With it VACUUM deletes orphaned tables in 
> single mode.

This seems like an astonishingly bad idea.  Nobody would expect DROP TABLE
to be spelled "VACUUM", and the last thing we need when someone has been
forced to use single-user mode is to put additional land mines under their
feet.  They might, for example, wish to do forensic investigation on such
tables to discover the reason for a crash.

I wonder if a better response would be, in single-user mode, to allow temp
tables to be processed as local temp tables regardless of their backend
number.  (Everywhere, not just in VACUUM.)

Also, if what someone actually wants is to drop such a temp table from
single-user mode, we should make sure that they are allowed to do so.
But the command for doing that should be "DROP TABLE", not "VACUUM".

            regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Protect syscache from bloating with negative cache entries
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Protect syscache from bloating with negative cache entries