Re: [Proposal] Global temporary tables

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: [Proposal] Global temporary tables
Дата
Msg-id CAFiTN-tWgP1ntdY1JM5kggxrNLZF=sCYZiDBheO6sUYoAoO9NA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [Proposal] Global temporary tables  (wenjing <wjzeng2012@gmail.com>)
Ответы Re: [Proposal] Global temporary tables  (wenjing <wjzeng2012@gmail.com>)
Список pgsql-hackers
On Thu, Apr 22, 2021 at 1:11 PM wenjing <wjzeng2012@gmail.com> wrote:
>

I have briefly looked into the design comments added by the patch.  I
have a few questions.

+Feature description
+--------------------------------
+
+Previously, temporary tables are defined once and automatically
+created (starting with empty contents) in every session before using them.


I don’t think this statement is correct, I mean if we define a temp
table in one session then it doesn’t automatically create in all the
sessions.


+
+Like local temporary table, Global Temporary Table supports ON COMMIT
PRESERVE ROWS
+or ON COMMIT DELETE ROWS clause, so that data in the temporary table can be
+cleaned up or reserved automatically when a session exits or a
transaction COMMITs.

/reserved/preserved


I was trying to look into the “Main design idea” section.

+1) CATALOG
+GTTs store session-specific data. The storage information of GTTs'data, their
+transaction information, and their statistics are not stored in the catalog.

I did not understand what do you mean by “transaction information” is
not stored in the catalog?  Mean what transaction information are
stored in catalog in the normal table which is not stored for GTT?

+Changes to the GTT's metadata affect all sessions.
+The operations making those changes include truncate GTT, Vacuum/Cluster GTT,
+and Lock GTT.

How does Truncate or Vacuum affect all the sessions, I mean truncate
should only truncate the data of the current session and the same is
true for the vacuum no?

I will try to do a more detailed review.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Nitin Jadhav
Дата:
Сообщение: Fix of file path in the file comments
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: seawasp failing, maybe in glibc allocator