Storage & tuples

fillfactor

Also called: table fillfactor, storage parameter

fillfactor is a per-table (or per-index) setting that tells PostgreSQL how full to pack each page when inserting. At the default 100 it fills pages completely; at 80 it leaves 20% of every page empty on purpose.

What this means

How full to pack each page on insert. At the default 100, Postgres fills pages right up; drop it to 80 and it deliberately leaves a fifth of every page empty. Why leave space? So later HOT updates have room to place the new row version on the same page instead of spilling onto another.

Why it matters operationally

That reserved space is where future updates can place new row versions on the same page, which is exactly the condition for a HOT update. On a heavily-updated table, lowering fillfactor trades a little disk for far less index bloat and far more effective pruning. On append-only tables it gives no benefit and just wastes space.

Related & next

Heap Pruning, why free space on a page enables HOT updatesHeap-Only Tuple, what fillfactor makes possiblePage (data block), the unit fillfactor governs

← All glossary terms · GUC reference · Error catalog