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

From Tomas Vondra
Subject Re: [Proposal] Global temporary tables
Date
Msg-id 20200106110119.zfrg2m5e2q5mvi5v@development
Whole thread Raw
In response to Re: [Proposal] Global temporary tables  ("曾文旌(义从)" <wenjing.zwj@alibaba-inc.com>)
Responses Re: [Proposal] Global temporary tables
Re: [Proposal] Global temporary tables
List pgsql-hackers
On Mon, Jan 06, 2020 at 01:04:15PM +0800, 曾文旌(义从) wrote:
>In the previous communication
>
>1 we agreed on the general direction
>1.1 gtt use local (private) buffer
>1.2 no replica access in first version
>

OK, good.

>2 We feel that gtt needs to maintain statistics, but there is no
>agreement on what it will be done.
>

I certainly agree GTT needs to maintain statistics, otherwise it'll lead
to poor query plans. AFAIK the current patch stores the info in a hash
table in a backend private memory, and I don't see how else to do that
(e.g. storing it in a catalog would cause catalog bloat).

FWIW this is a reasons why I think just using shared buffers (instead of
local ones) is not sufficient to support parallel queriesl as proposed
by Alexander. The workers would not know the stats, breaking planning of
queries in PARALLEL SAFE plpgsql functions etc.

>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 suggest we discuss further, reach an agreement, and merge the two patches to one.
>

OK, cool. Thanks for the clarification.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions