liveBook · Manning

Database page

As explained in Just Use Postgres!

A database page is a fixed-size unit of physical storage that holds multiple database table or index records.

A database page is a fixed-size unit of physical storage that holds multiple table or index records. In PostgreSQL, each page is 8 KB, so a page typically stores dozens of measurement rows rather than one complete record. section 9.7.2

For appended time-series data, rows fill the current page until it has no room; later rows continue in the next available page. Consequently, adjacent pages can contain increasingly later recorded_at values, creating physical correlation that BRIN indexes can exploit. section 9.7.2

Heart-rate measurements across pages

If page 1 contains earlier measurements, PostgreSQL places subsequent rows on page 2 after page 1 fills. Page 2 might therefore have recorded_at values from 1:41 through 3:21, with later pages holding later measurements. section 9.7.2

Figure 9.1 The measurement time (recorded_at column) is always greater in rows added last to the page.
A black and white drawing of a row and row

AI-generated content may be incorrect.

Visualizes how increasingly recent recorded_at values accumulate within a page. section 9.7.2

How Just Use Postgres! covers it

How deep it goes
Defines page size and filling behavior, then connects page locality to BRIN indexes without detailing page internals.
Examples
Uses appended heart-rate measurements, page-by-page timestamp ranges, BRIN creation, index-size output, and query execution plans.
What you can do after
Evaluate how append order and page locality can influence BRIN index suitability and query execution.
How it connects
Connects database pages with table records, time-series data, physical correlation, BRIN indexes, and B-tree indexes.

Also explained in

Compare how 2 books explain database page →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Just Use Postgres!. The section links point to the parts of the book it draws on.