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

From 曾文旌(义从)
Subject Re: [Proposal] Global temporary tables
Date
Msg-id 68FC0EB3-8E39-4300-B9ED-036F4163C791@alibaba-inc.com
Whole thread Raw
In response to Re: [Proposal] Global temporary tables  (Prabhat Sahu <prabhat.sahu@enterprisedb.com>)
Responses Re: [Proposal] Global temporary tables  (Prabhat Sahu <prabhat.sahu@enterprisedb.com>)
Re: [Proposal] Global temporary tables  (tushar <tushar.ahuja@enterprisedb.com>)
Re: [Proposal] Global temporary tables  (tushar <tushar.ahuja@enterprisedb.com>)
List pgsql-hackers


2020年3月11日 下午3:52,Prabhat Sahu <prabhat.sahu@enterprisedb.com> 写道:

On Mon, Mar 9, 2020 at 10:02 PM 曾文旌(义从) <wenjing.zwj@alibaba-inc.com> wrote:


Fixed in global_temporary_table_v18-pg13.patch.
Hi Wenjing,
Thanks for the patch. I have verified the previous issues with "gtt_v18_pg13.patch" and those are resolved.
Please find below case:

postgres=# create sequence seq;
CREATE SEQUENCE

postgres=# CREATE GLOBAL TEMPORARY TABLE gtt1(c1 int PRIMARY KEY) ON COMMIT DELETE ROWS;
CREATE TABLE

postgres=# CREATE GLOBAL TEMPORARY TABLE gtt2(c1 int PRIMARY KEY) ON COMMIT PRESERVE ROWS;
CREATE TABLE

postgres=# alter table gtt1 add c2 int default nextval('seq');
ERROR:  cannot reindex global temporary tables

postgres=# alter table gtt2 add c2 int default nextval('seq');
ERROR:  cannot reindex global temporary tables
reindex GTT is already supported

Please check global_temporary_table_v20-pg13.patch


Wenjing




Note: We are getting this error if we have a key column(PK/UNIQUE) in a GTT, and trying to add a column with a default sequence into it.

--

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


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: error context for vacuum to include block number
Next
From: Justin Pryzby
Date:
Subject: Re: error context for vacuum to include block number