Archives
All the articles I've archived.
20264
October4
CDC or outbox: why I chose the outbox to publish events
Both guarantee that the event goes out if, and only if, the database transaction was committed. The difference is in what goes out, in who owns the contract, and in what you end up operating.
Distributed tracing across the outbox and the in-memory queue
A request's trace ends at the commit. The event leaves minutes later, from another process, and shows up in the APM as if it had no parent. Three small pieces fix that.
Partitioning a ledger at two levels: account group and year
LIST by account group, RANGE by year, a composite primary key and one rule nobody may forget: every query carries both keys.
Creating new partitions without locking the root table
The obvious PostgreSQL command holds an ACCESS EXCLUSIVE lock on the whole table until commit. There is a path that holds nothing that matters, and it is two commands instead of one.