PostgreSQL Internals Mind Map

Algorithm & Systems Visualizations

Every PostgreSQL internals visualization on this site on one map. The branches are the main ideas. Each leaf is a page; the grey line under it is the one thing to remember about it. Click a branch to focus on it, click a page to open it.

Recall mode hides the page names. Read the hint, say the name, then click the "?" to check.

1. How the map is organized

Overview of the PostgreSQL internals mind map: Processes and memory, Table storage, MVCC and concurrency, WAL and replication, Indexes and scans, Planner and executor.
The map at a glance: 6 branches, 20 pages.

Ask what part of the server a page is about:

  • Running processes and RAM? That is processes and memory.
  • Bytes in the table files? Pages, big values and the two side maps are table storage.
  • Which row version a transaction may see or change? That is MVCC and concurrency. Surviving a crash or copying changes elsewhere is WAL and replication.
  • How a query finds rows? Index kinds and scan methods are indexes and scans.

2. The branches side by side

BranchKey structureTuned by
Processes and memorybackends, shared buffersmax_connections, shared_buffers
Table storage8 KB heap page, TOAST table, FSM/VM forksfillfactor, VACUUM
MVCC and concurrencyxmin/xmax, CLOG, lock tableisolation level, autovacuum freeze
WAL and replicationWAL records with LSNsmax_wal_size, wal_level
Indexes and scansindex AMs, TID bitmap, workerswork_mem, parallel workers

3. Five facts to remember

  • An UPDATE writes a new tuple version; the old one stays until VACUUM removes it.
  • Each connection is its own OS process, forked by the postmaster.
  • A row is visible if its xmin committed before your snapshot and its xmax did not.
  • Transaction IDs are 32 bits, so old rows must be frozen before the counter wraps around.
  • A change is durable once its WAL record is flushed; data pages are written later, at checkpoints or by the background writer.

See all PostgreSQL internals pages in the index, or the other mind maps.