WORKINGCHAPTER 10

Write-ahead logging, checkpoints and crash recovery

Every change is written twice, once to a log that is fsynced and once to a page that is not, and recovery is the art of making the second copy agree with the first

55 MINDATABASESUPDATED 2026-11-02
PREDICT

A client runs INSERT ... ; COMMIT; and gets COMMIT back. Ten milliseconds later the machine loses power. The new row's heap page was still dirty in shared_buffers and never reached the disk. With default settings, what happens to the row?

The first chapter of this course gave the rule in one line: log the change, flush the log, then change the page whenever you like. This chapter is how Postgres 17 does that: what a WAL record is, how a commit waits for it, why checkpoints exist and what they cost, and what happens between the crash and “database system is ready to accept connections”. Then you will crash a real server and watch it recover.

The idea, in the simulation

The simulation is a file system journal, not Postgres, but the protocol is the same one. A create touches three blocks. Without a journal a crash between two of the writes leaves the structures disagreeing. With one, the new block images go to the log, then a commit record, then the blocks go to their real home. Run the two journal scenarios and watch which side of the commit record the crash lands on.

▶ SIMULATION
FS (MEMORY)
operation: —
blocks written in place: —
—
DISK
inode bitmap: 1 1 0 0 0 0
inode table: 0:dir 1:file
/ entries: a.txt → 1
JOURNAL
none
commit record: no
crashes: 0
consistencynot checked until the operation finishes or recovery runs
✓ after recovery: every dir entry points at an allocated inode✓ after recovery: every allocated inode is referenced
SCHEDULE
01[FS]create /b.txt: pick free inode (in memory)
02[DISK]write inode bitmap block in place
03[DISK]write inode table block in place
04[DISK]write directory block in place
05[FS]create returns; check the disk
Start of no journal, no crash scenario. 5 steps.
Journaling (write-ahead logging for file system metadata)
===================================================

create /b.txt changes 3 blocks:
  inode bitmap  (mark inode 2 allocated)
  inode table   (initialise inode 2)
  directory     (add "b.txt" -> 2)
The disk writes them one at a time. A crash between them leaves
a leaked inode or a dangling entry, and only fsck can find it.

With a journal:
  1. journal write:  TxBegin + the 3 new block images
  2. journal commit: TxEnd  (wait for 1 to be durable first)
  3. checkpoint:     write the 3 blocks to their real home
  4. free:           mark the transaction done in the journal

Recovery on mount:
  scan the journal
  transaction has TxEnd?  replay its blocks (redo; safe to repeat)
  no TxEnd?               discard it; the disk was never touched

Modes (ext4): journal = data + metadata; ordered (default) =
metadata journaled, data written before the commit; writeback =
metadata only, no ordering for data.
BREAK IT NOT YET

This file system has no journal. Creating /b.txt writes three blocks in place, one at a time. Insert a crash (with reboot) so that the disk is inconsistent after recovery.

GOAL: after reboot, an inode is leaked or an entry dangles

FIX IT NOT YET

Write the mount-time recovery. journal is the log in order: {type:'begin', tx}, {type:'write', tx, block, data}, {type:'commit', tx}. disk maps block names to contents. Replay the writes of every committed transaction in log order, ignore transactions with no commit record, and return the disk.

The sim shows three ideas that carry straight into Postgres. The commit record is the moment of durability: before it is on disk the transaction did not happen, after it the transaction will be finished by replay. Replay is idempotent: applying the same change to a page twice must give the same result as applying it once, because recovery does not know which writes made it. And in-place writes are lazy: nothing waits for them, so a crash can find the data files arbitrarily far behind the log. A database adds two things a file system journal does not need: records for millions of row-level changes rather than a few metadata blocks, and a way to bound how far behind the data files can fall. Those are WAL records and checkpoints.

WAL records and LSNs

Postgres writes WAL as a single sequential stream, split into 16 MB segment files under $PGDATA/pg_wal/. Their names are 24 hex digits: timeline, then the high and low parts of the position, such as 000000010000000000000003. A position in the stream is a log sequence number, a 64-bit byte offset written as two hex halves (0/3A1B2C8). pg_current_wal_lsn() gives the current write position, pg_walfile_name(lsn) names the segment that holds an LSN, and pg_wal_lsn_diff(a, b) gives the distance in bytes. That last function is how you measure “how much WAL did that statement write”.

