Soft deletion probably isn't worth it
The traditional soft deletion pattern using <code>deleted_at</code> columns leaks into code, curbs the usefulness of foreign keys, and makes data removal difficult. Luckily, there’s an alternative.
I'm Brandur. This site is where I publish words and photos. The section updated most often is atoms , short multimedia particles reminiscent of a Twitter feed. I update my now page monthly according to what I'm working on and thinking about. I publish a newsletter as often as I can.
Visit brandur.org → RSS feedOn Hacker News May 2017 – Aug 2026
Software Engineering 27Databases & Data 20Tech Industry & Business 7Systems & Performance 6Career & Management 4Web & Frontend 3
The traditional soft deletion pattern using <code>deleted_at</code> columns leaks into code, curbs the usefulness of foreign keys, and makes data removal difficult. Luckily, there’s an alternative.
A dive into the mechanics that allow Postgres to provide strong atomic guarantees despite the chaotic entropy of production.
Introducing River, a Postgres-based job queue designed for resilience and correctness through strong transactional guarantees.
Touring the ORM and Postgres landscape in Go, and why sqlc is today’s top pick.
An alternate to traditional <code>deleted_at</code> soft deletion that stays out of the way and minimizes bugs.
Hitting the limit for maximum allowed connections is a common operational problem in Postgres. Here we look at a few techniques for managing connections and making efficient use of those that are available.
Building a log-based architecture that’s fast, efficient, and resilient on the new stream data structure in Redis.
How Postgres’ v7 UUIDs are made monotonic, and why that’s a great feature.
Scaling out operation with read replicas and avoiding the downside of stale reads by observing replication progress.
How a seemingly minor enhancement in Postgres 11 fills one of the system’s biggest operational holes.
Flattening a single very hot vertical Redis node into a horizontal Redis Cluster at Stripe.
Maximizing Postgres connection economy by using a single connection per program to receive and distribute all listen/notify notifications.
Building resilient services by identifying foreign state mutations and grouping local changes into restartable atomic phases so that every request can be driven to completion.
Almost every notable managed Postgres provider bundles a connection pooler, giving us a strong hint that connection management is a product problem rather than a user problem.
~4 lines of Go to produce succinct, stable, URL-friendly slugs from timestamps.
Databases shed important RDMS features as they get big. Examining why this tends to be the case, and some ideas for preventing it.
Building a robust background worker system that leverages transactional isolation to never work a job too early, and transactional durability to never let one drop.
How Postgres’ concurrency model coupled with long-lived transactions can degrade the performance of indexes on hot tables in your database.
Tracking improvements to Postgres partitioning since 2017. In just five years it’s gone from a non-feature to a very good one.
I've been playing around with SQLite the last couple of days. I thought I knew a little about SQLite, but I didn't, and am getting my remedial education through an accelerated gauntlet. Some of what …