Skip to content
AI News HubLIVE
More
Original source2 min read

PostgreSQL 19 Released

Summary

PostgreSQL 19 arrived two months late due to AI-reported vulnerability issues, but brings a key new feature: WAIT FOR LSN for read-your-writes consistency on standbys.

PostgreSQL 19 Released
Report an error

The correction channel is not available yet. You can copy the article reference below for later.

Correction instructions
Read article

PostgreSQL 19 Released

Simon Willison’s Weblog

Newsletter

19th November 2026 - Link Blog

PostgreSQL 19 Released (via) Most years PostgreSQL ships a new release in September, but this year's release came two months later thanks mainly to the flurry of issues that the PostgreSQL team needed to address as part of the ongoing AI-reported vulnerability apocalypse.

This release was definitely worth the wait. My favorite new feature is this one:

For applications that send reads to standbys, PostgreSQL 19 adds "read-your-writes" consistency with the new WAIT FOR LSN command. A session on a standby can use WAIT FOR LSN to wait until the standby has replayed the write-ahead log (WAL) up to a specific log sequence number (LSN) before running a query, so the application can read data it just wrote on the primary.

In practice, that looks like this:

UPDATE movie SET genre = 'Dramatic' WHERE genre = 'Drama'; SELECT pg_current_wal_insert_lsn();

That returns a value like 0/0306EE20. Store that somewhere (a signed cookie would work) such that on a subsequent request your application can do:

WAIT FOR LSN '0/0306EE20' WITH (TIMEOUT '0.1s'); SELECT * FROM movie WHERE genre = 'Drama';

The timeout is optional - if you provide one you'll get an error if the replica you are talking to doesn't catch up within the specified time.

I first encountered this pattern in Wikipedia, which has a hand-rolled version of this built against MySQL replication:

In addition to this, MediaWiki attempts to ensure that the user sees events occurring on the wiki in chronological order. A few seconds of lag can be tolerated, as long as the user sees a consistent picture from subsequent requests. This is done by saving the primary binlog position in the session, and then at the start of each request, waiting for the replica to catch up to that position before doing any reads from it.

Here's the relevant MediaWiki code, which these days uses MySQL's WAIT_FOR_EXECUTED_GTID_SET() function and falls back to MASTER_POS_WAIT().

Recent articles

Running the full server-side Datasette Python app in the browser with service workers and Pyodide - 17th November 2026

Locating the source of a mysterious beep with Claude - 9th November 2026

Hide your slop PR descriptions behind - 9th November 2026

Qwen 3.8 27B on my laptop can interpret model weights, too - 3rd November 2026

This is a link post by Simon Willison, posted on 19th November 2026.

mysql 82

postgresql 161

replication 32

scaling 149

wikipedia 79

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe

Disclosures

Colophon

©

2002

2003

2004

2005

2006

2007

2008

2009

2010

2011

2012

2013

2014

2015

2016

2017

2018

2019

2020

2021

2022

2023

2024

2025

2026

Key points and analysis

Article intelligence

EngineersAdvanced

Key points

  • PostgreSQL 19 was delayed as the team addressed AI-reported vulnerabilities
  • New WAIT FOR LSN command enables read-your-writes consistency for standby reads
  • The pattern was previously hand-rolled in MediaWiki for MySQL replication

Highlights and analysis are generated automatically and may contain errors. Check the original source.