Soft Delete Postgres: deleted_at, Partial Indexes and Query Leaks
How soft delete in Postgres works with deleted_at, partial indexes, unique constraints and global query scopes, and how to stop deleted rows leaking.
18 min read
Tag
How soft delete in Postgres works with deleted_at, partial indexes, unique constraints and global query scopes, and how to stop deleted rows leaking.
18 min read
Compare deleted_at columns and archive tables for soft delete in Postgres: partial indexes, foreign keys, bloat, restore paths, and when to use each.
18 min read
Compare soft delete vs hard delete per table, enforce deleted_at filtering with partial indexes and views, and give data retention a real end date.
14 min read
How to design the soft delete pattern in a monolith: deleted_at columns, global query filters, unique indexes, cascades, purging, and when to avoid it.
14 min read
How to design soft deletes in a monolith: deleted_at columns, partial unique indexes, read-path filtering, FK handling, restores and safe retention purges.
14 min read