How I destroyed the company's DB - by Anton Zaides
I received a message from the support team, telling me one of our customers has a problem. I decided it was important enough to start debugging. After 15 minutes, I understood the issue - there were some corrupted orders created in our DB, and we needed to delete them. Sounds trivial, right? At the end of the article I share my lessons, and how you can apply them to your own team. And welcome to the 600+ new subscribers since last week! For those of you not working in startups - please don’t judge 😅 There were a few hundred orders to delete, so I decided to not do it manually but to write a short SQL query (red flag 🚩) It was a bit more complex than that, but to simplify: UPDATE orders SET is_deleted = true WHERE id in (1, 2, 3) You can already see the scale of the disaster… I pressed CTRL+Enter and ran the command. When it took longer than a second, I understood what happened. The program I used (DBeaver) saw the empty 3rd line, and ignored the 4th line. Yes, I deleted all the orde
It was on a quiet Saturday. I received a message from the support team, telling me one of our customers has a problem. I decided it was important enough to start debugging. After 15 minutes, I understood the issue - there were some corrupted orders created in our DB, and we needed to delete them. Sounds trivial, right? At the end of the article I share my lessons, and how you can apply them to your own team. And welcome to the 600+ new subscribers since last week! For those of you not working in startups - please don’t judge 😅 There were a few hundred orders to delete, so I decided to…
related reading
- AI is removing the middle class of software engineeringblog.florianherrengt.com
- How I Dropped Our Production Database and Now Pay 10% More for AWSalexeyondata.substack.com
- Build Your Own Databasenan.fyi
- A Bunch of Programming Advice I'd Give To Myself 15 Years Ago | Marcus' Blogmbuffett.com
- Excuse me, is there a problem?longform.asmartbear.com
- New Junior Developers Can’t Actually Code | N’s Blognmn.gl
- The startup's Postgres survival guidehatchet.run
- The Curse of Knowing How, or; Fixing Everything | Blognotashelf.dev
- A More Human Approach To Databasesccorcos.github.io
- The only scalable delete in Postgres is DROP TABLE — PlanetScaleplanetscale.com
- Track every PostgreSQL data change using Debezium - DEV Communitydev.to
- Mistakes engineers make in large established codebasesseangoedecke.com