Core conceptsintermediate

TOAST

The Oversized-Attribute Storage Technique that transparently compresses and/or moves large column values into a side table so main rows stay within a page.

What this means

A row is meant to fit inside one 8 KB page, so what happens when a column holds a whole paragraph or a megabyte of JSON? Postgres quietly compresses the oversized value, and if it's still too big, moves it into a side table and leaves a small pointer in the row. You never see any of this happen, that's the "transparent" part.

Why it matters operationally

TOAST explains why wide text/JSON columns behave differently for storage, compression, and I/O than small scalar columns.

Related errors

Where it lives in the source

src/backend/access/common/toast_internals.c

← All glossary terms · GUC reference · Error catalog