On 5/6/25 9:15 AM, Álvaro Herrera wrote:
On 2025-May-05, Jonathan S. Katz wrote:### Other Highlights Starting with PostgreSQL 18, data checksums, which are used to validate the integrity of stored data, are now enabled by default on new PostgreSQL clusters. You can choose to disable this behavior using the `initdb --no-data-checksums` command. `pg_createsubscriber` now supports an `--all` flag so you can create logical replicas for all databases in an instance with a single command. Additionally, PostgreSQL 18 lets you create the schema definition of a foreign table using the definition of a local table using the `CREATE FOREIGN TABLE ... LIKE` command.In this section I would add the work on not-null and NOT ENFORCED constraints, not because I think they are very important, but because they have the potential to break stuff; and if they do, it would be very useful to know before GA. Maybe something like Some constraint features have been revised: foreign-key and check constraints can now be made NOT ENFORCED and altered into enforceability; not-null constraints now preserve their names as mandated by the SQL-standard, support the NOT VALID and NO INHERIT clauses, as well as behave more consistently on inheritance situations. Now that I look again, I see no mention of temporal UNIQUE, PRIMARY KEY and FOREIGN KEY constraints (commits fc0438b4e805 and 89f908a6d0ac). I think they are a very important feature, perhaps they even warrant a section of their own. So maybe I'd suggest to add a section "### Constraints" and put all these things in there.
Here's the next update (CCing folks who commented); I added a sentence on the new constraints that are available in the developer experience section, and the sentence around the behavior towards the bottom. Please let me know if you think this sufficiently explains the feature.
Thanks for the review! Jonathan
The PostgreSQL Global Development Group announces that the first beta release of PostgreSQL 18 is now [available for download](https://www.postgresql.org/download/). This release contains previews of all features when PostgreSQL 18 is made generally available, though some details of the release can change during the beta period. You can find information about all of the PostgreSQL 18 features and changes in the [release notes](https://www.postgresql.org/docs/18/release-18.html): [https://www.postgresql.org/docs/18/release-18.html](https://www.postgresql.org/docs/18/release-18.html) In the spirit of the open source PostgreSQL community, we strongly encourage you to test the new features of PostgreSQL 18 on your systems to help us eliminate bugs and other issues. While we do not advise you to run PostgreSQL 18 Beta 1 in production environments, we encourage you to find ways to run your typical application workloads against this beta release. Your testing and feedback helps the community ensure that PostgreSQL 18 upholds our standards of delivering a stable, reliable release of the world's most advanced open source relational database. Please read more about our [beta testing process](https://www.postgresql.org/developer/beta/) and how you can contribute: [https://www.postgresql.org/developer/beta/](https://www.postgresql.org/developer/beta/) PostgreSQL 18 Feature Highlights -------------------------------- Below are some of the feature highlights that are planned for PostgreSQL 18. This list is not exhaustive; for the full list of planned features, please see the [release notes](https://www.postgresql.org/docs/18/release-18.html). ### Performance PostgreSQL 18 introduces an asynchronous I/O (AIO) subsystem. This new subsystem allows to increase I/O throughput and to hide I/O latency. On Linux `io_uring` can be used for AIO, a worker based implementation is available on all platforms. This initial release supporting file system reads such as sequential scans, bitmap heap scans, and vacuums, with tests showing up to a 2-3x performance improvements. These performance gains extend to query optimizations and new indexing features. PostgreSQL 18 adds support for using "skip scan" lookups on multicolumn B-tree indexes, which can result in faster execution times for queries that omit a "=" condition on one or more prefix index columns. This release also includes optimizations for `WHERE` clauses that contain `OR` and `IN (...)` statements to better utilize recent indexing improvements which can also result in better query performance. There are also numerous performance improvements for how PostgreSQL plans and executes table joins, from allowing merge joins to use incremental sorts and improving the overall performance of hash joins. There are a variety of other PostgreSQL 18 features that improve performance for other query and maintenance operations. PostgreSQL 18 now supports parallel builds for GIN indexes, which are commonly used for search over JSON and full-text data. This release also allows you to define partition keys and materialized views with unique indexes which aren't B-trees. PostgreSQL 18 also improves overall locking performance for queries that access many relations, and adds several improvements to queries over partitioned tables, including improved pruning and join support. PostgreSQL 18 also has performance improvements in text processing, including general speedups to the `upper`/`lower` functions and a new built-in collation `PG_UNICODE_FAST`. ### Upgrading Before PostgreSQL 18, an important step after performing a major version upgrade was to run the `ANALYZE` to generate statistics, which is a critical component of helping PostgreSQL to select the most efficient query plan. Based on the size and overall activity of a PostgreSQL cluster, this could be a time consuming process, and potentially impact query performance until the process completed. PostgreSQL 18 introduces the ability to keep planner statistics through a major version upgrade, which helps an upgraded cluster to get to its expected performance state sooner once it's available. Additionally, `pg_upgrade`, the utility used to facilitate a major version upgrade, added several performance enhancements to help accelerate upgrades with many objects, such as tables and sequences. This release also allows pg_upgrade to process its checks in parallel based on the settings of the `--jobs` flag, and also adds the `--swap` flag, which swaps upgrade directories instead of copying, cloning, or linking files. ### Developer Experience PostgreSQL 18 introduces virtual generated columns that compute the column values just-in-time during query execution, instead of having to store them. This is now the default option for generated columns. Additionally, stored generated columns can now be logically replicated. This release adds the capability to access both the previous (`OLD`) and current (`NEW`) values in the `RETURNING` clause for `INSERT`, `UPDATE`, `DELETE` and `MERGE` commands. Additionally, PostgreSQL 18 adds support for UUIDv7 generation through the `uuidv7()` function, letting you generate random UUIDs that are timestamp-ordered to support better caching strategies (this release also adds `uuidv4()` as an alias for `gen_rand_uuid`). Now in PostgreSQL 18, you can make `LIKE` comparisons over text that uses a nondeterministic collation, making it simpler to do more complex pattern matching. Additionally, this release introduces the `CASEFOLD` to help with case-insensitive matches. This release also adds temporal constraints, or constraints over ranges, for both `PRIMARY KEY` and `UNIQUE` constraints using the `WITHOUT OVERLAPS` clause, and on `FOREIGN KEY` constraints using the `PERIOD` clause. ### Security Features PostgreSQL 18 introduces `oauth` authentication, which people can create extensions that support OAuth 2.0 based authentication mechanisms that PostgreSQL can authenticate with. Additionally, PostgreSQL 18 adds several features to validate and enforce FIPS mode behavior, and also adds the `ssl_tls13_ciphers` to let users configure which TLS v1.3 cipher suites the server can use. This release deprecates `md5` password authentication in favor of using SCRAM authentication that was first added in PostgreSQL 10. Additionally, PostgreSQL 18 adds support for SCRAM passthrough authentication with both `postgres_fdw` and `dblink` when authenticating to remote PostgreSQL instances. ### Monitoring and Observability PostgreSQL 18 adds more details to the `EXPLAIN` utility, which provides information about query plan execution, and as of this release now automatically shows how many buffers (the fundamental unit of data storage) are accessed when executing `EXPLAIN ANALYZE`. Additionally, `EXPLAIN ANALYZE` now shows how many index lookups occur during an index scan, and `EXPLAIN ANALYZE VERBOSE` includes CPU, WAL, and average read statistics. This release also includes information about the total amount of time spent vacuuming and analyzing a table in `pg_stat_all_tables`, and now shows per-connection statistics on I/O and WAL utilization. PostgreSQL 18 also provides more insights into write conflicts that occur during logical replication, and surfaces this information both in logs and in the `pg_stat_subscription_stats` view. ### Other Highlights Starting with PostgreSQL 18, data checksums, which are used to validate the integrity of stored data, are now enabled by default on new PostgreSQL clusters. You can choose to disable this behavior using the `initdb --no-data-checksums` command. Note that this may require changes to your upgrade scripts. Additionally, there are new behaviors available in several constraint features. First, both foreign key and check constraints can be set as `NOT ENFORCED` and conversely, made enforceable. Additionally, `NOT NULL` constraints now preserve their names as required by the SQL standard, support the `NOT VALID` and `NO INHERIT` clauses, and now behave more consistently with inheritance. `pg_createsubscriber` now supports an `--all` flag so you can create logical replicas for all databases in an instance with a single command. Additionally, PostgreSQL 18 lets you create the schema definition of a foreign table using the definition of a local table using the `CREATE FOREIGN TABLE ... LIKE` command. Additional Features ------------------- Many other new features and improvements have been added to PostgreSQL 18. Many of these may also be helpful for your use cases. Please see the [release notes](https://www.postgresql.org/docs/18/release-18.html) for a complete list of new and changed features: [https://www.postgresql.org/docs/18/release-18.html](https://www.postgresql.org/docs/18/release-18.html) Testing for Bugs & Compatibility -------------------------------- The stability of each PostgreSQL release greatly depends on you, the community, to test the upcoming version with your workloads and testing tools to find bugs and regressions before the general availability of PostgreSQL 18. As this is a Beta, minor changes to database behaviors, feature details, and APIs are still possible. Your feedback and testing will help determine the final tweaks on the new features, so please test in the near future. The quality of user testing helps determine when we can make a final release. A list of [open issues](https://wiki.postgresql.org/wiki/PostgreSQL_18_Open_Items) is publicly available in the PostgreSQL wiki. You can [report bugs](https://www.postgresql.org/account/submitbug/) using this form on the PostgreSQL website: [https://www.postgresql.org/account/submitbug/](https://www.postgresql.org/account/submitbug/) Beta Schedule ------------- This is the first beta release of version 18. The PostgreSQL Project will release additional betas as required for testing, followed by one or more release candidates, until the final release around September/October 2025. For further information please see the [Beta Testing](https://www.postgresql.org/developer/beta/) page. Links ----- * [Download](https://www.postgresql.org/download/) * [Beta Testing Information](https://www.postgresql.org/developer/beta/) * [PostgreSQL 18 Beta Release Notes](https://www.postgresql.org/docs/18/release-18.html) * [PostgreSQL 18 Open Issues](https://wiki.postgresql.org/wiki/PostgreSQL_18_Open_Items) * [Submit a Bug](https://www.postgresql.org/account/submitbug/) * [Donate](https://www.postgresql.org/about/donate/)
OpenPGP_signature.asc
Description: OpenPGP digital signature