PulseCore

Chapter 9 · Section 12

The Record of Saved Novas

Every nova a game saves becomes a row in the nova record, and until 17 November 2026 each row carried three pictures of the field as plain text: the field at the start, the field at the end, and the next nova's starting field written back onto the row before it. At the game's level 202 those pictures ran to hundreds of kilobytes a row, and the record grew to 225 GB of a 453 GB disk, filled the disk, and stopped every project on the server.

The grid rule (2026-11-17). The numbers of every nova are kept forever; the pictures are kept only where they teach something. A universe keeps the pictures of its first three saved rows, its genesis row among them, and of any nova the game asks to keep; every later nova stores its numbers only. The "initiated" picture is no longer written back onto the row before, because it is the next nova's starting field and is read from there. Kept pictures are packed with gzip and prefixed gz:; a field of noughts and ones packs about a hundredfold, so a universe's kept pictures weigh a few kilobytes. The readers unpack both forms, and a nova whose pictures were not kept says so on its page.

The slim copy. The old record could not be altered in place: an ALTER on a 225 GB table needs a second 225 GB. Instead a twin table was created with the same shape, every row's numbers were copied into it in batches of 20,000 by id with a stop if free space fell under 1 GB, the keep-set's pictures were copied packed (the first and last nova of each universe, every genesis, and the last day), the few rows saved during the copy were caught up, and the two tables were swapped in one atomic RENAME, then the stragglers caught up once more. Counts, highest id and the next id matched; sampled rows matched column for column; every page read through the new table before the old one was dropped on the author's word. The disk went from 1.5 GB free to 238 GB.

Two lessons. A slow read of the old table held its metadata lock, and the RENAME queued behind it, which queued every query on the table for seven minutes until the read was killed: kill your own long reads before a RENAME. And the nova stage (nova_index) is not a row count: every well born in one stage shares its stage number, so the keep rule counts the rows a universe has saved, not the stage. A nightly guard logs the disk and the table and writes to the author when free space falls under 20 GB, the table passes 5 GB, or more than two thousand picture-carrying rows land in a day.