SØNDAG
2026-11-22

Too many projects, too many ideas, too few hours — one learning a day anyway

PostgreSQL 19.0: Read-your-writes for self-hosted stacks

PostgreSQL 19.0 adds WAIT FOR LSN, letting standby nodes confirm they have received the specific data you just wrote. This solves the stale-read problem for self-hosted apps where read replicas lag behind the primary. I would test this in any Astro/Cloudflare setup that relies on local PostgreSQL for session state or real-time data. It removes the need for complex application-level consistency checks.

The release also includes REPACK (CONCURRENTLY) for bloat removal without downtime and INSERT … ON CONFLICT DO SELECT to save network roundtrips. For anyone running their own database, this reduces operational overhead significantly. The delay was caused by AI-assisted code reviews finding more bugs, which is a good sign for long-term stability.


The story — PostgreSQL 19.0 was released on November 19, 2026, focusing on business-critical workloads. Key features include REPACK (CONCURRENTLY) for table optimization, pg_plan_advice for query control, and read-your-writes consistency on standbys via WAIT FOR LSN. The release was delayed due to extensive bug fixes, partly aided by AI code reviews. Migration notes warn against using old pg_dump versions or specific configuration settings like io_workers. (Source)