Re: [Proposal] Global temporary tables

Поиск
Список
Период
Сортировка
От 曾文旌(义从)
Тема Re: [Proposal] Global temporary tables
Дата
Msg-id E492E671-133E-4B0D-A3D3-F4853EE89108@alibaba-inc.com
обсуждение исходный текст
Ответ на Re: [Proposal] Global temporary tables  (Prabhat Sahu <prabhat.sahu@enterprisedb.com>)
Ответы Re: [Proposal] Global temporary tables  (Robert Haas <robertmhaas@gmail.com>)
Список 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

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.
This is because alter table add column with default value need reindex pk,
reindex need change relfilenode, but GTT is not currently supported.
I make the error message more clearer in global_temporary_table_v19-pg13.patch


Wenjing




--

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


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Georgios Kokolatos
Дата:
Сообщение: Re: Refactor compile-time assertion checks for C/C++
Следующее
От: Roger Harkavy
Дата:
Сообщение: Re: Add A Glossary