Re: [Proposal] Global temporary tables

曾文旌 (义从) <wenjing.zwj@alibaba-inc.com>

From: 曾文旌 <wenjing.zwj@alibaba-inc.com>
To: tushar <tushar.ahuja@enterprisedb.com>
Cc: Prabhat Sahu <prabhat.sahu@enterprisedb.com>, Pavel Stehule <pavel.stehule@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Konstantin Knizhnik <k.knizhnik@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, "蔡松露(子嘉)" <zijia@taobao.com>, "Cai, Le" <le.cai@alibaba-inc.com>
Date: 2020-04-21T06:19:24Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. PageAddItemExtended(): Add LP_UNUSED assertion.

  2. Remove temporary files after backend crash

  3. Fix comment in indexing.c

  4. Fix failure to ignore leftover temp tables after a server crash.

Attachments


> 2020年4月20日 下午9:15,tushar <tushar.ahuja@enterprisedb.com> 写道:
> 
> On 4/20/20 2:59 PM, 曾文旌 wrote:
>> Please check my new patch.
> 
> Thanks Wenjing. Please refer this below scenario , getting error -  ERROR:  could not read block 0 in file "base/16466/t4_16472": read only 0 of 8192 bytes
> 
> Steps to reproduce
> 
> Connect to psql terminal,create a table ( create global temp table t2 (n int primary key ) on commit delete rows;)
> exit from psql terminal and execute (./clusterdb -t t2 -d postgres -v)
> connect to psql terminal and one by one execute these below sql statements
> (
> cluster verbose t2 using t2_pkey;
> cluster verbose t2 ;
> alter table t2 add column i int;
> cluster verbose t2 ;
> cluster verbose t2 using t2_pkey;
> create unique index ind on t2(n);
> create unique index concurrently  ind1 on t2(n);
> select * from t2;
> )
> This last SQL - will throw this error -  - ERROR:  could not read block 0 in file "base/16466/t4_16472": read only 0 of 8192 bytes
Fixed in global_temporary_table_v29-pg13.patch
Please check.



Wenjing