What is running, what is in memory, and which file holds my table?
Here is the whole machine before we follow a write: the server and InnoDB threads, the buffer pool, the redo and undo logs, the binlog and the tablespace files.
Process, memory, disk: a request enters at the process layer, memory serves it when it can, and disk makes it permanent. Name the layer first, then diagnose inside it. The full rule is on the PostgreSQL page: name the layer first, then diagnose inside it.
The same layers as a still diagram, with every part named:
Request path
See the real thing: the official InnoDB Architecture diagram, Figure 17.1. One picture, in-memory structures on one side, on-disk structures on the other.
Same rule as PostgreSQL: there is no hidden state. Every file here is inspectable with ls and du while the server runs. The full version is on the PostgreSQL page.
$ ls /var/lib/mysql ibdata1 # InnoDB system tablespace: # internal bookkeeping #innodb_redo/ # THE REDO LOG folder (8.0.30+; # before that: ib_logfile0/1 here) #ib_redo0 # ┐ 32 files, #ib_redo0 to #ib_redo31, #ib_redo31 # ┘ each 1/32 of innodb_redo_log_capacity mysql-bin.000001 # ┐ THE BINARY LOG: every change, mysql-bin.000002 # │ numbered, for replicas + PITR mysql-bin.index # ┘ list of binlog files that exist undo_001 undo_002 # undo tablespaces: old row versions #ib_16384_0.dblwr # doublewrite buffer: anti-torn-page mysql/ # system schema (users, privileges) shop/ # one folder per database you create users.ibd # ← table "users": data + primary-key # tree in ONE file orders.ibd <hostname>.err # the error log
Same pattern as PostgreSQL: five logs, one job each, and every operational budget is a time window. The full version is on the PostgreSQL page.
Checkpoint age: the redo ring's headroom
The other logs: PostgreSQL: WAL · MongoDB · WiredTiger: journal and oplog · the pattern behind all five, and where they break
How do databases actually work? From one row on disk to transactions: the words you need, PostgreSQL, MySQL and MongoDB from the files up, then Redis, Cassandra and vector search, side by side, and the query and concurrency traps.