PostgreSQL 19 Released
PostgreSQL 19 is released with new features, including 'read-your-writes' consistency. This release was delayed due to AI-reported vulnerability issues.
Original reporting · simonwillison.net
Read “PostgreSQL 19 Released” at Simon Willison →How this was written. Content Delta wrote this article with a language model from Simon Willison’s reporting (model: @cf/meta/llama-3.3-70b-instruct-fp8-fast); it describes that reporting rather than adding to it. The original, linked above, is the full story.
Key points from Simon Willison’s report
- PostgreSQL 19 has been released with new features, including 'read-your-writes' consistency.
- The release was delayed due to the team addressing AI-reported vulnerability issues.
- The WAIT FOR LSN command allows applications to ensure that data written to the primary database is visible on standby servers.
- The concept of 'read-your-writes' consistency has been implemented in other systems, such as Wikipedia's MediaWiki.
- The release of PostgreSQL 19 provides a new level of consistency and reliability for applications that use the database management system.
The PostgreSQL team has released version 19 of their database management system, according to Simon Willison. This release was initially expected in September but was delayed due to the team addressing various issues, including AI-reported vulnerabilities. The delay has resulted in a more polished release, with several new features. PostgreSQL 19 is now available for use.
One of the key features of PostgreSQL 19 is the addition of 'read-your-writes' consistency, which allows applications to ensure that data written to the primary database is visible on standby servers. This is achieved through the new WAIT FOR LSN command, which enables a session on a standby server to wait until the standby has replayed the write-ahead log up to a specific log sequence number. This feature is particularly useful for applications that send reads to standbys.
The WAIT FOR LSN command works by allowing an application to store the log sequence number of a write operation and then use this value to wait for the standby server to catch up before running a query. This ensures that the application can read the data it just wrote on the primary server. The command also supports an optional timeout, which can be used to specify a maximum amount of time to wait for the standby server to catch up.
The concept of 'read-your-writes' consistency is not new and has been implemented in other systems, such as Wikipedia's MediaWiki. MediaWiki uses a hand-rolled version of this feature with MySQL replication to ensure that users see events occurring on the wiki in chronological order. This is achieved by saving the primary binlog position in the session and then waiting for the replica to catch up to that position before doing any reads from it.
The release of PostgreSQL 19 is significant, as it provides a new level of consistency and reliability for applications that use the database management system. The addition of 'read-your-writes' consistency and other features makes PostgreSQL 19 a worthwhile upgrade for users. The PostgreSQL team's efforts to address vulnerabilities and improve the system have resulted in a high-quality release.
As users begin to adopt PostgreSQL 19, they can expect to see improvements in the performance and reliability of their applications. The new features and improvements in this release make it an attractive option for developers and organizations looking for a robust and reliable database management system. With the release of PostgreSQL 19, the PostgreSQL team has demonstrated its commitment to providing a high-quality and secure database management system.
The future of PostgreSQL looks promising, with the team continuing to work on new features and improvements. As the database management system evolves, users can expect to see even more advanced features and capabilities. With the release of PostgreSQL 19, the PostgreSQL team has set a new standard for database management systems, and users can look forward to seeing what the future holds.
Questions and answers
What is the main new feature of PostgreSQL 19?
The main new feature of PostgreSQL 19 is the addition of 'read-your-writes' consistency, which allows applications to ensure that data written to the primary database is visible on standby servers.
How does the WAIT FOR LSN command work?
The WAIT FOR LSN command works by allowing an application to store the log sequence number of a write operation and then use this value to wait for the standby server to catch up before running a query.
Why was the release of PostgreSQL 19 delayed?
The release of PostgreSQL 19 was delayed due to the team addressing various issues, including AI-reported vulnerabilities.



