RELATIONAL_DB
2026-10-07 Greg Clough

The Garbage Collection Trap: How pg_stat_statements Garbage Collection Triggered Patroni Failovers

Monitoring query performance with pg_stat_statements is standard operating procedure for many production PostgreSQL deployments. It operates with minimal overhead in the background, quietly tracking execution counts, runtimes, and a host of other valuable performance statistics. However, beneath its simple exterior lies a shared-memory hash table governed by strict lock semantics. When massive, dynamic queries push […]

RELATIONAL_DB
2019-05-21 Greg Clough

You should NEVER use pg_resetwal / pg_resetxlog

I realise it’s a blanket statement to say NEVER to use pg_resetwal / pg_resetxlog, but in almost 100% of cases this will be true. One common reason cited is: “My disk filled up and my database crashed, so I ran pg_resetwal to clear some space.” DO NOT RUN pg_resetwal! This will result in a corrupted […]