ML
Topic

PostgreSQL

Deep-dives on PostgreSQL — MVCC and vacuum behaviour, reading EXPLAIN ANALYZE without guessing, index strategy for real workloads, and the subtle failure modes around long-running transactions and bloat.

10 articles · updated regularly

PostgreSQL
Jun 29, 20268 min

The Query That Quietly Stopped Using Its Index: An Implicit Cast Story

One endpoint went from 4 ms to 1.2 seconds with no code change and no schema change. The index was still there, the query still looked identical, and EXPLAIN insisted on a sequential scan over 40 million rows. The cause was a single implicit type cast that Postgres could not push through the index, introduced by a client library that started sending a parameter as text.

PostgresPerformance
Read
PostgreSQL
Jun 28, 20268 min

The Database Went Read-Only at 4 AM: Transaction ID Wraparound

Postgres started rejecting every write with 'database is not accepting commands to avoid wraparound data loss'. No disk was full, no lock was held, replication was fine. We had quietly burned through the 32-bit transaction ID counter on one table because a long-running process had been blocking vacuum from doing the one job that keeps that counter from running out.

DatabasesPostgres
Read