A PostgreSQL heap tuple cannot exceed the 8KB page, yet a single text or jsonb column can hold up to 1GB. TOAST is the trick. When a row would cross the 2KB threshold, PostgreSQL compresses its variable-length columns, slices the survivors into chunks, and stores them in a companion pg_toast_<oid> relation, leaving an 18-byte pointer behind on the main heap.
Three scenarios step through it one statement at a time: values of growing size until they leave the row, one 3.4 kB value under each storage strategy (EXTENDED, EXTERNAL, MAIN, PLAIN), and an UPDATE whose old chunks stay dead until VACUUM. Free play has every control, including the compression method (pglz, lz4). Click any row for its TOAST pointer, or any chunk for its row in pg_toast.