Postgres template databases: build once, copy per test
Migrating a fresh database per integration test was most of a 25-minute suite. Template databases, xUnit fixture lifetimes, and one out-of-space failure.
3 posts · all tags
Migrating a fresh database per integration test was most of a 25-minute suite. Template databases, xUnit fixture lifetimes, and one out-of-space failure.
Users keep saving the same note under three different names. One small C# program with Microsoft.Extensions.AI and pgvector catches the duplicates, powers fuzzy dropdowns, and needs no training and no prompts.
Cache, fan-out, job coordination, leader election, idempotency: running all of it on the one PostgreSQL you already operate, and why SKIP LOCKED is the one pattern deliberately avoided.