FOMO Daily
Feed
PlanetScale·

What gets TOASTed in Postgres

DatabasesPostgresTOASTLZ4Compression

TL;DR

Postgres uses TOAST when rows grow beyond roughly 2 KB, compressing variable-length values and moving them to a separate table if needed. Examples show that LZ4 can capture more distant repetitions and runs faster, while pglz can produce smaller results for repetitive JSON—so the best compression choice depends on your data and performance needs.

Read the original post Sign in to mark as read or skip