Skip to content
Theory · PostgreSQL: How Data Is Stored · lesson 1 of 11

Pages and the heap

Page 1 is taken whole off a shelf of pages 0 1 2, each 8 KB, and the new row (1,4) is written into its free space

Imagine the order ledger in a coffee shop's back office. All its pages are the same size and numbered. The clerk never copies out a single line: he takes a whole page off the shelf, writes the entry and puts the page back. He writes a new entry wherever the page has room left, and when there is none, he takes a blank page.

In this lesson

  • The table's files
  • The heap
  • Rows per page
  • Common mistake
  • Key points