A long time ago, I read in a medical book that One can learn about a system when things go wrong. So diseases are a good way to learn more about how t

TIL: Creating tables without primary keys CAN cause updates and deletes to fail in Postgres

submited by
Style Pass
2024-06-07 07:30:04

A long time ago, I read in a medical book that One can learn about a system when things go wrong. So diseases are a good way to learn more about how the human body functions. That sentence stuck with me and this is about a story where someone made a mistake and learned something (someone, not me, I don’t make mistakes).

It was friday afternoon (why do all tech disaster stories start on friday? This one doesn’t start on friday) It was a less dramatic Wednesday afternoon, the smell of a freshly baked migration was in the air. I was rubbing my hands with joy, waiting to press merge once I got that LGTM. I had worked hard on the migration and I was quite proud that I thought a lot about the changes and data model. I was adding a new table, how hard can that be?

I got my LGTM, pressed merged, pushed my chair away from the desk, and leaned back. I let out a sigh and thought to myself, that was good work, I’m getting better as an engineer (watch out though, life always has a way of swatting you back in place). I had tested the changes locally, no problem. Relaxed, I went about my day.

Leave a Comment