What gets TOASTed in Postgres
Oct 12, 2026Ahmed Darwich

Summary
This post details changes in Postgres 19 regarding TOAST compression, specifically the switch from pglz to LZ4 as the default compression algorithm for TOASTed values. It explains how TOAST works, including its compression and moving out mechanisms, and the role of storage strategies. The post also compares LZ4 and pglz algorithms, their window sizes, and performance characteristics, and discusses the implications of these changes for PlanetScale's managed Postgres service.