Each record has a 24-byte header (total length, transaction id, previous record’s LSN, a resource manager id, flags and a CRC-32C) followed by the data. The resource manager says which subsystem’s redo function knows how to replay the record. Heap covers insert, update, delete and HOT update. Btree covers index inserts, splits and deletions. Transaction covers commit and abort. XLOG covers checkpoints and full-page images. There are about twenty more, and pg_waldump --rmgr=list prints them. Records are physiological: physical about which page (the record names a relation, fork and block number) and logical about the change within it (“insert this tuple at line pointer 7”). That keeps them small and lets redo work on a page whose free space is laid out differently.

Every data page carries pd_lsn, the LSN immediately after the last record that changed it. You met that field in the page header in the storage chapter. It does two jobs. First, it enforces the write-ahead rule: before the buffer manager writes a dirty page out, it flushes WAL up to that page’s pd_lsn. Second, it makes replay idempotent: during recovery a record is applied to a page only if the page’s pd_lsn is older than the record. A page that already reached disk with the change on it is skipped.

The commit path

A transaction’s records are first copied into WAL buffers in shared memory. wal_buffers defaults to -1, meaning 1/32 of shared_buffers, at least 64 kB and at most one segment (16 MB). With the default 128 MB of shared buffers that is 4 MB. On COMMIT, the backend writes a commit record and calls XLogFlush on its LSN. That writes the buffers to the segment file and calls fdatasync (the Linux default for wal_sync_method). The flush covers everything up to that LSN, including other sessions’ records, so concurrent commits share one sync. This is group commit, and it is why eight clients can commit far more than eight times as often as one client. commit_delay (default 0 microseconds) makes the flushing backend wait a little for more company, and it only applies when at least commit_siblings (5) other transactions are active.

synchronous_commit chooses what COMMIT waits for. On a single server, two values matter:

value COMMIT waits for a crash can lose
on (default) local WAL flush, plus the synchronous standby’s flush if one is configured nothing that returned success
local local WAL flush only, even if a synchronous standby is configured nothing locally; the standby may lag
remote_write local flush plus the standby’s write to its OS (not its disk) data if the standby’s OS crashes too
remote_apply local flush plus the standby having replayed the commit nothing; reads on the standby see it
off nothing; the WAL writer flushes later commits from the last 3 × wal_writer_delay

With no synchronous_standby_names set, local, remote_write and remote_apply all behave like on. The replication chapter returns to them. off is asynchronous commit. The background WAL writer flushes every wal_writer_delay (200 ms) or every wal_writer_flush_after (1 MB), so the documented worst case is three delays, 600 ms of acknowledged commits. What it does not lose is consistency. Replay stops at the last flushed record and replays in commit order, so if transaction B saw A’s write, you never keep B and lose A. You can set it per transaction (SET LOCAL synchronous_commit = off) for writes you can afford to lose, such as a page-view counter, while payments stay synchronous. DROP TABLE and PREPARE TRANSACTION always commit synchronously.

The cost of on is one fsync per group of commits. That takes 50 to 500 microseconds on an NVMe drive with power-loss protection, a few milliseconds on a cloud network volume, and 5 to 10 ms on a spinning disk. For a single client issuing small transactions in a loop, that is the whole cost of a commit. The lab measures it.

Torn pages and full-page writes

A data page is 8 KB. Many SSDs and file systems write atomically in 4 KB units, and older disks in 512-byte sectors. If power fails while Postgres writes a page, the page on disk can be half old and half new: a torn page. Redo cannot fix it. The record says “insert at line pointer 7”, but the page it would apply to is garbage. A checksum (data_checksums, which initdb enables by default from Postgres 18 but not in 17) would detect the damage and cannot repair it.

The fix is full_page_writes (default on). The first time a page is modified after a checkpoint, the WAL record carries a full-page image (FPI) of the whole page. Redo of that record does not apply a delta. It overwrites the page with the image, so whatever torn state the page was in no longer matters. Later changes to the same page before the next checkpoint log only deltas. Recovery always starts at a checkpoint, so every page it touches begins from an image.

