RefLib

Reference library for AI

Back

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:

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.

Processing such indexes is still possible using REINDEX SYSTEM and reindexdb --system (see postgresql_16:7.2.19).

Columns of parent/partitioned and child/partition tables must all have the same generation status, though now the actual generation expressions can be different.

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.

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).

Collations and locales can vary between databases so having them as read-only server variables was unhelpful.

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.

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.

Back