Re: [Proposal] Global temporary tables

From: 曾文旌 <wenjing(dot)zwj(at)alibaba-inc(dot)com>
To: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Prabhat Sahu <prabhat(dot)sahu(at)enterprisedb(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, "蔡松露(子嘉)" <zijia(at)taobao(dot)com>, "Cai, Le" <le(dot)cai(at)alibaba-inc(dot)com>, "萧少聪(铁庵)" <shaocong(dot)xsc(at)alibaba-inc(dot)com>
Subject: Re: [Proposal] Global temporary tables
Date: 2020-04-09 12:58:02
Message-ID: 059DA2CC-0A06-4141-AFA1-6FFAA4C04340@alibaba-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 2020年4月9日 下午7:46,tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> 写道:
>
> On 4/7/20 2:27 PM, 曾文旌 wrote:
>> Vacuum full GTT, cluster GTT is already supported in global_temporary_table_v24-pg13.patch.
>
> Hi Wenjing,
>
> Please refer this scenario , where reindex message is not coming next time ( after reconnecting to database) for GTT
>
> A)
> --normal table
> postgres=# create table nt(n int primary key);
> CREATE TABLE
> --GTT table
> postgres=# create global temp table gtt(n int primary key);
> CREATE TABLE
> B)
> --Reindex , normal table
> postgres=# REINDEX (VERBOSE) TABLE nt;
> INFO: index "nt_pkey" was reindexed
> DETAIL: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
> REINDEX
> --reindex GTT table
> postgres=# REINDEX (VERBOSE) TABLE gtt;
> INFO: index "gtt_pkey" was reindexed
> DETAIL: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
> REINDEX
> C)
> --Reconnect to database
> postgres=# \c
> You are now connected to database "postgres" as user "tushar".
> D) again perform step B)
>
> postgres=# REINDEX (VERBOSE) TABLE nt;
> INFO: index "nt_pkey" was reindexed
> DETAIL: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
> REINDEX
> postgres=# REINDEX (VERBOSE) TABLE gtt; <-- message not coming
> REINDEX
Yes , Since the newly established connection is on the db, the GTT store file is not initialized, so there is no info message.

>
> --
> regards,tushar
> EnterpriseDB https://www.enterprisedb.com/
> The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-04-09 13:04:02 Re: DETACH PARTITION and FOR EACH ROW triggers on partitioned tables
Previous Message 曾文旌 2020-04-09 12:56:17 Re: [Proposal] Global temporary tables