PostgreSQL synchronous_commit: A Durability Dial, Not a Switch
synchronous_commit is the rare setting that trades durability for latency openly. Used per transaction, it is the fastest safe win on a write-heavy pipeline.
Notes for the problems that show up after launch: bad plans, awkward migrations, index debt, vacuum pressure, replica lag, and the small decisions that keep PostgreSQL, MySQL, MariaDB, and SQL Server easier to operate.
Find the queries dragging your Postgres down, read their plans, and fix them in order of impact.
Read the guide →Which indexes to add, which to drop, and how to spot redundant index debt before it costs you writes.
Read the guide →How autovacuum works, when it falls behind, and how to keep bloat from eating your storage and your buffer cache.
Read the guide →Sizing pools, PgBouncer modes, and how to stop idle-in-transaction sessions from exhausting max_connections.
Read the guide →Track lag, WAL throughput, and replication slots before they turn into stale reads or a full disk.
Read the guide →
Backups, restores, PITR, archive gaps, and recovery drills for PostgreSQL.
AWS RDS, Azure Database for PostgreSQL, Google Cloud SQL, AlloyDB, and managed PostgreSQL monitoring notes.
Connection storms, pool saturation, PgBouncer behavior, and max_connections pressure.
CPU, memory, disk, temp files, checkpoints, buffers, and workload pressure.
Index design, index debt, reindexing, constraint indexes, and evidence-driven DDL.
Lock waits, deadlocks, blocking chains, idle transactions, and transaction hygiene.
Galera clustering, InnoDB and Aria internals, replication, optimizer behavior, and MariaDB operations notes.
InnoDB internals, replication, locking, query performance, and MySQL operations notes.
HNSW, IVFFlat, recall, embedding search, and production RAG performance notes.
Replica lag, WAL growth, failover readiness, hot standby behavior, and replication slots.
Query plans, EXPLAIN ANALYZE, planner regressions, pagination, joins, and statistics.
Wait statistics, tempdb, Query Store, Always On availability groups, and SQL Server operations notes.
Autovacuum, dead tuples, bloat, wraparound, MVCC, freeze age, and visibility.
synchronous_commit is the rare setting that trades durability for latency openly. Used per transaction, it is the fastest safe win on a write-heavy pipeline.
The bigger the shared_buffers and the more connections mapping them, the more 4KB pages cost you in TLB misses and page-table memory. Huge pages are cheap to set up if you size them honestly.
MaxScale's readwritesplit router gives your application one endpoint and spreads reads across replicas. Here is how routing decisions are made, where session state bites, and how failover coordination works.
One database setting ended our reader-writer blocking overnight and introduced two bugs we only caught in a concurrency soak. RCSI mechanics, the honest migration checklist, and the version-store monitoring that keeps tempdb safe.
A week of error 1205s and a proposed retry loop that would fix nothing. How to pull deadlock graphs from system_health, read victim, owner, and waiter nodes, and kill the three patterns behind most deadlocks.
The deploy that doubled p95 left its fingerprints in sys.query_store_runtime_stats. How to configure Query Store so the data is there when you need it, compare intervals to find the regressed plan, and force a plan without fooling yourself.
The nightly REBUILD job I inherited burned 90 GB of transaction log and fixed nothing. What fragmentation still means on flash, what REBUILD actually buys over REORGANIZE, and why updating statistics is usually the real win.
Since-restart wait totals average your quietest night and your worst deploy into one meaningless number. Here is how I diff sys.dm_os_wait_stats over an interval, drop the benign noise list, and branch on what CXPACKET, PAGEIOLATCH, WRITELOG, and LCK_M_* are actually…
A batch job that got slower as we added workers was queueing on three pages in tempdb. How to tell PAGELATCH from PAGEIOLATCH, size the data files, weigh memory-optimized metadata in 2019, and keep the version store from eating the…
JIT compilation is supposed to make big PostgreSQL queries faster, but bad cost estimates fire it up on cheap ones. Here is how to spot the regression and switch it off safely.