Every durability incident you will review falls into one of three buckets: the stack lied about what reached media, the engine mishandled what the stack told it, or the operators traded away a guarantee without knowing its price. The write-ahead log is where all three meet. This chapter treats it as a system to reason about quantitatively: what an acknowledgement actually promises, what a commit costs and why, how checkpoint distance becomes your RTO, where WAL volume turns into an outage, and when replication can stand in for a local flush and when that argument quietly fails.
The rule has two halves, and reviews usually remember only one. A dirty page may not reach disk before the log records describing it are durable, and a commit may not be acknowledged before its commit record is durable. The first protects consistency, the second durability. Breaking the second loses recent commits; breaking the first produces pages no log record can explain, which recovery can neither redo nor undo.
The rule is enforced by one integer per page. Every log record gets a monotonically increasing LSN (in Postgres literally the byte offset in the WAL stream); every page header carries the pageLSN of the last record applied to it. Before the buffer manager writes a dirty page it checks that the log is flushed at least to that pageLSN and, if not, flushes the log first. That single comparison is the entire enforcement mechanism, and it has a performance consequence that surprises people: under memory pressure, a backend evicting a dirty page may be forced to flush WAL synchronously on the read path. A query that only reads can stall on log I/O because it needed a buffer.
Correct order ✓
1. modify page in buffer pool (RAM)
2. append log record + fsync WAL
3. now safe to ack COMMIT
4. flush dirty page to disk — anytime later
Break the order ✗
1. flush data page to disk
2. CRASH before log written
→ page changed on disk, but no log record
→ recovery can neither redo nor undo it → corruption
Write-ahead logging is a single inviolable rule: never let a data page reach disk before the log record that describes its change. The log is the source of truth; the data files are a lazily-maintained cache of it. Get the ordering right and any crash is recoverable.
The deeper reason WAL exists is a buffer-policy choice, and naming it explains every engine's design. Steal means the buffer manager may write an uncommitted transaction's dirty page to disk (to free memory); no-force means commit does not require the transaction's pages to be written. Steal forces you to keep undo information, because disk can now hold uncommitted data. No-force forces you to keep redo, because committed data may exist only in RAM. Every serious engine picks steal/no-force: it is the only quadrant that decouples buffer-pool size from transaction size and keeps random page I/O off the commit path. The price is that recovery must both redo and undo, which is what ARIES (4.5) is built for.
Commit writes every touched page randomly; buffer pool must hold every uncommitted page. Commit latency scales with pages touched.
toy engines, some embedded stores
Big transactions pin memory until commit; a bulk update larger than RAM is impossible or spills to a side store.
some in-memory engines
Buffer pool is free, but commit still pays one random write per dirty page. Tens of commits/s on disk.
early shadow-paging designs
Commit = one sequential log flush. Buffer pool sized for the working set, not the largest txn. Recovery must redo AND undo.
Postgres*, InnoDB, SQL Server, Oracle
Steal = uncommitted dirty pages may be written out. Force = all of a transaction's pages must be written before commit. *Postgres steals, but MVCC makes its "undo" implicit: old tuple versions stay in the heap and commit status lives in the commit log, so it logs redo only (see 4.5). The industry converged on the bottom-right quadrant because it is the only one where commit cost is independent of how many pages the transaction touched.
What goes in a record matters as much as when it is flushed. Physical logging (byte ranges of pages) is trivially idempotent but verbose; logical logging ("insert row R into table T") is compact but cannot be replayed against a half-written page or a structure mid-split. Nearly everything ships physiological logging: physical to a page, logical within it ("insert this tuple at slot 7 of page 4411"). That choice is why torn pages need a separate defence (4.4), why a B-tree split is several records that must replay together, and why logical replication and CDC need a second decoding layer (Postgres wal_level=logical, MySQL's row-based binlog) instead of reading the redo stream directly. MySQL is the instructive outlier: its binlog is a separate logical log, coordinated with InnoDB's redo log by an internal two-phase commit, so every commit that feeds replicas pays for two logs and two flushes unless both are group-committed together.
A write can hide in three places before it is durable: the OS page cache (where write() returns), the device's cache, and finally stable media. fsync()/fdatasync() (or O_DSYNC writes, which many engines use for the log) is the only thing that pushes through all of them, and every ACID commit bottoms out on one of these for the log.
A successful write() only reaches the OS page cache — the kernel will flush it "eventually." Only fsync() forces the data down through the caches to stable media. This is the durability primitive, and it is slow precisely because it waits for physical persistence — the whole latency story of this chapter starts here.
The number that matters is not "SSD vs HDD" but what the device does on a cache flush. An enterprise drive with power-loss protection (capacitor-backed cache) can acknowledge a flush from DRAM, so a log fsync lands in the tens of microseconds. A consumer drive without PLP must push the flush through to NAND, which can cost milliseconds. Network block storage adds a replicated round trip, typically putting a single fsync in the high hundreds of microseconds to low milliseconds (all illustrative; measure yours with a single-threaded write+fdatasync loop, not a vendor IOPS figure). This inverts a piece of classic advice: "disable the drive write cache" is correct for a non-PLP disk and pure latency tax on a PLP one. The right question is never "is the cache on?" but "is the cache non-volatile, and does the stack honour flush/FUA?"
The dangerous settings are not all equally dangerous, and conflating them is the most common mistake in durability reviews. Relaxing when the log is flushed loses a bounded window of recent commits but leaves a consistent database. Breaking whether the log reaches media before its pages voids the WAL rule and can leave a cluster that will not start.
The middle rows are legitimate business decisions: the database stays internally consistent and you lose a bounded, known window of recent commits. The bottom rows are not decisions — they void the WAL rule itself, so recovery can find pages whose log records never landed. Postgres lets you set synchronous_commit per transaction, so a clickstream insert and a payment can share a cluster with different guarantees. Note the InnoDB row-1 guarantee also depends on sync_binlog=1 if the binlog feeds replicas or PITR.
The third failure mode is the least known: fsync can fail, and what the kernel does afterwards matters as much as the success path. For decades databases treated a failed fsync as retryable. On Linux, after a writeback error the affected pages may already be marked clean, so the retry "succeeds" with nothing written, and the error is reported once, possibly to a different file descriptor than the one that wrote the data. The database then happily completes a checkpoint and recycles the WAL that was the only surviving copy of those changes.
Backend write()s dirty pages; they sit in the kernel page cache
Background writeback hits an I/O error (thin-provisioned volume full, flaky path, SAN hiccup)
Kernel records the error, and on common filesystems marks the failed pages clean or drops them
Checkpointer's fsync() returns EIO; the database logs it and plans to retry
Retry fsync() returns 0: the error was already reported once and the pages are no longer dirty
Checkpoint completes, the redo log covering those pages is recycled: the only good copy is gone
The fix: treat any fsync failure on a data file as fatal. PANIC, restart, and let crash recovery rebuild the pages from WAL that has not been recycled. That is what Postgres moved to after the 2018 "fsyncgate" discussion; direct I/O engines sidestep the page-cache half of the problem.
The operational consequences are concrete. A full thin-provisioned volume or a transient SAN path failure is precisely the event that triggers writeback errors, so it belongs in your failure-injection plan. A primary that PANICs on fsync error and restarts is behaving correctly; the runbook must not "fix" it by lowering the setting that makes it crash. And any storage layer that swallows errors (some network filesystems, some virtualised disks) silently reintroduces the cascade.
Below the fsync call sit file-level traps that engine authors handle and application-level logs (queues, custom journals, "we just append JSON to a file") routinely do not. fdatasync skips inode metadata such as mtime, but not a size change, so appending to a growing file costs a metadata journal write on every flush. That is why engines preallocate and recycle fixed-size WAL segments: overwriting an existing 16 MB segment in place turns each log flush into a pure data flush. Creating a new file is not durable until the directory is fsynced, so a rename-based "atomic" checkpoint or segment switch that skips the directory fsync can vanish on power loss while every file-level fsync reported success. And the published crash-consistency studies of real applications (the OSDI 2014 "All File Systems Are Not Created Equal" work is the standard reference) found such ordering bugs in mature, widely used software, not in toys. If your team builds a log, review it against these rules, not against the happy-path code.
Direct I/O changes the picture rather than removing it. InnoDB's O_DIRECT for data files bypasses the page cache, so write errors come back to the caller that issued the write and the double-buffering of data in RAM disappears; the log still needs flushes, and the device cache below still needs to honour them. Postgres has historically relied on buffered I/O and is only now growing asynchronous and direct I/O paths. In either case, "we use O_DIRECT, so we don't need fsync" is wrong: O_DIRECT bypasses the OS cache, not the drive's, and not the filesystem metadata that locates your blocks.
A commit, then, is remarkably simple: append the transaction's log records (ending with a commit record) and fsync the log. Once that flush returns, the transaction is durable and the database can tell the client "done" — even though not one of its data pages has been written back yet. All the value is in that single sequential, flushed write.
But if every commit needs its own fsync, throughput is capped at roughly one commit per fsync latency — a few hundred to a few thousand per second, no matter how many CPUs you have. The fix is group commit: when several transactions are ready to commit around the same moment, the database lets their log records accumulate for a sub-millisecond window and then flushes them all in one fsync. Each committer pays a tiny extra wait; in return the flush cost is amortized across the whole batch, multiplying commit throughput dramatically under concurrency.
One fsync per commit
3 commits = 3 disk flushes. Throughput capped at ~1/fsync-latency.
Group commit
3 commits batched → 1 flush. A tiny wait trades a little latency for a huge throughput gain.
The fsync is so costly that batching many transactions' log records into a single flush — group commit — is one of the biggest throughput wins in a database. Concurrent committers wait a sub-millisecond window, then all become durable together in one disk operation.
Work the arithmetic, because it explains two production surprises. Let the log fsync take L. Modern engines do not need an explicit timer to batch: while one flush is in flight, new commit records pile up behind it, and the next flush takes them all (leader/follower flushing). So with N concurrent committers throughput approaches N / L until log bandwidth or lock contention takes over. Illustratively, at L = 1 ms: one session commits at most ~1,000 times per second, 32 sessions can reach ~20–30k, and at ~500 bytes per commit that is only ~15 MB/s of WAL, nowhere near the device limit.
Surprise one: a single serial writer is capped at 1/L no matter how big the machine is. The backfill script or ORM loop doing autocommit inserts one row at a time will run at a few hundred to a thousand rows per second on cloud block storage and look like "the database is slow". Batching 1,000 rows per transaction, or relaxing synchronous_commit for that session only, buys two to three orders of magnitude. Surprise two: under group commit an individual commit can wait up to ~2L, one in-flight flush it just missed plus its own, so p99 commit latency roughly doubles at moderate load before throughput saturates. Explicit delay knobs (Postgres commit_delay) only help when L is large and concurrency is high; at low concurrency they add latency to every commit for no batching gain, which is why they ship disabled.
Now add a synchronous standby, because that is where most commit-latency regressions actually come from. Each durability level puts another serial term into the commit, and group commit divides throughput by the sum, not by the largest term.
Latency adds; throughput under group commit divides by it. With a fixed number of concurrent committers N, throughput ≈ N ÷ commit latency, so moving from a 1 ms to a 30 ms commit cuts the ceiling ~30× unless you raise concurrency to match. Postgres levels: remote_write waits for the standby to receive and write (not flush); on waits for its flush; remote_apply also waits for replay so reads on the standby see the commit. The primary has always flushed locally, so the gap remote_write leaves is narrow but real: lose the primary for good (disk, AZ) while the standby's OS crashes before its page cache drains, then fail over, and acked commits are gone. on closes that gap for the price of one more fsync.
Worked through with the illustrative numbers above: 64 concurrent committers on a network volume with a same-AZ synchronous standby at on see roughly 1 + 0.5 + 1 = 2.5 ms per commit, a ceiling around 25k commits/s. Move the standby cross-region at, say, 35 ms total and the same 64 sessions cap near 1.8k/s. Nothing else changed; the connection pool is now the bottleneck, and the fix people reach for (more connections) brings its own contention. Two decision rules follow. First, if the synchronous standby exists for HA, keep it in-region and use on; cross-region belongs to asynchronous DR unless the business has explicitly priced zero-RPO regional failure at a 10–30× commit-latency multiple. Second, with a single synchronous standby, that standby's availability is now your write availability: if it stalls, every commit hangs. Use a quorum (ANY 1 (s1, s2)) so one slow standby cannot freeze the primary, and alarm on commit wait time, not just replica lag.
There is one durability gap no engine closes: the ambiguous commit. If the connection drops after the client sends COMMIT but before the reply arrives, the transaction may or may not be durable, and the client cannot tell. The same happens when a primary with a synchronous standby is cancelled or restarted while waiting: Postgres may already have the commit locally even though the standby never confirmed it, and it will be visible after restart. At-least-once retries on top of that double-post. For anything with money or external side effects, the application needs an idempotency key written in the same transaction so a retry can ask "did this commit?" rather than repeat it. Durability tells you the commit survives; only idempotency tells you whether it happened.
A checkpoint establishes an LSN before which the log is no longer needed for redo, so it bounds both retained WAL and restart time.
No production engine does this by freezing writes and flushing everything (a sharp checkpoint); the stall would be seconds to minutes on a large buffer pool. They use fuzzy checkpoints, and the details differ in ways that matter. ARIES proper flushes nothing at checkpoint time: it logs the dirty-page table with each page's recLSN (the first LSN that dirtied it), and redo starts from the minimum recLSN. Postgres records a redo pointer, then spreads the writing of every page dirtied before it over a fraction of the interval (checkpoint_completion_target), and only then allows older WAL to be recycled. InnoDB continuously flushes from the oldest end of its flush list and advances the checkpoint LSN behind that frontier, which is why a burst that fills the redo log forces aggressive "furious flushing" and a visible throughput cliff.
The tension is the obvious one (frequent checkpoints: short recovery, more flush I/O; infrequent: the reverse), but the dominant cost is not the one people expect, as the next two paragraphs show.
A checkpoint establishes a log position such that every change before it is reflected in the data files (fuzzily: pages are written in the background, not in a stall), so the log before it can be recycled. After a crash, recovery only needs to replay from the last checkpoint's redo point forward — without checkpoints the log would grow forever and recovery would replay from the beginning of time.
The second-order effect nobody puts on the whiteboard is torn pages. A database page (8 KB in Postgres, 16 KB in InnoDB) is larger than the unit the storage stack writes atomically, so a power cut mid-write can leave half old, half new. Redo records typically describe a change relative to the page, so they cannot repair a page whose base is garbage. The two standard answers: Postgres logs a full-page image the first time each page is modified after a checkpoint (full_page_writes), and InnoDB writes pages to a doublewrite buffer first, then to their home location. Both double some write traffic, and Postgres ties that cost directly to checkpoint frequency.
Left of the band, every checkpoint resets the "first touch" of every hot page, so each gets re-logged as a full 8 KB image: WAL volume, archive cost and replica bandwidth all climb, and replicas lag. Right of the band, the redo tail grows and so does the time the primary stays down after a crash. The trap is sizing max_wal_size for the quiet hours: a nightly batch job then trips size-triggered checkpoints back-to-back and lands the cluster at the far left exactly when it can least afford the extra I/O.
Worked example (illustrative numbers): a primary with a hot set of 2 million pages, most touched at least once every few minutes. At a 5-minute checkpoint, each hot page contributes one 8 KB image per interval, roughly 16 GB of FPIs per checkpoint on top of the ordinary change records. Stretch to 30 minutes and the same hot pages log one image per 30 minutes: FPI volume per hour falls about sixfold. The cost is recovery: redo replay in Postgres is essentially single-threaded and bound by random reads of pages not in cache, so if it replays at, say, 100–200 MB/s, a 40 GB redo tail is 3–7 minutes of downtime before the first query. Decide it from the RTO backwards: maximum redo tail ≈ replay rate × tolerable recovery time, set max_wal_size so peak write rate does not trip size-based checkpoints before checkpoint_timeout, and turn on WAL compression if FPIs dominate. Measure replay rate by restoring a base backup and timing it; it is also your replica catch-up rate after a long disconnect.
Two more ways WAL volume turns into an outage. Anything that pins old WAL (a stale replication slot, a failing archive command, a long-lagging replica) stops recycling entirely, and the WAL volume fills its disk; a primary that cannot write WAL stops accepting writes. Alarm on retained WAL bytes, not just free disk. And checkpointing is the counterweight to lazy page writes: without it the WAL's "defer the data writes" strategy would postpone them forever. The checkpoint is where deferred work finally gets done, on the database's schedule rather than on the commit critical path.
ARIES is the reference design: analysis rebuilds the dirty-page and in-flight-transaction tables from the last checkpoint, redo repeats history from the minimum recLSN, undo rolls back the losers. What matters in practice is not the phases but their invariants and which engines actually run them.
The genuinely clever part is redo before undo — "repeat history first." It seems wasteful to replay changes you are about to undo, but reconstructing the precise crash-moment state first makes the whole process idempotent and restartable: if the machine crashes again during recovery, you simply start over and reach the same place, because each log record carries a sequence number (the LSN) that tells recovery whether a change is already reflected in a page. Recovery that is safe to crash mid-way is what makes the durability guarantee actually hold under repeated failure.
find which txns were in-flight and which pages were dirty at crash
restore the exact pre-crash state, including uncommitted work — 'repeat history'
reverse changes of transactions that never committed, using undo/CLR records
The counterintuitive step is redo before undo: recovery first replays everything — even uncommitted transactions — to reconstruct the exact state at the moment of the crash, then undoes the transactions that hadn't committed. This "repeat history" approach is what makes recovery robust to a crash during recovery itself.
This is also where atomicity from Chapter 3 gets its teeth: a ROLLBACK (explicit or crash-induced) is just the undo phase applied to one transaction, reversing its changes via the same undo records. Atomicity and durability are two faces of the one logging mechanism.
Not every engine runs all three phases, and the difference shows up in your restart times. InnoDB is close to textbook: redo from the checkpoint LSN, then roll back incomplete transactions from its undo logs, which it does in the background after the server opens, so a crashed 50-million-row bulk update restarts quickly but then grinds through undo while serving traffic. Postgres has no undo phase at all: because MVCC (Chapter 3) keeps old row versions in the heap, an uncommitted transaction's rows are simply invisible once its commit-log status reads "aborted", and the dead tuples are left for vacuum. The price is paid later as bloat rather than at restart. In both, restart time is dominated by redo, which is why the checkpoint maths above, not the ARIES diagram, is what determines your RTO.
Recovery has a question it must answer before redo can start: where does the log end? A crash mid-append leaves a partially written final record, so engines checksum every record (and Postgres also validates each page header and the back-pointer to the previous record) and treat the first record that fails validation as end-of-log. For a torn tail that is exactly right; that record was never acknowledged. The trouble is that a latent sector error or a firmware bug in the middle of the retained log produces the identical signal.
In case B the engine opens the database cleanly, reports a successful recovery, and has discarded every acknowledged commit after the bad record, while some data pages flushed before the crash may already contain those changes. That is the worst class of durability failure: silent, internally inconsistent, and discovered weeks later by reconciliation. The defences are cheap relative to the blast radius. Put WAL on storage with end-to-end checksums or keep it mirrored; enable data checksums so an inconsistent page is at least detected on read; run a continuous job that restores archived WAL on a scratch instance (Postgres's pg_waldump or a PITR restore both read every record), because a WAL archive you have never replayed is not a backup; and treat "recovery ended earlier than the last archived segment" as a page, not a log line.
Redo throughput deserves its own number, because it is the same number on three different paths: crash recovery, PITR restore, and a replica catching up after a long outage. Postgres applies redo in a single startup process; it prefetches the pages that upcoming records will touch (recovery_prefetch) to hide read latency, but the apply is serial. So a primary that generates WAL from 64 parallel backends at a rate the single replay process cannot match will produce a replica that lags without bound during peaks, and a crash-recovery time that grows faster than checkpoint distance suggests. As a rule of thumb (not a standard), if measured replay rate is not comfortably above peak WAL generation rate, say 1.5× or more, treat it as a capacity problem now, not at the next failover.
The textbook account: a transaction touching five scattered rows would, without a log, need five random page writes flushed on the commit path; with one, it flushes a compact sequential record and the page writes happen later, batched and reordered by the checkpoint.
On spinning disks that was the whole story. On NVMe, where random and sequential 4 KB writes are far closer, the conventional explanation is half wrong: the win is less about sequentiality and more about flush count and bytes on the critical path. One flush of a few hundred bytes versus N flushes of full pages is a large difference on any medium; the sequential pattern mainly buys cheaper device-level garbage collection and wear. That reframing matters because it tells you where the log itself becomes the bottleneck.
The log is a single serial stream, and at high write rates it stops being cheap. Three ceilings appear, in roughly this order. Log insertion: every backend must reserve space in the shared WAL buffer, and on many-core machines that reservation becomes a contention point (Postgres splits it across several insertion locks for exactly this reason). Log bandwidth: WAL volume is typically several times the logical change volume once full-page images, index updates and tuple headers are counted. Illustratively, 50k row updates/s each touching two indexes at ~150 bytes per record is ~22 MB/s before FPIs; with a 5-minute checkpoint and a large hot set, FPIs can multiply that several-fold, which is now a real share of a network volume's throughput allowance and of your cross-AZ replication bill. Log flush: covered in 4.3. The observable symptom of the first two is commit latency rising while fsync latency stays flat; watch WAL-related wait events rather than disk metrics.
The escape hatches each have a precise cost, and a design review should force someone to name it. Batching rows into fewer transactions cuts records and flushes but not bytes. WAL compression trades CPU for FPI bytes and usually wins when FPIs dominate. A bulk load into a table created or truncated in the same transaction can skip WAL entirely under wal_level=minimal, which also means no streaming replicas and no PITR across that window. UNLOGGED tables skip WAL for good and are truncated after any crash and absent on replicas; they are right for rebuildable staging data and wrong for anything someone will later call "the source of truth".
WAL: sequential append
Head never moves; one contiguous stream. Even on SSD, sequential writes are far cheaper and kinder to flash.
Data pages: random scatter
A transaction touching 5 rows dirties 5 pages all over the file. Doing that on the commit path would be brutal.
This is the core insight: WAL converts random writes into sequential ones on the critical path. The commit only needs one fast, sequential, flushed log write; the slow, scattered page updates are deferred and batched by the checkpoint. Durability becomes cheap by writing the intent sequentially and applying it lazily.
The same idea powers replication (ship the sequential log to another node), point-in-time recovery (keep the archived log and replay to any moment), and change-data-capture (tail the log to feed downstream systems). Once you see the database as "an fsync'd sequential log, plus a lazily-maintained cache of its effect," a whole family of features stops looking like separate machinery and reveals itself as the same log, read differently.
Distributed logs routinely make a trade relational engines do not: acknowledge once enough replicas hold the write, and let each flush lazily. Kafka's defaults leave flushing to the OS and rely on in-sync replicas for durability; many quorum stores offer a similar mode. The argument is probabilistic and sound under one assumption: replica failures are independent. Three copies in RAM across three availability zones with separate power are, for most purposes, safer than one copy on a local disk. Three copies in RAM in one rack are one breaker trip from zero.
The gold row is where most "replication makes fsync unnecessary" arguments live. It is sound exactly when the replicas cannot lose power together: different AZs with independent power and a quorum that spans them. Put three brokers in one rack, or three pods on one node pool behind one PDU, and the gold row silently becomes the pink one from the durability ladder.
Put rough numbers on the independence assumption. If each node independently loses its page cache (kernel panic, OOM kill of the host, hard reset) at some small rate, the chance that a majority do so inside the same few-second unflushed window is the product of small numbers and is negligible. A correlated event is not a product: a zone power loss, a bad kernel rolled to every node at once, or a Kubernetes node-pool drain that ignores disruption budgets takes out every replica at the same moment with probability equal to that single event. So the review question is not "how many replicas?" but what is the largest failure domain the quorum does not span? If the answer is "the zone", lazy flush is a real RPO exposure; if the quorum spans zones with independent power, it is usually a defensible trade.
Consensus systems that make stronger claims pay for them. Raft and Multi-Paxos as specified require a node to persist its log entry (and its term and vote) before acknowledging, which is why etcd and similar stores are sensitive to disk fsync latency and publish guidance on it. A consensus node that acknowledges before flushing can, after a correlated restart, forget a vote or an entry it promised, and the protocol's safety proof no longer applies: the failure is not lost writes but two leaders in the same term or a committed entry overwritten. That is a much worse class of bug than a lost second of data, and it is why "just turn off fsync on the consensus log for performance" should be rejected outright.
Where the conventional advice is wrong
One log, read four ways: flushed, it is durability; with undo information, atomicity; batched and replayed lazily through checkpoints, performance; scanned by analysis-redo-undo, recoverability. Every guarantee in this chapter reduces to two questions about that log: which LSN is known to be on stable media, and on how many independent failure domains.
The operational levers all trace back to this design. Commit latency vs throughput is the fsync/group-commit trade. Recovery time vs steady-state I/O is the checkpoint-frequency trade. Storage vs point-in-time-recovery capability is how much archived log you keep. And the correctness of the whole thing depends on fsync actually reaching stable media — which is why storage and filesystem configuration is a database-durability question, not just an ops detail. Next we take this same log and send it across the network: replication.
WAL
Log before page
fsync
The durability atom
Group commit
Amortize the flush
Checkpoint
Bounds recovery
Questions to ask in a design review
Where next