Posts tagged Database
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.
Secret store and database write ordering: what a failure leaves behind, and how a retry resumes
Without a shared transaction, write order affects the state left after failure. SQLite examples cover secret overwrites, pending rows and retries.
Batching ClickHouse Inserts: A Queue and Go Worker, Async Inserts and Deduplicated Retries
I prefer a queue and Go worker to control ClickHouse batching. Async inserts suit clients that cannot batch; retries depend on deduplication and its limits.
Shared Memory for Several AI Tools: SQLite Holds the Truth, Qdrant Only Searches
I use SQLite as the canonical store and Qdrant for retrieval through MCP. Sharing AI memory means deciding who may write and how the stores stay in sync.
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.
ClickHouse Basics: MergeTree and Tiered Storage with S3
How ClickHouse MergeTree stores data as sorted parts, and how a storage policy plus TTL TO VOLUME moves old data to S3 automatically, with a Docker quick start.