Re: [Proposal] Global temporary tables

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [Proposal] Global temporary tables
Дата
Msg-id CA+TgmoZoKii4b-HHZDWEW8iDme0rB=rfc9O2pZUVA05aM9GXaQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [Proposal] Global temporary tables  ("曾文旌(义从)" <wenjing.zwj@alibaba-inc.com>)
Ответы Re: [Proposal] Global temporary tables  ("曾文旌(义从)" <wenjing.zwj@alibaba-inc.com>)
Список pgsql-hackers
On Wed, Feb 5, 2020 at 8:21 AM 曾文旌(义从) <wenjing.zwj@alibaba-inc.com> wrote:
> What do you mean by "catalog buffer"?
> Yes, cleanup of local temp table requires deletion of correspondent entry from catalog and GTT should not do it.
> But  I am speaking only about cleanup of data files of temp relations. It is done in the same way for local and
globaltemp tables. 
>
> For native pg, the data file of temp table will not be cleaned up direct after oom happen.
> Because the orphan local temp table(include catalog, local buffer, datafile) will be cleaned up by deleting the
orphantemp schame in autovacuum. 
> So for GTT ,we cannot do the same with just deleting data files. This is why I dealt with it specifically.

After a crash restart, all temporary relfilenodes (e.g t12345_67890)
are removed. I think GTTs should use relfilenodes of this general
form, and then they'll be cleaned up by the existing code. For a
regular temporary table, there is also the problem of removing the
catalog entries, but GTTs shouldn't have this problem, because a GTT
doesn't have any catalog entries for individual sessions, just for the
main object, which isn't going away just because the system restarted.
Right?

> In my patch autovacuum is prohibited for GTT.
>
> But vacuum GTT is not prohibited.

That sounds right to me.

This thread is getting very hard to follow because neither Konstantin
nor Wenjing seem to be using the standard method of quoting. When I
reply, I get the whole thing quoted with "> " but can't easily tell
the difference between what Wenjing wrote and what Konstantin wrote,
because both of your mailers are quoting using indentation rather than
"> " and it gets wiped out by my mailer. Please see if you can get
your mailer to do what is normally done on this mailing list.

Thanks,

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



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [Proposal] Global temporary tables
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Is custom MemoryContext prohibited?