The price is WAL volume. Right after a checkpoint, every page an update touches costs 8 KB of WAL instead of about 100 bytes, so WAL volume per second spikes and then decays until the next checkpoint. pg_stat_wal.wal_fpi counts the images. pg_waldump --stats shows how much of the WAL they are, and on an update-heavy OLTP system the answer is often more than half. wal_compression (off by default; pglz, lz4 or zstd) compresses the images, which trades CPU for typically 2 to 4 times less WAL. Turning full_page_writes off is safe only on storage that guarantees atomic 8 KB writes, such as ZFS with an 8 KB recordsize. Anywhere else it trades a smaller WAL for possible silent corruption after a power cut.

Checkpoints

Without help, WAL would grow forever and recovery would replay it from the day the cluster was created. A checkpoint bounds both. The checkpointer process records a redo point (the current insert LSN), then writes every page that is dirty in shared buffers and fsyncs every data file it wrote. Last, it writes a checkpoint record and updates pg_control with that record’s location. From then on, every change before the redo point is in the data files, so recovery can start there. WAL segments before it can be recycled (renamed for reuse) or removed, unless archiving, a replication slot or wal_keep_size still needs them.

A checkpoint starts when the first of these happens:

  • checkpoint_timeout passes (default 5 min; range 30 s to 1 day)
  • WAL since the last checkpoint approaches max_wal_size (default 1 GB; a soft limit)
  • someone runs CHECKPOINT, or a shutdown, a base backup or the end of recovery asks for one

Writing every dirty page at once would flood the disk. checkpoint_completion_target (default 0.9) paces the writes so the checkpoint finishes at 90% of the expected interval. With a 5-minute timeout, the writes are spread over 4.5 minutes. The I/O still has a shape. The final fsync of every file forces out whatever the kernel was still holding, which can stall the disk for seconds on a large system. And the burst of full-page images right after each checkpoint raises WAL volume and the latency of commits that wait on it. On a dashboard both look like a sawtooth with the checkpoint period.

With log_checkpoints (on by default since Postgres 15), each one logs a line like checkpoint complete: wrote 18234 buffers (13.9%); ... write=269.8 s, sync=1.2 s, total=271.3 s; ... distance=412345 kB, estimate=420001 kB. pg_stat_checkpointer (new in 17; these counters used to live in pg_stat_bgwriter) has num_timed and num_requested. If most checkpoints are requested, max_wal_size is too small for your write rate. The server says so too, with “checkpoints are occurring too frequently” whenever two WAL-triggered checkpoints are closer than checkpoint_warning (30 s).

The trade-off is between steady-state cost and recovery time. Longer intervals and a larger max_wal_size mean fewer checkpoints, fewer full-page images and less write amplification. They also mean more WAL to replay after a crash, more disk for pg_wal, and a longer fsync storm when a checkpoint does finish. Busy production systems commonly run checkpoint_timeout = 15min to 30min with max_wal_size sized so that most checkpoints are timed. That suits a busy system on decent storage and buys a recovery of a minute or two.

Crash recovery

When Postgres starts, it reads pg_control. If the last state was not “shut down” (and not “shut down in recovery”), the server crashed. Recovery then runs in the startup process before any client can connect:

  1. Read the last checkpoint record named in pg_control and take its redo point.
  2. Read WAL forward from the redo point. For each record, open the page it names. If the record carries a full-page image, write the image. Otherwise, if the page’s pd_lsn is older than the record, apply the redo function. If not, skip it.
  3. Stop at the end of valid WAL: the first record whose CRC fails or whose xl_prev does not match. A torn final write is found here and ignored.
  4. Write an end-of-recovery checkpoint and accept connections.

The log shows each stage: “database system was interrupted; last known up at …”, “database system was not properly shut down; automatic recovery in progress”, “redo starts at 0/…”, “redo done at 0/… system usage: … elapsed: 0.84 s”, “checkpoint starting: end-of-recovery immediate wait”, then “database system is ready to accept connections”. Recovery time is roughly the WAL since the redo point divided by the replay rate. Replay is single-threaded and often limited by random reads of pages not in cache, typically 50 to 300 MB/s. A gigabyte of WAL means a few seconds to half a minute of downtime. Twenty gigabytes means minutes.

