TOAST: Where PostgreSQL hides big values

In earlier posts in this series we established that every heap tuple lives inside a strict 8KB page . Everything else is built on top of that hard limit: MVCC , HOT updates , and indexes that point at (page, line_pointer) . And yet this still works: CREATE TABLE docs (id int PRIMARY KEY , body jsonb); INSERT INTO docs VALUES ( 1 , ( SELECT jsonb_agg(g) FROM generate_series ( 1 , 100000 ) g)); That…