E.4. Postgres Pro Enterprise 9.6.21.1

Release date: 2021-02-26

E.4.1. Overview

This release is based on PostgreSQL 9.6.21 and Postgres Pro Enterprise 9.6.20.1. All improvements inherited from PostgreSQL 9.6.21 are listed in PostgreSQL 9.6.21 Release Notes. As compared with Postgres Pro Enterprise 9.6.20.1, this version also provides the following changes:

  • Deprecated the cfs_compress_small_relations parameter. Small relations are still compressed by default and will not differ from the bigger ones. Make sure to keep the existing parameter setting intact for the lifetime of your database cluster.

  • Fixed a bug in the CFS implementation that resulted in disabling compression for all relations when the cfs_compress_temp_relations parameter was set.

  • Added the pg_snapshot_any function to help superusers explore corrupted databases. See Section 9.26.11 for details.

  • Aligned the behavior of the parameters idle_session_timeout and idle_in_transaction_session_timeout with how they will behave in a future PostgreSQL release. Specifically, the idle_session_timeout parameter now applies only when outside a transaction.

  • Upgraded pg_probackup to the latest version 2.4.10. Major improvements over the previously included version 2.4.2 are as follows:

    • Incremental restore with --force flag now allows you to overwrite the contents of the directory specified by PGDATA in case of system ID mismatch. Previously this resulted in an error.

    • It is now possible to restore and validate backups from a read-only filesystem.

    • In-place merge is now disabled only if the storage format changed.

    • Non-exclusive backup locks are implemented, which enables concurrent validate and restore. Backup shared locks are now released at the process exit.

    • Streamed WAL segments are now added to the backup filelist on the fly and fsynced to disk at the end of the backup.

    See pg_probackup documentation for details.

  • Fixed a bug in pgpro_scheduler due to which jobs scheduled to run exactly at the start of an hour (but at a two-hour or larger interval) were not executed at all.

  • Added pgpro_controldata utility to display control information of a PostgreSQL/Postgres Pro database cluster and compatibility information for a cluster and/or server.

E.4.2. Migration to Version 9.6.21.1

Depending on your current installation, the upgrade procedure will differ.

To migrate from vanilla PostgreSQL 9.6.x or Postgres Pro Standard, make sure you have installed its latest minor version and then perform a dump/restore using pg_dumpall. Besides, make sure to pay special attention to implementation specifics of 64-bit transaction IDs. If you have used explicit casts to 32-bit integers when handling transaction IDs, you have to replace them with casts to bigint since 64-bit transaction IDs are of the bigint type.

While functions numeric_eq, numeric_ne, numeric_gt, numeric_ge, numeric_lt, and numeric_le are actually leakproof, they were not marked as such in Postgres Pro Enterprise 9.6.16.1 or lower, which could lead to incorrect query optimization. In particular, it negatively affected query execution if row-level security policy was in use. Version 9.6.17.1 repairs this issue for new installations by correcting the initial catalog data, but existing installations will still have incorrect markings unless you update pg_proc entries for these functions. You can run pg_upgrade to upgrade your server instance to a version containing the corrected initial data, or manually correct these entries in each database of the installation using the ALTER FUNCTION command. For example:

ALTER FUNCTION pg_catalog.numeric_eq LEAKPROOF

To upgrade from a Postgres Pro Enterprise version based on the same PostgreSQL major release, a dump/restore is not required. It is usually enough to install the new version into the same installation directory. Once the new binaries are installed, the pgpro_upgrade script is run automatically to check whether additional setup is required and complete the upgrade.

Since pg_probackup delivery model changed in Postgres Pro Enterprise 9.6.12.1, when upgrading from a lower version on ALT Linux and Debian-based systems, run apt dist-upgrade (or apt-get dist-upgrade) to ensure that all new dependencies are handled correctly. On Windows, you have to run a separate pg_probackup installer to complete the upgrade.

When upgrading from versions 9.6.9.1 through 9.6.14.1, you must run the REINDEX command to rebuild GIN, GiST, and SP-GiST indexes to fix replication issues that could be observed in these versions. You should also retake all backups for these versions if your database had such indexes.

When upgrading from versions 9.6.8.2 or lower, you have to rebuild indexes that used mchar or mvarchar types.

When upgrading from versions 9.6.2.1 or lower, you have to rebuild GiST indexes built over columns of the intarray type.

When upgrading from version 9.6.1.2 on RPM-based Linux distributions, make sure to move the data directory from pgsql to the pgproee directory before running the pgpro_upgrade script.

For some Linux distributions, you may be prompted to run pgpro_upgrade manually. In this case, you must stop the postgres service. The script must be run on behalf of the user owning the database (typically postgres) and PGDATA environment variable should be set to the directory where database resides. Running pgpro_upgrade as root will result in an error. This step is not required when upgrading from version 9.6.4.1 or higher.