E.3. Postgres Pro Standard 11.21.1

Release Date: 2023-08-16

E.3.1. Overview

This release is based on PostgreSQL 11.21 and Postgres Pro Standard 11.20.1. All improvements inherited from PostgreSQL 11.21 are listed in PostgreSQL 11.21 Release Notes. Other major changes and enhancements are as follows:

  • Added the enable_appendorpath configuration parameter, which enables the Append plan for OR clauses. It is useful for applications with auto-generated queries.

  • Ended support for Debian 9.

  • Fixed an outdated recommendation to customize a unit file in the postgrespro-std-11.service file comments.

  • Fixed the optimizer estimation of the number of tuples with the same hash key. The optimizer did not take into account that in a join by a large number of columns, the number of unique hash keys must rapidly grow, considered the number of hash keys to be small and finally chose merge join instead of hash join.

  • Fixed usage of the joinsel component, which is needed for a more accurate cardinality estimation by several columns. If for some reason (for example, because of insufficient detailed statistics) joinsel cannot make a good prediction, Postgres Pro will not use joinsel in this particular case, but estimate cardinality using a regular algorithm. If joinsel has to estimate cardinality by a single column, a regular algorithm will also be used instead.

  • Fixed a bug that did not allow storing data of the mchar, mvarchar types larger than 250 MB. Now up to 1 GB of data of these types can be stored correctly.

  • Upgraded pg_probackup to version 2.6.5, which provides optimizations and bug fixes.

    • An attempt of a partial restore to a non-empty PGDATA directory now completes with an error, but a possibility of such a restore is retained with the --destroy-all-other-dbs flag specified.

    • Fixed inclusion of allocated but empty pages in an incremental backup.

    • Fixed point-in-time recovery issues:

      • Restore on the recovery time specified by the pg_probackup show command

      • Restore from backups with the --recovery-target-timeline and --no-validate options

    • Renamed the --skip-if-exist flag to --skip-if-exists

  • Upgraded PTRACK to version 2.5 Enterprise.

E.3.2. Migration to Version 11.21.1

If you are upgrading from Postgres Pro Standard based on the same PostgreSQL major version, it is enough to install the new version into your current installation directory.

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 Standard 11.6.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 11.7.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

Version 11.7.1 also fixes SIMILAR TO and POSIX regular expressions that use character classes for icu collations, so you may need to check for objects that use such regular expressions.

Starting from Postgres Pro Standard 11.6.1, the ICU library upgrade does not interfere with the server start. Before connecting to a database using ICU as the default collation, Postgres Pro compares this collation version to the one provided by the ICU library and displays a warning if the collation versions do not match; you may need to rebuild the objects that depend on the default collation if you think the collation change may affect the sort order of your data. To suppress these warnings, you can use the ALTER COLLATION "default" REFRESH VERSION command, as explained in ALTER COLLATION.

Since pg_probackup delivery model changed in Postgres Pro Standard 11.2.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 Postgres Pro versions 11.11.1 or lower, rebuild covering indexes containing at least one included column of type for which the collation was defined in the table.

If you are upgrading from Postgres Pro versions 11.11.2 or lower and take PTRACK backups using pg_probackup, retake a full backup after upgrade.

To migrate from PostgreSQL or a Postgres Pro Standard release based on a previous PostgreSQL major version, see the migration instructions for version 11. If you are opting for a dump/restore, make sure to use the --add-collprovider option to correctly choose the provider for the default collation of the migrated database.