Planet PostgreSQL·· 15d agoFeatured
The Hidden Costs of CREATE TEMP TABLE in Postgres 18: Catalog Bloat and LWLock:SInvalWrite
Nikolay Samokhvalov: The hidden costs of CREATE TEMP TABLE: catalog bloat and LWLock:SInvalWrite
Brief · Based on the source excerpt
In Postgres 18, a CTE achieved 23x the TPS of creating a temp table per transaction. With 5000 idle sessions, temp-table DDL reached 127 TPS and 249 TPS in two runs against a 500 TPS target.
Test conditions
The benchmarks quantify the throughput gap when creating a temp table per transaction and how far temp-table DDL falls short of its target with many idle sessions.
Source: Planet PostgreSQL· postgr.es
PG Radar summarizes verified changes and impact. Read the original post for full technical details and code samples.