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