Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

PostgreSQL Heap Page Packing Estimate

Estimate fixed-width tuples per heap page including line pointers and alignment.

Computer Systems workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
Formularows/page=floor((page−24)fill/(4+MAXALIGN(tuple)))
Sources and model references

Worked example

Inputs

Page size
8192 bytes
Aligned tuple bytes including tuple header
100 bytes
Target fill fraction
0.9
Row count
1000000

Expected results

Tuples per page
68 tuples
Estimated pages
14706 pages
Estimated heap bytes
120471552 bytes

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter the labeled inputs in the indicated units.
  2. Calculate and compare every output against the stated model assumptions.

Try this example

{
  "page": 8192,
  "tuple": 100,
  "fill": 0.9,
  "rows": 1000000
}

Accuracy and scope

Assumes eight-byte MAXALIGN, 24-byte page header and four-byte item pointers; no TOAST, dead tuples or indexes. Simplified analytical model; not a design recommendation or safety certification.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.