Re: [Proposal] Global temporary tables

Adam Brusselback <adambrusselback@gmail.com>

From: Adam Brusselback <adambrusselback@gmail.com>
To: Wenjing Zeng <wjzeng2012@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Pavel Stehule <pavel.stehule@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, wenjing <wenjing@gmail.com>, Andrew Bille <andrewbille@gmail.com>, Tony Zhu <Tony.zhu@ww-it.cn>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-02T18:02:17Z
Lists: pgsql-hackers
>In my observation, very few users require an accurate query plan for
temporary tables to
perform manual analyze.

Absolutely not true in my observations or personal experience. It's one of
the main reasons I have needed to use (local) temporary tables rather than
just materializing a CTE when decomposing queries that are too complex for
Postgres to handle.

I wish I could use GTT to avoid the catalog bloat in those instances, but
that will only be possible if the query plans are accurate.