Databases · Cluster
Database Operations
Migrations, vacuuming, and capacity.
- 01 How a Migration Runner Records and Orders Applied Versions The ledger table, version ordering, checksums, and locking that make a migration run reproducible, and what happens when two runners start at the same time.
- 02 Which ALTER TABLE Statements Rewrite the Table and Which Only Touch the Catalogue How engines decide between a catalogue edit and a full table copy, what the fast-default and instant-column mechanisms store instead, and where the boundary sits.
- 03 Dead Tuples, Bloat, and What VACUUM Actually Reclaims How update-in-place storage produces dead row versions, what a vacuum pass removes from pages, and why the table file does not shrink when it finishes.
- 04 How Metadata Locks Block a DDL Statement Behind Ordinary Queries The lock queue that a schema change must pass through, why a short query in front of it can stall every new reader of the table, and the timeout that bounds the damage.
- 05 Expand and Contract: Changing a Column While Both Versions Run The four-step sequence that lets old and new application code share one schema, which intermediate states must be safe, and where the sequence breaks down.
- 06 Batching a Backfill Without Holding Locks or Losing Restarts Key-range batching, batch sizing, commit frequency, and the idempotence rules that let a long data update be interrupted and resumed safely.
- 07 Concurrent Index Builds and the Invalid Index They Can Leave Behind Why a non-blocking index build performs two scans, what state it commits between them, and how a failure leaves an index that exists but cannot be used.
- 08 The Transaction ID Horizon and What Happens at Wraparound How 32-bit transaction identifiers are consumed, why freezing exists, and the sequence of failures that turns a neglected counter into a refused-write outage.
- 09 Why a Replication Slot Pins Write-Ahead Log and How to Bound It The retention rule that makes a slot hold log segments until a consumer confirms them, the disk consequence of an idle slot, and the settings that cap it.
- 10 Forecasting Table and Index Growth from Row Width and Page Fill Turning tuple width, page overhead, fill factor, and index amplification into a byte forecast, and the four effects that make a linear extrapolation wrong.