Re: Global temporary tables

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Global temporary tables
Date: 2019-11-08 12:43:12
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

As far as both Robert and Pavel think that aspects of using GTT in
parallel queries and at replica should be considered separately.
I have prepared simplest version of the patch for GTT which introduces
minimal differences with current (local) temporary table.
So GTT are stored in private buffers, can not be accessed at replica, in
prepared transactions and parallel queries.
But it supports all existed built-on indexes (hash, nbtree, btrin, git,
gist, spgist) and per-backend statistic.
There are no any DDL limitations for GTT.

Also I have not yet introduced pg_statistic view (as proposed by Pavel).
I afraid that it may break compatibility with some existed extensions
and applications.

Konstantin Knizhnik
Postgres Professional:
The Russian Postgres Company

Attachment Content-Type Size
global_private_temp-5.patch text/x-patch 76.8 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-11-08 12:50:13 Re: SPI refactoring
Previous Message Peter Eisentraut 2019-11-08 12:34:40 Re: Refactor parse analysis of EXECUTE command