Re: Global temporary tables
Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
From: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>,
Craig Ringer <craig@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-11-08T12:43:12Z
Lists: pgsql-hackers
Attachments
- global_private_temp-5.patch (text/x-patch) patch
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: http://www.postgrespro.com The Russian Postgres Company