postgresql_16:9.5.16.2 Migration to Version 16
PostgreSQL 16 > Appendixes > Release Notes > Release 16 > Migration to Version 16
A dump/restore using (see postgresql_16:7.2.12) or use of (see postgresql_16:7.3.10) or logical replication is required for those wishing to migrate data from any previous release. See (see postgresql_16:4.4.6) for general information on migrating to new major releases.
Version 16 contains a number of changes that may affect compatibility with previous releases. Observe the following incompatibilities:
- Change assignment rules for PL/pgSQL (see postgresql_16:6.6.7.2) bound cursor variables (Tom Lane) §
Previously, the string value of such variables was set to match the variable name during cursor assignment; now it will be assigned during OPEN (see postgresql_16:6.6.7.2), and will not match the variable name. To restore the previous behavior, assign the desired portal name to the cursor variable before OPEN.
- Disallow
NULLS NOT DISTINCT(see postgresql_16:7.1.67) indexes for primary keys (Daniel Gustafsson) § - Change
REINDEX DATABASE(see postgresql_16:7.1.161) and reindexdb (see postgresql_16:7.2.19) to not process indexes on system catalogs (Simon Riggs) § §
Processing such indexes is still possible using REINDEX SYSTEM and reindexdb --system (see postgresql_16:7.2.19).
- Tighten
GENERATED(see postgresql_16:3.2.3) expression restrictions on inherited and partitioned tables (Amit Langote, Tom Lane) §
Columns of parent/partitioned and child/partition tables must all have the same generation status, though now the actual generation expressions can be different.
- Remove pg_walinspect (see postgresql_16:9.6.37) functions
pg_get_wal_records_info_till_end_of_wal()andpg_get_wal_stats_till_end_of_wal()(Bharath Rupireddy) § - Rename server variable
force_parallel_modetodebug_parallel_query(see guc-debug-parallel-query) (David Rowley) § § - Remove the ability to create views (see postgresql_16:7.1.95) manually with
ON SELECTrules (Tom Lane) § - Remove the server variable
vacuum_defer_cleanup_age(Andres Freund) §
This has been unnecessary since hot_standby_feedback (see guc-hot-standby-feedback) and replication slots (see postgresql_16:4.12.2.6) were added.
- Remove server variable
promote_trigger_file(Simon Riggs) §
This was used to promote a standby to primary, but is now more easily accomplished with pg_ctl promote (see postgresql_16:7.3.5) or pg_promote() (see functions-recovery-control-table).
- Remove read-only server variables
lc_collateandlc_ctype(Peter Eisentraut) §
Collations and locales can vary between databases so having them as read-only server variables was unhelpful.
- Role inheritance now controls the default inheritance status of member roles added during
GRANT(see postgresql_16:7.1.148) (Robert Haas) §
The role's default inheritance behavior can be overridden with the new GRANT ... WITH INHERIT clause. This allows inheritance of some roles and not others because the members' inheritance status is set at GRANT time. Previously the inheritance status of member roles was controlled only by the role's inheritance status, and changes to a role's inheritance status affected all previous and future member roles.
- Restrict the privileges of
CREATEROLE(see postgresql_16:7.1.76) and its ability to modify other roles (Robert Haas) § §
Previously roles with CREATEROLE privileges could change many aspects of any non-superuser role. Such changes, including adding members, now require the role requesting the change to have ADMIN OPTION permission. For example, they can now change the CREATEDB, REPLICATION, and BYPASSRLS properties only if they also have those permissions.
- Remove symbolic links for the postmaster binary (Peter Eisentraut) §