The pgtt extension, which provides Global Temporary Table (GTT) functionality for PostgreSQL — similar to Oracle and DB2 — has reached version 4.5. This maintenance release focuses on compatibility and stability, addressing user-reported issues and extending support to the latest PostgreSQL version.
Key Changes in pgtt v4.5
- Support for PostgreSQL 19: pgtt v4.5 is now compatible with PG19, ensuring developers can use GTTs on the latest major PostgreSQL release.
- CREATE INDEX CONCURRENTLY support: The extension now allows creating indexes on global temporary tables using
CREATE INDEX CONCURRENTLY, enabling non-blocking index builds for better concurrency. - Fix -Wmissing-variable-declarations warnings: Global variables were made
staticto resolve compiler warnings, improving code quality and portability. - Removed use of
registered relid: The extension no longer relies on the registered relation ID (relid) from the catalog, fixing issues that arose when restoringpgtt_schema.pg_global_temp_tablesfrom a dump — the dump contained invalid OIDs. This fix, reported by sibowu-aws, ensures dump/restore cycles work correctly.
Implications for Developers
For developers using or evaluating global temporary tables in PostgreSQL, pgtt v4.5 brings critical improvements. The PG19 support ensures compatibility with the newest PostgreSQL features and performance enhancements. The CREATE INDEX CONCURRENTLY addition allows building indexes on temporary tables without blocking concurrent writes, which is crucial for high‑throughput workloads that mix DML and DDL on GTTs. The dump/restore fix eliminates a persistent bug that could corrupt GTT metadata during migrations or backups. Overall, this release strengthens pgtt as a production‑ready solution for applications migrating from Oracle/DB2 or needing session‑local temporary tables with shared metadata.
For a complete list of changes, see the changelog.
Source: https://www.postgresql.org/about/news/pgtt-v45-has-been-released-3330/