Notice what is missing: no step undoes anything. A transaction that was in progress at the crash has heap tuples on disk, because its records were replayed, but its xid has no commit record, so pg_xact never marks it committed. Every reader treats its tuples as invisible, and VACUUM reclaims them later. MVCC’s no-overwrite storage removes the need for an undo log. The cost is the dead tuples, which the next chapter on vacuum is about.

The same machinery runs on a replica, which is in permanent recovery and replays WAL streamed from the primary, and in point-in-time recovery, which replays archived WAL up to a chosen moment. The replication and backups chapters build on exactly this loop.

ARIES, the formal model

Postgres’s scheme is a simplified case of ARIES (Mohan et al., 1992), the recovery algorithm behind DB2, SQL Server and, in spirit, InnoDB. ARIES assumes a steal/no-force buffer pool, which is what Postgres has. Steal means a dirty page of an uncommitted transaction may be written to disk. No-force means commit does not write the transaction’s pages. Steal means the disk can hold uncommitted changes, so ARIES needs undo. No-force means the disk can lack committed changes, so it needs redo. Its recovery has three passes:

  • Analysis reads forward from the last checkpoint to rebuild the dirty page table and the set of transactions in progress at the crash.
  • Redo “repeats history”. It reapplies every logged change from the oldest page-dirtying LSN, including the changes of transactions that will be rolled back, using page LSNs to skip what is already on disk. That is the rule you saw above.
  • Undo rolls back the losers in reverse LSN order. Each undo step is itself logged as a compensation log record (CLR) that points at the next record to undo. A crash during undo then never undoes the same change twice, and recovery from a crash during recovery terminates.

Postgres has the first two passes and the page-LSN rule, and replaces the third with MVCC visibility. InnoDB keeps a separate undo log, because it updates rows in place, and its crash recovery does roll back. The transaction theory chapter in module five reads ARIES in full: fuzzy checkpoints, nested top actions, and why repeating history is what makes fine-grained locking recoverable.

What goes wrong

fsync lies. A drive or controller without power-loss protection acknowledges a flush that is still in its volatile cache. Every guarantee above assumes the flush is real. pg_test_fsync reporting 20 000+ syncs per second on a consumer SSD is the warning sign. Buy drives with power-loss protection, or disable the write cache.

pg_wal fills the disk. max_wal_size is soft. A failing archive_command, an abandoned replication slot or a long-running bulk load keeps segments alive, and when the volume fills Postgres PANICs and stops. Watch pg_wal size and pg_replication_slots.wal_status, and set max_slot_wal_keep_size so that a forgotten slot cannot take the database down.

Checkpoints too frequent. A bulk load against a 1 GB max_wal_size checkpoints every few seconds. Each checkpoint restarts the full-page-image cycle, so WAL volume doubles and the load gets slower the faster it goes. The log warning and num_requested tell you.

Recovery longer than the failover timeout. A team raises max_wal_size to 64 GB to smooth checkpoints. After the next crash, the server takes nine minutes to come up, and the HA tool, configured for 60 s, has already promoted a replica and left two primaries. The setting that tunes I/O also tunes your recovery time objective.

LAB Crash Postgres and watch it come back ~40 MIN
YOU NEEDthe labs/databases stack from docs/LABS.md running and loaded (scale 0.1 is enough)two terminals in labs/databasespsql: `docker compose exec db psql -U atlas shop`

The server runs in the db container as the postgres OS user, with its data directory at /var/lib/postgresql/data. pg_waldump and pg_controldata come with the image.

1. Find where the WAL is and how much a statement writes.

SELECT pg_current_wal_lsn() AS lsn, pg_walfile_name(pg_current_wal_lsn()) AS segment;
SHOW wal_buffers; SHOW checkpoint_timeout; SHOW max_wal_size; SHOW synchronous_commit;
CHECKPOINT;
SELECT pg_current_wal_lsn() AS before \gset
UPDATE orders SET total_cents = total_cents WHERE id BETWEEN 1 AND 1000;
SELECT pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), :'before')) AS wal_written;
SELECT pg_current_wal_lsn() AS before \gset
UPDATE orders SET total_cents = total_cents WHERE id BETWEEN 1 AND 1000;
SELECT pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), :'before')) AS wal_written;
An LSN like 0/5C3A1F8 and a 24-digit segment name. The settings show 4MB, 5min, 1GB and on. The first update right after the checkpoint writes several hundred kB of WAL (about 370 kB at either scale). The identical second update writes noticeably less, about two thirds as much (about 250 kB). The difference is full-page images: the first change to each page after a checkpoint, the dozen heap pages and the primary-key leaves these rows touch, logs the whole 8 KB page, and later changes to the same pages log only the new tuples and index entries.

