Re: [Proposal] Global temporary tables - Mailing list pgsql-hackers

From Prabhat Sahu
Subject Re: [Proposal] Global temporary tables
Date
Msg-id CANEvxPooq5GyoHVCw6LSjE5Ntxg+RkjBvyM_8-bJhUHmdsDG7w@mail.gmail.com
Whole thread Raw
In response to Re: [Proposal] Global temporary tables  (曾文旌 <wenjing.zwj@alibaba-inc.com>)
Responses Re: [Proposal] Global temporary tables  (曾文旌 <wenjing.zwj@alibaba-inc.com>)
List 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

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Concurrency bug in amcheck
Next
From: 曾文旌
Date:
Subject: Re: [Proposal] Global temporary tables