[Proposal] Global temporary tables

From: 曾文旌(义从) <wenjing(dot)zwj(at)alibaba-inc(dot)com>
To: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Cc: "Prabhat Sahu" <prabhat(dot)sahu(at)enterprisedb(dot)com>, "Pavel Stehule" <pavel(dot)stehule(at)gmail(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>, 萧少聪(铁庵) <shaocong(dot)xsc(at)alibaba-inc(dot)com>
Subject: [Proposal] Global temporary tables
Date: 2020-03-17 03:44:15
Message-ID: 105EB409-AA82-4B50-B475-B613C67DE315@alibaba-inc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 2020年3月13日 下午8:40,tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> 写道:
>
> On 3/9/20 10:01 PM, 曾文旌(义从) wrote:
>> Fixed in global_temporary_table_v18-pg13.patch.
>
> Thanks Wenjing.
>
> I am getting this error "ERROR: could not open file "base/13589/t3_16440": No such file or directory" if max_active_global_temporary_table set to 0
>
> Please refer this scenario -
>
> postgres=# create global temp table tab1 (n int ) with ( on_commit_delete_rows='true');
> CREATE TABLE
> postgres=# insert into tab1 values (1);
> INSERT 0 1
> postgres=# select * from tab1;
> n
> ---
> (0 rows)
>
> postgres=# alter system set max_active_global_temporary_table=0;
> ALTER SYSTEM
> postgres=# \q
> [tushar(at)localhost bin]$ ./pg_ctl -D data/ restart -c -l logs123
>
> waiting for server to start.... done
> server started
>
> [tushar(at)localhost bin]$ ./psql postgres
> psql (13devel)
> Type "help" for help.
>
> postgres=# insert into tab1 values (1);
> ERROR: could not open file "base/13589/t3_16440": No such file or directory
> postgres=#
Thanks for review
It is a bug, I fixed in global_temporary_table_v20-pg13.patch

Wenjing

Attachment Content-Type Size
global_temporary_table_v20-pg13.patch application/octet-stream 180.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-03-17 03:45:49 Re: error context for vacuum to include block number
Previous Message Michael Paquier 2020-03-17 03:43:51 Re: Re:Standby got fatal after the crash recovery