2. Start a transaction, commit another, then crash.

In terminal 1 (psql), leave a transaction open:

BEGIN;
CREATE TABLE crash_probe (n int);
INSERT INTO crash_probe SELECT generate_series(1, 1000);
UPDATE inventory SET on_hand = -999 WHERE product_id = 1;
SELECT pg_current_xact_id() AS uncommitted_xid, pg_current_wal_insert_lsn();

In terminal 2, commit a change and record its transaction id:

docker compose exec db psql -U atlas shop -c "BEGIN" -c "UPDATE inventory SET on_hand = 777 WHERE product_id = 2" \
  -c "SELECT pg_current_xact_id() AS committed_xid" -c "COMMIT"
docker compose exec -u postgres db pg_controldata /var/lib/postgresql/data | grep -E "cluster state|REDO location|Latest checkpoint location"
docker compose kill -s SIGKILL db
Terminal 1 prints an xid such as 812, and terminal 2 prints a different one, such as 813. pg_controldata shows in production and the redo location of the last checkpoint. docker compose kill -s SIGKILL kills the postmaster and every backend with no chance to flush or shut down cleanly: the same as a kernel panic for Postgres, though not for the disk, which the next step’s caveat covers. Terminal 1’s psql reports that the server closed the connection.

3. Read the WAL of the dead server.

Start the container. Recovery runs before the server accepts connections, and it does not remove the segment that holds your records.

docker compose start db
docker compose logs db --since 2m | grep -E "interrupted|not properly|redo starts|redo done|end-of-recovery|ready to accept"
docker compose exec -u postgres db bash -c 'ls -1 $PGDATA/pg_wal | grep -v history | tail -3'

Pick the latest segment name from that list, and the xids from step 2:

SEG=$(docker compose exec -u postgres db bash -c 'ls -1 $PGDATA/pg_wal | grep -E "^[0-9A-F]{24}$" | tail -1' | tr -d '\r')
docker compose exec -u postgres db pg_waldump -p /var/lib/postgresql/data/pg_wal "$SEG" | grep -E "Transaction|CHECKPOINT|desc: (INSERT|UPDATE|HOT_UPDATE)" | tail -30
The log shows the full recovery sequence: database system was interrupted, database system was not properly shut down; automatic recovery in progress, redo starts at 0/..., redo done at 0/... elapsed: 0.0x s, checkpoint starting: end-of-recovery immediate wait and database system is ready to accept connections. The waldump output shows Heap records with tx: 812 for the inserts and the update of the uncommitted transaction and no Transaction ... COMMIT for 812. It shows tx: 813 followed by rmgr: Transaction ... desc: COMMIT, then the XLOG ... CHECKPOINT_SHUTDOWN or end-of-recovery checkpoint written after replay. If the segment rolled over, run it on the second-to-last segment as well.

4. Check what survived.

SELECT product_id, on_hand FROM inventory WHERE product_id IN (1, 2);
SELECT to_regclass('crash_probe') AS probe_table;
SELECT pg_xact_status('812'::xid8), pg_xact_status('813'::xid8);

Replace 812 and 813 with your xids.

Product 2 has 777: committed, replayed. Product 1 has its original value, not -999, and probe_table is null: the table and its thousand rows were created by a transaction that never committed. pg_xact_status reports aborted and committed. The uncommitted xid’s tuples are physically in the heap, because the WAL replayed them, but no commit was logged, so they are invisible. Nothing was undone. VACUUM will remove them.

5. Measure commit throughput at three synchronous_commit levels.

pgbench ships in the image. Initialise its small schema in the shop database, run 20 seconds at each setting with 8 clients, then remove it:

docker compose exec db pgbench -U atlas -i -s 10 shop
for sc in on local off; do
  echo "synchronous_commit=$sc"
  docker compose exec -e PGOPTIONS="-c synchronous_commit=$sc" db pgbench -U atlas -c 8 -j 4 -T 20 -N shop | grep -E "^tps|latency average"
