Year on Call
You'll keep a database other people depend on running for a full year, through a version upgrade, a real incident and a month away, and hand it over with a document that worked.
About
Running a database for a season shows you can set one up. Running it for a year shows you can keep it, which is what the people on the other end need. This is the capstone: the Shared Database, or one like it with at least five people entering rows, kept for twelve months through a major version upgrade, at least one real incident with a written postmortem, a restore drilled every month, three migrations, and the hardest test of all, which is going away for a month and having someone else run it from your document. Few people get here, because it asks for patience more than cleverness and because the year has to happen in real time. What counts is a year of logs and backups, the upgrade done without loss, the postmortem, and the handover shown to have worked.
At a glance
- Per requirement
- 75 XP
- Completion bonus
- 1200 XP
- Requirements
- 7
- Takes
- A year
- Skill level
- Advanced (years of practice)
- Cost
- Free
- Supplies
- Nothing special
- Where
- At home
- Other people
- With other people
Requirements
-
1
Keep the restore log for twelve consecutive months, each with a timed restore and matching counts. Twelve rows, one per month, each a real restore into a scratch database with the row counts compared to live and the minutes written down. A month you skipped is a month you start again. Take a screenshot of the full log. Photo
-
2
Upgrade across a major version without losing a row, with the plan written before and the way back ready. pg_upgrade, or a dump and restore into the new version, rehearsed on a copy first, with a written plan that says exactly how you'd go back if it fails at step four. Do it at the quietest hour of their week and tell them beforehand. Take a screenshot of SELECT version() before and after with the counts matching. Photo
-
3
Handle one real incident and write the postmortem within a week. A full disk, a bad migration, a locked table, a user who deleted the wrong rows, a server that didn't come back after a power cut. Write what happened, what you saw first, what fixed it, what you changed so it can't happen the same way again, and how long people were affected, in one page with no blame in it. Post the page. Photo
-
4
Measure the database under a year of real use and tune one thing with a before and after you can defend. pg_stat_statements for the top queries by total time, a table that autovacuum isn't keeping up with, or work_mem for the one report that spills to disk. Name the change and show the statistic before and after. Take a screenshot of both. Photo
-
5
Grow the schema through at least three migrations over the year, each tested on a backup first, with the files kept in order. A numbered folder of migration files, each with the date, the reason and who asked for it. Take a screenshot of the folder and the schema drawing at month twelve beside the one from month one. Photo
-
6
Write the operations document and have someone else run the database from it for a month while you don't touch it. Where everything is, how to restore, how to add a person, what each alert means, and who to call. Then step away for thirty days and mean it. The person covering writes three lines on what the document got wrong, and you fix those lines. Take a photo of them with the document, and post their three lines. Photo
-
7
Hand it over, or sign up for another year, with the people who use it in the room. Either a new owner leaves with the credentials and the document, or you hold a short meeting that says what the year cost in hours and money and what it gave them. Take a photo of the meeting, with a line on which you chose. Photo