PostgreSQL 19 plans to replace the legacy pglz algorithm with LZ4 as the default compression method for TOAST and heap storage. The database employs a unified compression framework that automatically compresses variable-length types like JSONB and TEXT by default. Index compression remains opportunistic, triggering only when individual keys exceed specific size thresholds rather than compressing every entry.
- LZ4 replaces pglz as the default TOAST compression in Postgres 19 for better performance.
- Compression is automatic for variable-length types including TEXT, VARCHAR, BYTEA, and JSONB.
- A single unified framework manages compression across heap, TOAST, and index storage.
- Index compression is opportunistic and only activates when keys exceed size thresholds.
- Legacy 8kB row limits from Postgres 7.0 have evolved into modern TOAST handling.