TLDR DevOps · OPINIONS & TUTORIALS

I DON'T TRUST ON DELETE CASCADE

planetscale.com6 min read

Summary from the TLDR DevOps newsletter

Large cascading deletes can turn a routine schema migration into an outage by holding locks while new queries queue behind the waiting migration. Soft deletes followed by bounded background cleanup keep transactions smaller, with additional pitfalls around unindexed foreign keys and logical replication.