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.
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:
Source: Simon Willison — Read the full article on the original site ↗
