Re: [Proposal] Global temporary tables

From: Prabhat Sahu <prabhat(dot)sahu(at)enterprisedb(dot)com>
To: 曾文旌 <wenjing(dot)zwj(at)alibaba-inc(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(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>
Subject: Re: [Proposal] Global temporary tables
Date: 2020-04-27 09:26:42
Message-ID: CANEvxPooq5GyoHVCw6LSjE5Ntxg+RkjBvyM_8-bJhUHmdsDG7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Wenjing,

Please check the below scenario shows different error message with "DROP
TABLE gtt;" for gtt with and without index.

*-- Session1:*postgres=# create global temporary table gtt1 (c1 int);
CREATE TABLE
postgres=# create global temporary table gtt2 (c1 int);
CREATE TABLE
postgres=# create index idx2 on gtt2(c1);
CREATE INDEX

*-- Session2:*postgres=# drop table gtt1;
ERROR: can not drop relation gtt1 when other backend attached this global
temp table
postgres=# drop table gtt2;
ERROR: can not drop index gtt2 when other backend attached this global
temp table.

--

With Regards,
Prabhat Kumar Sahu
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message 曾文旌 2020-04-27 09:45:28 Re: [Proposal] Global temporary tables
Previous Message Kyotaro Horiguchi 2020-04-27 09:21:07 Re: [BUG] non archived WAL removed during production crash recovery