11.1. Updating Postgres Pro AXE #
This section describes how to update Postgres Pro AXE. The update process depends on whether Postgres Pro AXE is installed as a standalone DBMS or as an option to Postgres Pro Enterprise, and also on whether or not Postgres Pro AXE is installed in a BiHA cluster.
The update must be performed during a scheduled maintenance window.
11.1.1. Updating Postgres Pro AXE Installed as a Standalone DBMS #
Before updating Postgres Pro AXE:
If you update from Postgres Pro AXE 1.x, first upgrade to version 2.0. For additional instructions, contact the Postgres Pro technical support.
Record the list of analytical tables, schemas, and storages on the server with the metadata catalog.
When updating from Postgres Pro AXE 2.x, execute the following command:
SELECT s.schema_name AS analytical_schema, t.table_name AS analytical_table, st.storage_name AS storage_name, st.storage_type AS storage_type, st.uri AS storage_uri FROM axe_catalog.axe_table t JOIN axe_catalog.axe_schema s ON t.schema_id = s.schema_id JOIN axe_catalog.axe_storage st ON t.storage_id = st.storage_id WHERE t.end_snapshot IS NULL AND s.end_snapshot IS NULL AND st.end_snapshot IS NULL;When updating from Postgres Pro AXE 1.x, execute the following command:
SELECT s.schema_name AS analytical_schema, t.table_name AS analytical_table, st.storage_name AS storage_name, r.path AS root_storage_path, tmp.path AS temp_storage_path FROM axe_catalog.pga_table t JOIN axe_catalog.pga_schema s ON t.schema_id = s.schema_id JOIN axe_catalog.pga_storage st ON t.storage_id = st.storage_id JOIN axe_catalog.pga_uri r ON st.uri_id = r.uri_id JOIN axe_catalog.pga_uri tmp ON st.tmp_uri_id = tmp.uri_id WHERE COALESCE(t.end_snapshot, 0) = 0 AND COALESCE(s.end_snapshot, 0) = 0 AND COALESCE(st.end_snapshot, 0) = 0;
Record row counts of analytical tables.
Record the locations of Parquet files of analytical tables.
Back up the metadata catalog database.
Record the build number of the currently deployed Postgres Pro AXE.
If Postgres Pro AXE is installed in a BiHA cluster, refer to Section 11.1.3.
To update Postgres Pro AXE installed as a standalone DBMS:
When updating from Postgres Pro AXE 1.x, delete the pgpro_metastore extension that is now depricated:
sudo apt-get remove pgpro-metastore
Install the new versions of the Postgres Pro AXE and pgpro_axe packages without removing the currently installed ones. All versions are available in the repository:
sudo apt update sudo apt install --only-upgrade dbms-axe-17 pgpro-axe
Update the pgpro_axe extension to the version provided by the installed package:
ALTER EXTENSION pgpro_axe UPDATE;
If the extension version already matches the package version, the extension is not updated.
Update the configuration parameters of Postgres Pro AXE.
For example:
shared_preload_libraries = 'pgpro_axe' duckdb.unsafe_allow_execution_inside_functions = on axe.data_storage_location = 'axelake_files' max_prepared_transactions = 100
When updating the
shared_preload_librariesconfiguration parameter, addpgpro_axeto the existing list of the preloaded libraries rather than replacing it. Otherwise, the other preloaded libraries will no longer be loaded.If you update from Postgres Pro AXE 1.x, also remove
pgpro_metastorefrom theshared_preload_librariesconfiguration parameter, since it is no longer a separate library in version 2.x.If the
shared_preload_librariesormax_prepared_transactionsconfiguration parameters were updated, restart the server.(Optional) If you are updating from Postgres Pro AXE 1.x, migrate the metadata catalog.
(Optional) If you plan to execute stored procedures operating with the metadata catalog using their Postgres Pro AXE 1.x names, create aliases.
For the mapping of stored procedures between releases, refer to Appendix B.
Note
The previous stored procedures are supported until December 31, 2027. It is recommended to migrate to the new SQL commands and stored procedures before that date.
Check that Postgres Pro AXE was updated successfully:
Check the versions of the DBMS, the pgpro_axe extension, and the installed packages.
For example:
-- DBMS and pgpro_axe versions -- psql -c "SELECT version();" psql -c "SELECT extversion FROM pg_extension WHERE extname = 'pgpro_axe';" -- installed packages, depending on the OS -- apt list --installed | grep -E 'postgrespro|axe' rpm -qa | grep -E 'postgrespro|axe'
Compare the list of analytical tables, schemas, and storages with the previously recorded one.
Ensure that analytical tables are available by querying and modifying them with standard SQL commands.
For example:
INSERT INTO public.my_table (column1, column2, column3) VALUES ('Value 1', 123, '2026-09-21');Compare the row counts with the previously recorded ones.
For example:
SELECT count(*) FROM public.my_table;
If the update fails, restore the metadata catalog database from the previously created backup and install the previous version of Postgres Pro AXE.
11.1.2. Updating Postgres Pro AXE Installed as an Option to Postgres Pro Enterprise #
Before updating Postgres Pro AXE:
If you update from Postgres Pro AXE 1.x, first upgrade to version 2.0. For additional instructions, contact the Postgres Pro technical support.
Record the list of analytical tables, schemas, and storages on the server with the metadata catalog.
When updating from Postgres Pro AXE 2.x, execute the following command:
SELECT s.schema_name AS analytical_schema, t.table_name AS analytical_table, st.storage_name AS storage_name, st.storage_type AS storage_type, st.uri AS storage_uri FROM axe_catalog.axe_table t JOIN axe_catalog.axe_schema s ON t.schema_id = s.schema_id JOIN axe_catalog.axe_storage st ON t.storage_id = st.storage_id WHERE t.end_snapshot IS NULL AND s.end_snapshot IS NULL AND st.end_snapshot IS NULL;When updating from Postgres Pro AXE 1.x, execute the following command:
SELECT s.schema_name AS analytical_schema, t.table_name AS analytical_table, st.storage_name AS storage_name, r.path AS root_storage_path, tmp.path AS temp_storage_path FROM axe_catalog.pga_table t JOIN axe_catalog.pga_schema s ON t.schema_id = s.schema_id JOIN axe_catalog.pga_storage st ON t.storage_id = st.storage_id JOIN axe_catalog.pga_uri r ON st.uri_id = r.uri_id JOIN axe_catalog.pga_uri tmp ON st.tmp_uri_id = tmp.uri_id WHERE COALESCE(t.end_snapshot, 0) = 0 AND COALESCE(s.end_snapshot, 0) = 0 AND COALESCE(st.end_snapshot, 0) = 0;
Record row counts of analytical tables.
Record the locations of Parquet files of analytical tables.
Back up the metadata catalog database.
Record the build number of the currently deployed Postgres Pro AXE.
If Postgres Pro AXE is installed in a BiHA cluster, refer to Section 11.1.3.
To update Postgres Pro AXE installed as an option to Postgres Pro Enterprise:
Update Postgres Pro Enterprise to version 17.11.2.
When updating from Postgres Pro AXE 1.x, delete the pgpro_metastore extension that is now depricated:
sudo apt-get remove pgpro-metastore
Install the new version of the pgpro_axe package without removing the currently installed package. All versions are available in the repository:
sudo apt update sudo apt install --only-upgrade pgpro-axe
Update the pgpro_axe extension to the version provided by the installed package:
ALTER EXTENSION pgpro_axe UPDATE;
If the extension version already matches the package version, the extension is not updated.
Update the configuration parameters of Postgres Pro AXE.
For example:
shared_preload_libraries = 'pgpro_axe' duckdb.unsafe_allow_execution_inside_functions = on axe.data_storage_location = 'axelake_files' max_prepared_transactions = 100
When updating the
shared_preload_librariesconfiguration parameter, addpgpro_axeto the existing list of the preloaded libraries rather than replacing it. Otherwise, the other preloaded libraries will no longer be loaded.If you update from Postgres Pro AXE 1.x, also remove
pgpro_metastorefrom theshared_preload_librariesconfiguration parameter, since it is no longer a separate library in version 2.x.If the
shared_preload_librariesormax_prepared_transactionsconfiguration parameters were updated, restart the server.(Optional) If you are updating from Postgres Pro AXE 1.x, migrate the metadata catalog.
(Optional) If you plan to execute stored procedures operating with the metadata catalog using their Postgres Pro AXE 1.x names, create aliases.
For the mapping of stored procedures between releases, refer to Appendix B.
Note
The previous stored procedures are supported until December 31, 2027. It is recommended to migrate to the new SQL commands and stored procedures before that date.
Check that Postgres Pro AXE was updated successfully:
Check the versions of the DBMS, the pgpro_axe extension, and the installed packages.
For example:
-- DBMS and pgpro_axe versions -- psql -c "SELECT version();" psql -c "SELECT extversion FROM pg_extension WHERE extname = 'pgpro_axe';" -- installed packages, depending on the OS -- apt list --installed | grep -E 'postgrespro|axe' rpm -qa | grep -E 'postgrespro|axe'
Compare the list of analytical tables, schemas, and storages with the previously recorded one.
Ensure that analytical tables are available by querying and modifying them with standard SQL commands.
For example:
INSERT INTO public.my_table (column1, column2, column3) VALUES ('Value 1', 123, '2026-09-21');Compare the row counts with the previously recorded ones.
For example:
SELECT count(*) FROM public.my_table;
If the update fails, restore the metadata catalog database from the previously created backup and install the previous version of Postgres Pro AXE.
11.1.3. Upgrading a BiHA Cluster with Postgres Pro AXE Installed #
This section describes how to upgrade a BiHA cluster to the minor DBMS version required for Postgres Pro AXE installed as a standalone DBMS or as an option to Postgres Pro Enterprise. Upgrade the BiHA cluster nodes one at a time: first the follower nodes, then the leader node.
The general process of upgrading a BiHA cluster is described in the official Postgres Pro documentation. The steps below adapt this process to Postgres Pro AXE.
Before upgrading a production BiHA cluster with Postgres Pro AXE installed, perform the upgrade on a test cluster.
To upgrade a BiHA cluster with Postgres Pro AXE installed:
Stop one of the follower nodes:
pg_ctl -D $PGDATA stop
On the stopped follower node, install the new versions of the packages without removing the installed ones:
For a standalone DBMS:
sudo apt update sudo apt install --only-upgrade dbms-axe-17 pgpro-axe
For an option to Postgres Pro Enterprise:
sudo apt update sudo apt install --only-upgrade postgrespro-ent-17 pgpro-axe
Start the follower node:
pg_ctl -D $PGDATA -l $LOGFILE start
Promote the upgraded follower node to the leader:
Execute the
CHECKPOINTcommand:CHECKPOINT;
Connect to the
biha_dbdatabase and call thebiha.set_leaderfunction:SELECT biha.set_leader(
upgraded_follower_node_ID);
Do not call the
biha.set_leaderfunction again until the BiHA cluster nodes are synchronized with the new leader.Repeat steps 1–3 for each remaining follower node and for the former leader node.
Promote the former leader node to the leader again by executing the
CHECKPOINTcommand and calling thebiha.set_leaderfunction on this node.On the current leader node, connect to each database where the
bihaextension is installed, including thebiha_dbdatabase, and update the extension:ALTER EXTENSION biha UPDATE;
(Optional) On each upgraded node, check the version of the bihactl utility:
bihactl --version
If the version was not updated automatically, upgrade the
biha-utilspackage manually.Update Postgres Pro AXE. The exact steps depend on whether Postgres Pro AXE is installed as a standalone DBMS or as an option to Postgres Pro Enterprise. Either way, in the corresponding scenario, skip the package installation and restart steps already performed on the BiHA cluster nodes and start with executing the
ALTER EXTENSION pgpro_axe UPDATEcommand.After completing the update, check the versions of the DBMS and the installed packages on each node of the BiHA cluster.
Important
After the BiHA cluster nodes are restarted, check on the current leader node whether the metadata catalog secret is created using the
axe.show_catalog_secretstored procedure:SELECT * FROM axe.show_catalog_secret();
If the metadata catalog secret is not created, re-create it on the leader node using the
axe.create_catalog_secretstored procedure.For example:
SELECT axe.create_catalog_secret(current_setting('unix_socket_directories'), current_setting('port'), 'postgres', '', '');If the data was stored in an S3 storage, check on the current leader node whether the storage secret is created using the
axe.show_simple_secretstored procedure:SELECT * FROM axe.show_simple_secret();
If the storage secret is not created, re-create it on the leader node using the
axe.create_simple_secretstored procedure.For example:
SELECT axe.create_simple_secret( type := 'S3', key_id := 'AKIAIOSFODNN7EXAMPLE', secret := 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', region := 'us-east-1', url_style := 'path', endpoint := 'minio.example.com:9000', use_ssl := 'false' );To upgrade the referee node, remove it by calling the
biha.remove_nodefunction, delete its data directory, and set up a new referee node.If entries with invalid configuration parameter names
biha.nquorumorbiha.minnodesappear in the server log after the update, delete these parameters from thepostgresql.biha.conffile.