On Thu, Apr 22, 2021 at 1:11 PM wenjing <wjzeng2...@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