done
docker compose exec -u postgres db pg_waldump --stats -p /var/lib/postgresql/data/pg_wal "$SEG" 2>/dev/null | tail -8
docker compose exec db pgbench -U atlas -i -I d shop
on and local give nearly the same tps (there is no standby, so they are the same thing), with an average latency of a few milliseconds dominated by the WAL flush. off gives 2 to 10 times the tps and well under a millisecond of latency. The ratio is your disk’s fsync cost. On Docker Desktop for macOS the VM’s fsync is cheaper than real hardware, so the gap is smaller than on a Linux server with a network volume. The --stats table shows XLOG FPI bytes as a large share of the total. -N skips the updates to the small tables to avoid lock contention, so the numbers measure commits, not row locks.
Lose acknowledged commits with asynchronous commit. In psql: CREATE TABLE acks (n int); SET synchronous_commit = off;, then run a loop that commits each row separately and reports progress as it goes: DO $$ BEGIN FOR i IN 1..2000000 LOOP INSERT INTO acks VALUES (i); COMMIT; IF i % 5000 = 0 THEN RAISE NOTICE 'acked %', i; END IF; END LOOP; END $$;. While the notices scroll, run docker compose kill -s SIGKILL db in the other terminal and note the last acked number. Then docker compose start db and SELECT max(n), count(*) FROM acks;. The table usually holds fewer rows than the last notice promised. The tail that the WAL writer had not yet flushed is gone (up to wal_writer_flush_after, 1 MB of WAL, or 3 × wal_writer_delay), and count(*) = max(n): no gaps, only a missing tail, exactly as the docs promise. Repeat with SET synchronous_commit = on and the loop slows to the fsync rate, and every acknowledged number survives. Clean up with DROP TABLE acks;.
DECIDE

Your shop's Postgres takes a steady 40 MB/s of WAL at peak on cloud network storage. The log shows 'checkpoints are occurring too frequently (12 seconds apart)' during the nightly import and every 25 seconds at peak. p99 commit latency spikes every time a checkpoint finishes. Your HA tool fails over if the primary is unreachable for 60 seconds. What do you change?

READING
  1. PAPER
    ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging C. Mohan, Don Haderle, Bruce Lindsay, Hamid Pirahesh, Peter Schwarz, 1992

    The recovery algorithm every later system is measured against. Sections 1 to 3 give the goals, steal/no-force and the log record structure. Section 6 is restart processing with analysis, redo and undo. Skip the comparisons with older systems and the nested top action details until the transaction theory chapter. Read: sections 1 to 3 and 6.

  2. DOC
    Reliability and the Write-Ahead Log

    The official chapter. Read 'Write-Ahead Logging', 'Asynchronous Commit' and 'WAL Configuration' for the checkpoint triggers, completion target and the three-times-wal_writer_delay loss window. 'WAL Internals' is short and names the segment files and records.

  3. DOC
    Write Ahead Log settings

    Every knob in this chapter with its default and whether it needs a restart: synchronous_commit, wal_buffers, full_page_writes, wal_compression, checkpoint_timeout, max_wal_size. Look things up here rather than in blog posts, which age.

  4. DOC
    pg_waldump

    All the filters (--xid, --rmgr, --relation, --block, --fullpage) and --stats. Use it to answer 'what is writing all this WAL?' on a real system.

  5. BOOK
    PostgreSQL 14 Internals Egor Rogov, 2023

    Free PDF. Part II's WAL chapters cover the record format with pg_waldump output, checkpoints and the background writer, recovery, and the WAL levels. It is the deepest readable account of the Postgres implementation. Version 14, but the only 17 change that matters here is pg_stat_checkpointer. Read: Part II, chapters 'Write-Ahead Log' and 'WAL Modes'.

  6. POST
    PostgreSQL's fsync() surprise Jonathan Corbet, 2018

    The incident in the Why. It shows what happens when the layer below the WAL breaks its promise and why Postgres now PANICs on fsync failure. Read it for the reasoning, not the kernel patches.

  7. DOC
    Atomic Commit In SQLite

    The same problem solved by a different engine, with each write and sync in order and what a crash at each point leaves behind. Reading it after this chapter shows which parts are Postgres and which are universal.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: MVCC, snapshots and vacuum →