Re: [Proposal] Global temporary tables

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: 曾文旌(义从) <wenjing(dot)zwj(at)alibaba-inc(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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: Re: [Proposal] Global temporary tables
Date: 2020-01-10 12:24:34
Message-ID: f462a08d-288b-3c6b-d55b-136f6b442a61@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09.01.2020 19:30, Tomas Vondra wrote:

>
>>
>>>
>>>> 3 Still no one commented on GTT's transaction information
>>>> processing, they include
>>>> 3.1 Should gtt's frozenxid need to be care?
>>>> 3.2 gtt’s clog clean
>>>> 3.3 How to deal with "too old" gtt data
>>>>
>>>
>>> No idea what to do about this.
>>>
>>
>> I wonder what is the specific of GTT here?
>> The same problem takes place for normal (local) temp tables, doesn't it?
>>
>
> Not sure. TBH I'm not sure I understand what the issue actually is.

Just open session, create temporary table and insert some data in it.
Then in other session run 2^31 transactions (at my desktop it takes
about 2 hours).
As far as temp tables are not proceeded by vacuum, database is stalled:

 ERROR:  database is not accepting commands to avoid wraparound data
loss in database "postgres"

It seems to be quite dubious behavior and it is strange to me that
nobody complains about it.
We discuss  many issues related with temp tables (statistic, parallel
queries,...) which seems to be less critical.

But this problem is not specific to GTT - it can be reproduced with
normal (local) temp tables.
This is why I wonder why do we need to solve it in GTT patch.

--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-01-10 12:29:56 Re: Fixing parallel make of libpq
Previous Message Mahendra Singh Thalor 2020-01-10 12:24:21 Re: Assert failure due to "drop schema pg_temp_3 cascade" for temporary tables and \d+ is not showing any info after drooping temp table schema