E.1. Postgres Pro Enterprise 16.6.1 #

Release Date: 2024-12-13

E.1.1. Overview #

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

  • Implemented preliminary check to determine whether new data provides sufficient basis for further query replanning. If no additional knowledge is available at the trigger point, query execution continues.

  • Added the ability to form the MergeAppend operation instead of Append, which allows omitting additional sorting needed to ensure that the data is in fact sorted. Now MergeAppend is formed specifying the columns to sort by. The new ability applies only when the enable_appendorpath option is set to ON.

  • Improved performance of CFS by reducing the number of invalidation messages for tables, which previously caused multiple file reopen events. Now invalidation is targeted at the specific segments affected by the garbage collector.

  • In JSON files that store frozen plans, arrays of parameter types are now displayed in the text format instead of numeric, making it easier to edit an incorrect parameter type.

  • Allowed transformation of correlated IN subqueries into joins.

  • Implemented the ability to dump the state of a single backend process by sending the dump signal.

  • Added a validation step to check for non-zero values in unused header fields of *.cfm files by pg_upgrade.

  • Improved the real-time query replanning output: the Total Execution Time property was renamed Total Elapsed Time; a new Final Run Planning Time property was added, which represents the planning time during the last reoptimization. Also the Planning Time field of EXPLAIN now includes the execution time of attempts aborted by real-time query replanning.

  • Changed the error level to calculate the statistics on vacuum interrupts to ERROR (PGERROR) only. Calculating vacuum interrupts for the PANIC error level could cause unpredictable system behavior, and the statistics could not be calculated anyway because of the server crash.

  • Fixed a use-after-free bug that could lead to a segmentation fault when using both real-time query replanning and aqo.

  • Fixed logging of replanning reasons. Previously, all replanning events were incorrectly logged with "Replanning triggered by timeout".

  • Fixed a security bug in pgpro_sfile where SECURITY DEFINER functions did not manage search_path. This potentially allowed attackers to execute arbitrary code with superuser privileges.

  • Fixed cfs_gc_relation to return the actual number of processed segments of the relation.

  • Fixed an issue with upgrading from PostgreSQL or Postgres Pro Standard to Postgres Pro Enterprise using pg_upgrade when a multitransaction offset counter overflow occurred.

  • Fixed the processing of 64-bit transaction IDs with proper encoding and decoding of the transaction ID.

  • Fixed an issue with upgrading from PostgreSQL or Postgres Pro Standard to Postgres Pro Enterprise using pg_upgrade that could occur when attempting to convert heap pages to the double xmax page format in cases where there was insufficient free space to accommodate the special area. In the presence of multitransactions, this could lead to errors like MultiXactId XXXXX has not been created yet or could not access status of transaction XXXXXX, depending on the server version. No data loss is expected as the actual conversion did not occur. Pages will now be safely converted upon first access.

  • Fixed a memory leak that could occur when the EXPLAIN command's output produced over 64 columns.

  • Fixed a segmentation fault, which could occur while executing the COPY TO command when using the online_analyze module.

  • Fixed an issue where EXPLAIN ANALYZE showed incorrect counts of inserted and conflicted tuples during row inserts with conflicting primary keys when using ON CONFLICT DO NOTHING.

  • Fixed an issue that could slow down query execution. The reason was that the optimizer selected a suboptimal index due to the lack of its cost estimation after removing redundant clauses with the enable_appendorpath option set to ON.

  • Fixed an issue in the parsing of prepared statement names when the statement name contained an SQL command name, and removed the no-longer-needed sr_plan.max_consts_len.

  • Added support of the extended query protocol for the real-time query replanning.

  • Added support for ARM architecture for Red OS Murom 8.

  • Removed support for legacy data loading, previously required for reading obsolete sr_plan binary plans and converting them to the JSON format. A minimal functionality is retained to detect legacy files, back them up, and log a message.

  • Upgraded aqo to include the following optimizations and bug fixes:

    • Introduced the aqo sandbox mode, which allows working in an isolated environment without touching the main aqo knowledge base. This mode can be turned on either on a primary or a standby node by setting aqo.sandbox to on.

    • Enhanced aqo wide search (aqo.wide_search = on) to utilize data from multiple neighbors simultaneously. Also, revised its interaction with aqo.min_neighbors_for_predicting to allow queries with fewer than the specified number of data samples to participate in wide search. Previously, such queries were excluded from consideration.

    • Fixed an array index out-of-bounds issue in the aqo smart statement timeout update logic, as well as incorrect statistics insertion into aqo_query_stats when the arrays were full. In previous releases, using aqo_query_stat_update with arrays of size 20 or more could lead to subsequent statistics updates being written to uncontrolled memory segments. Make sure to install the Postgres Pro on both primary and standby servers to avoid similar memory corruption problems.

  • Improved the built-in high-availability feature to provide the following features, optimizations, and bug fixes:

    • Upgraded biha to version 1.4.

    • Implemented the callbacks to call custom SQL functions, which can notify users or external services about events in the BiHA cluster.

    • Implemented a mechanism that enables relaxed synchronous replication for the BiHA cluster. To relax synchronous replication restrictions, specify the --sync-standbys-min parameter when initializing the cluster with the bihactl init command, or later by means of the biha.set_sync_standbys_min function.

    • Added the biha.node_priority configuration parameter that allows you to manage voting by means of setting node priorities in the BiHA cluster.

    • Added the biha.set_nquorum and biha.set_minnodes functions to configure the biha.nquorum and biha.minnodes configuration parameters independently. Previously, these parameters could only be set together by the biha.set_nquorum_and_minnodes function.

    • Added the biha.can_vote and biha.can_be_leader configuration parameters that allow you to manage the ability of the BiHA cluster nodes to vote and stand as candidates in elections of the new leader correspondingly.

    • Added the biha.flw_ro configuration parameter that allows you to determine whether a node can be available for read operations.

    • Implemented a mechanism that automatically disables reading from the node in the NODE_ERROR state.

    • Updated the biha.nodes_v view. The view table now also displays the node that the view is queried on.

    • Changed the way the GUC parameters essential for biha operation are managed. Previously, manual modification of the following parameters was not forbidden: primary_conninfo, primary_slot_name, synchronous_standby_names. However, manual change of the above mentioned parameters could have negative impact on the BiHA cluster operation. Now, when biha is loaded and configured, these parameters are managed by biha only, and you cannot modify them with ALTER SYSTEM.

    • Optimized the behavior of the BiHA cluster when replication cannot proceed due to deletion of the required WAL files determined in the max_slot_wal_keep_size parameter. In this situation, the node that falls behind transfers to the NODE_ERROR state.

    • Fixed a bug that caused the reboot of a leader candidate in case it does not know the ID of the old leader.

    • Fixed an issue with the data directory size growth on the referee node in referee_with_wal mode.

    • Fixed a bug that caused authentication issues when setting up a BiHA cluster from the existing cluster. The biha extension now uses the same password encryption algorithm that is set in the postgresql.conf file of the converted primary node.

  • Upgraded citus to version 12.1.5.2.

  • Upgraded mamonsu to version 3.5.9, which provides optimizations and bug fixes. Notable changes are as follows:

    • Added support for systems where setuptools version greater than 67.7.2 is installed.

    • Ended the use of dotted user:group specification at the RPM pre-install stage.

  • Upgraded multimaster to version 1.2.0. Significantly increased catchup performance by enabling asynchronous commit operations on a lagging node syncing with the donor node, controlled by the multimaster.enable_async_3pc_on_catchup parameter.

  • Upgraded the ODBC driver to version 17.00.0002.

  • Upgraded oracle_fdw to version 2.7.0.

  • Upgraded orafce to version 4.13.5.

  • Upgraded pg_filedump to version 17.1, which specifically fixed an issue that could cause pg_filedump to crash with a segmentation fault when handling incomplete pages.

  • Upgraded pg_hint_plan to version 1.6.1.

  • Upgraded pg_integrity_check to display actual checksum values, if the checksums differ, only with the --verbose option.

  • Upgraded pg_portal_modify to version 0.3.4.

  • Upgraded pg_proaudit to provide the following optimizations and bug fixes:

    • Added logging of security events related to operations with profiles: CREATE PROFILE, ALTER PROFILE, and DROP PROFILE.

    • Changed the distribution of security events related to functions and stored procedures among the groups of security events: the ALL_DDL group now includes no events related to functions and stored procedures, ALL_PROC includes CREATE, ALTER, and DROP, while ALL_DML includes EXECUTE.

    • Fixed compatibility with the connection pooler. Previously, issues could be encountered when logging AUTHENTICATE and DISCONNECT security events.

    • Fixed logging of security events on partitioned tables by pg_proaudit. Now the SELECT/UPDATE/INSERT/DELETE/TRUNCATE events on a partitioned table get logged if logging rules imply logging of appropriate events for this table. Previously, only events on individual partitions were logged.

  • Upgraded pg_probackup to version 2.8.5 Enterprise, which provides the following optimizations and bug fixes:

    • Enabled the output of the version command in the JSON format using --format=json.

    • Added the --all option to the amcheck command, which allows performing all the checks in a single command.

    • Added support for the include parameter in the configuration file. The contents of the file specified in include gets added to the configuration file instead of this parameter.

    • Added a possibility to specify an individual number of threads for execution of a backup and its subsequent validation by specifying the --backup-threads and --validate-threads option, respectively.

    • Changed the priority of setting PGDATA and BACKUP_PATH. Now the values from the command-line options take precedence.

    • Added validation of WAL files for backups to be merged by the merge command.

    • An error message that was issued when the validate command run with the --wal option found an archive in the DEGRADED status has been replaced with a warning since backups in this status do not affect the restore correctness as a whole.

    • Added support for the --s3-config-file option of restore_command. postgresql.auto.conf must include the restore_command with the --s3-config-file option if the backup was created with this option.

    • The default value of PG_PROBACKUP_S3_IGNORE_CERT_VER is set to on according to the documentation.

    • Fixed an issue that could occur if the command line was too long.

    • Fixed an issue that could occur during validation or restore when the PITR from a previous timeline was performed.

    • Fixed an issue that could occur when the S3 connection port was specified both in PG_PROBACKUP_S3_PORT and PG_PROBACKUP_S3_HOST. Now the value specified in PG_PROBACKUP_S3_HOST, together with the address, has higher priority.

  • Upgraded pgpro_bfile to version 1.2, pgpro_sfile to version 1.2, and pgpro_rp to version 1.1. Functions that previously checked whether certain functions were called by a superuser now only check that those functions are called with superuser privileges.

  • Upgraded pgpro_controldata to version 17.1.0.

  • Upgraded pgpro_stats to version 1.8, which supports Postgres Pro 17. Notable changes are as follows:

    • Updated pgpro_stats_statements and pgpro_stats_totals views to include fields added to pg_stat_statements. Related functions were updated accordingly.

    • Streamlined access to views and functions. Specifically, access to the pgpro_stats_archiver, pgpro_stats_vacuum_database, pgpro_stats_vacuum_tables, and pgpro_stats_vacuum_indexes views was granted to all users. Previously, these views required explicitly granting access rights. Access to execution of the pgpro_stats_trace_reset function, which could previously be executed by any user, was restricted to superusers.

    • Implemented an optimization that lowers the locking time in some cases when copying metrics from the local memory to the shared memory.

    • Eliminated an excessive check of holding the lock when accessing the hash table of session-tracing filters.

    • Fixed processing of the pgpro_stats.stats_temp_directory configuration parameter. Previously after the server restart for changes to this parameter value to take effect, the fatal error pfree called with invalid pointer could occur when processing this parameter.

    • Fixed an issue that could occur during session tracing and cause errors could not write file ""pg_stat/pgpro_stats_filters.trace.tmp"": No such file or directory. Concurrent writing from different sessions to a trace file is fixed now, so processes can write to the trace file in parallel without collisions.

  • Upgraded pgpro_pwr to version 4.7, which provides new features, optimizations and bug fixes. Notable changes are as follows:

    • A subsample feature to collect relatively fast changing data.

    • New report tables, specifically regarding session states.

    • Support for new Postgres Pro 17 statistics.

    • A possibility not to reset statistics of the statistics collecting extension during taking a sample.

    • The change of the type for the field that tracks transaction IDs in a certain table from xid to text. The use of the xid type could previously cause a failure of pg_upgrade when upgrading from Postgres Pro Standard to Postgres Pro Enterprise.

  • Upgraded pgpro_scheduler to version 2.10, which provides the following changes:

    • Fixed an issue with automatic restart of one-time jobs after job interruption.

    • Fixed schedule.get_active_jobs to properly return the list of currently executed cron jobs.

    • Fixed an issue where errors occurring during job execution were not properly logged due to a primary key constraint preventing multiple log entries.

    • Fixed an issue where at job executor would fail when the database manager prematurely released the shared memory segment before the worker had connected to it.

    • Fixed an issue where schedule.timetable did not display the next execution time of cron jobs with either next_time_statement or an array of dates. Fixed an issue with calculating next execution time for cron jobs that caused job instances to be skipped.

    • Fixed an issue causing database crashes due to segmentation faults in the job executor background worker.

  • Upgraded pg_repack to version 1.5.1.

  • Upgraded pg_wait_sampling to provide tracking of subquery IDs and utility statements and to add the new pg_wait_sampling.sample_cpu parameter, which allows specifying the sampling mode that determines whether to perform sampling of on-CPU backends.

  • Upgraded pljava to version 1.6.8.

  • Upgraded the PLV8 extension to version 3.2.3.

  • Ensured compatibility of postgres_fdw with autonomous transactions.

  • Upgraded PTRACK to prevent possible issues with PTRACK backups by setting the ptrack.map file for automatic deletion when PTRACK is disabled.

  • Upgraded tds_fdw to version 2.0.4.

