Stale Reads on Read Replicas: MySQL vs PostgreSQL
Both MySQL and PostgreSQL replicas serve stale data by default. What differs is the toolbox: GTID waits and group replication consistency levels versus LSN tokens and remote_apply.
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.
Both MySQL and PostgreSQL replicas serve stale data by default. What differs is the toolbox: GTID waits and group replication consistency levels versus LSN tokens and remote_apply.
A failover that should have taken two minutes took forty-seven because the log had 30,000 virtual log files. How autogrowth wrote that layout, what log_reuse_wait_desc is telling you, and how to rebuild the layout exactly once.
The nightly purge had been deleting for six hours and generating 400 GB of log when they called me; the sliding-window replacement runs in 200 milliseconds. Partition functions, aligned indexes, SWITCH mechanics, and when partitioning is the wrong tool.
The index existed and the seek was in the plan, but the estimate said one row and the table said fourteen million. How auto-update thresholds, sampling, and the ascending-key trap produce bad estimates, and how to triage them with sys.dm_db_stats_properties.
The instance had 128 GB of memory and the buffer pool could not hold fifteen minutes of hot data, because 41 GB of the plan cache was plans executed exactly once. Measuring single-use bloat and the three levers that actually…
Every weekday at 9:05 the order system's p99 went from forty milliseconds to eleven seconds, caused by one report holding a twelve-gigabyte memory grant. How grants are sized, how to read the queue in sys.dm_exec_query_memory_grants, and how to fence the…
Setting MAXDOP to 1 because of CXPACKET waits amputates a feature to treat a symptom. NUMA-aware MAXDOP guidance, why the default threshold of 5 is ancient history, and where each setting should actually live.
The parameter was nvarchar, the column was varchar, and four million rows got converted one at a time. How CONVERT_IMPLICIT turns seeks into scans, why ORMs cause it so reliably, and where to fix it for good.
The order database froze writes for forty-one seconds at peak load because the data file grew by 32 GB and SQL Server zeroed every byte of it first. Percent-growth compounding, Instant File Initialization, and the pre-sizing discipline that makes growth…
Columnstore cut a report from four minutes to six seconds until trickle inserts rotted the rowgroups. Rowgroups, segment elimination, the deltastore lifecycle, batch mode on rowstore, and when a plain btree still wins.