Posts tagged PostgreSQL
A wallet opened between reconciliation cuts gets flagged: zero-fill or skip the missing snapshot?
When a new wallet has no snapshot, NULL can cause a reconciliation mismatch. This PostgreSQL example sets out the assumptions behind zero-filling.
Millisecond Cursors Repeat Pages: timestamptz Precision and Composite Keyset Pagination
A millisecond cursor over microsecond timestamptz repeats rows; microseconds still skip or repeat rows written in one transaction. A (created_at, id) keyset fixes both, tested on PostgreSQL 18.
The Same Payment Sent Twice: Idempotency and Retries, by Way of Santander's Christmas
Safe payment retries need an idempotency key both sides agree on: when to create it, what goes in it, and what to do if payloads differ or a refund arrives first.
Three Pitfalls in Scheduled PostgreSQL Jobs
Three pitfalls in scheduled PostgreSQL SQL: session time zone shifts the window, a CTE DELETE is invisible to its INSERT, and a lone advisory lock lets runs overlap.