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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PROPOSAL] Drop orphan temp tables in single-mode
Дата
Msg-id CA+TgmoZZ0qSCaNyRrd1H2mYP8Cjr-+YA--T8ewXTeaH1cpAvYg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PROPOSAL] Drop orphan temp tables in single-mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PROPOSAL] Drop orphan temp tables in single-mode
Список pgsql-hackers
On Thu, Mar 7, 2019 at 9:40 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.)

Since commit debcec7dc31a992703911a9953e299c8d730c778 there is nothing
to prevent two different backends from using the same relfilenode
number, so I don't think this will work.

> 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".

In a way I agree, but I think the reality is that some very large
percentage of people who enter single user mode do so because of a
wraparound-induced shutdown, and what they need is an easy way to get
the system back on line.  Running a catalog query to look for
undropped temp tables and then dropping them one by one using DROP
TABLE is not what they want.  They want to be able to run one or two
commands and get their database back on line.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Alexander Kuzmenkov
Дата:
Сообщение: Re: Optimze usage of immutable functions as relation
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Protect syscache from bloating with negative cache entries