PostgreSQL 19 Ships WAIT FOR LSN, Solving Read-Your-Writes on Replicas
Simon Willison · rss · 2026-11-20
Simon Willison covers the PostgreSQL 19 release, which slipped two months past its usual September slot largely due to the wave of AI-reported vulnerabilities the team had to address.
The standout feature is the new WAIT FOR LSN command, providing read-your-writes consistency for read replicas:
- After a write on the primary, capture the LSN via pgcurrentwalinsertlsn() and pass it to subsequent requests (a signed cookie works)
- On the standby, WAIT FOR LSN '...' WITH (TIMEOUT ...) blocks until the WAL has replayed past that position before querying
- The timeout is optional; errors if the replica doesn't catch up in time
Willison notes the pattern echoes Wikipedia's hand-rolled MySQL replication solution in MediaWiki (WAITFOREXECUTEDGTIDSET / MASTERPOSWAIT), now native in Postgres.
More from Infra
- Microsoft's Bing Web IQ Goes GA on Azure: Auto Orchestration Delivers Fresh Grounding for Agents — dejanseo · 2026-11-20
- exe.dev ships Rex integration, making remote VMs the default agentic dev workstation — davidcrawshaw · 2026-11-20
- Ex-Waymo exec Abe Murray: CUDA and ISAs won't stay moats, huge chip innovation incoming — IgorCarron · 2026-11-20
- MIT and NVIDIA's QDA uses agents to auto-design LLM quantization recipes, beating top public ones by up to 2.2 points — omarsar0 · 2026-11-20
- Caixin: US remote-access cutoff and Nvidia CEO exit leave China's tech giants halting overseas compute deals — Gregory_C_Allen · 2026-11-20
- QuixiInfer: Rust Engine Runs 125B MoE Model on a Single RTX 5090 — QuixiAI · 2026-11-20