E.1.2. Migration to Version 16.6.1 #

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

Important

To upgrade your BiHA cluster from Postgres Pro Enterprise 16.4 or earlier to Postgres Pro Enterprise 16.6, see the Migrating the BiHA Cluster to Version 16.6 section.

ABI versions may change between minor releases of Postgres Pro. If this is the case, and you see the ABI mismatch error when trying to run your extension, make sure to install a new version of the extension supplied with a new release of Postgres Pro, or recompile your third-party extension to be able to use it with the current version of Postgres Pro.

When upgrading your high-availability cluster from Postgres Pro Enterprise versions 16.3.x or lower, first disable automatic failover if it was enabled and upgrade all the standby servers, then upgrade the primary server, promote a standby, and restart the former primary (possibly with pg_rewind).

If you take backups using pg_probackup and you have previously upgraded it to version 2.8.0 Enterprise or 2.8.1 Enterprise, make sure to upgrade it to version 2.8.2 Enterprise or higher and retake a full backup after upgrade, since backups taken using those versions might be corrupted. If you suspect that your backups taken with versions 2.8.0 or 2.8.1 may be corrupted, you can validate them using version 2.8.2.

To upgrade your BiHA cluster from Postgres Pro Enterprise 16.3 or earlier to Postgres Pro Enterprise 16.4, see the Migrating the BiHA Cluster to Version 16.4 section.

To upgrade your BiHA cluster from Postgres Pro Enterprise 16.1 and 16.2 to Postgres Pro Enterprise 16.3, see the Migrating the BiHA Cluster to Version 16.3 section.

To migrate from PostgreSQL, as well as Postgres Pro Standard or Postgres Pro Enterprise based on a previous PostgreSQL major version, see the migration instructions for version 16.