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:

  1. If you update from Postgres Pro AXE 1.x, first upgrade to version 2.0. For additional instructions, contact the Postgres Pro technical support.

  2. 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;
      
  3. Record row counts of analytical tables.

  4. Record the locations of Parquet files of analytical tables.

  5. Back up the metadata catalog database.

  6. Record the build number of the currently deployed Postgres Pro AXE.

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

  1. When updating from Postgres Pro AXE 1.x, delete the pgpro_metastore extension that is now depricated:

      sudo apt-get remove pgpro-metastore
    
  2. 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
    
  3. Restart the server.

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

  5. 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_libraries configuration parameter, add pgpro_axe to 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_metastore from the shared_preload_libraries configuration parameter, since it is no longer a separate library in version 2.x.

    If the shared_preload_libraries or max_prepared_transactions configuration parameters were updated, restart the server.

  6. Create the metadata catalog secret.

  7. (Optional) If you are updating from Postgres Pro AXE 1.x, migrate the metadata catalog.

  8. (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.

  9. Check that Postgres Pro AXE was updated successfully:

    1. 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'
      
    2. Compare the list of analytical tables, schemas, and storages with the previously recorded one.

    3. 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');
      
    4. 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:

  1. If you update from Postgres Pro AXE 1.x, first upgrade to version 2.0. For additional instructions, contact the Postgres Pro technical support.

  2. 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;
      
  3. Record row counts of analytical tables.

  4. Record the locations of Parquet files of analytical tables.

  5. Back up the metadata catalog database.

  6. Record the build number of the currently deployed Postgres Pro AXE.

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

  1. Update Postgres Pro Enterprise to version 17.11.2.

  2. When updating from Postgres Pro AXE 1.x, delete the pgpro_metastore extension that is now depricated:

      sudo apt-get remove pgpro-metastore
    
  3. 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
    
  4. Restart the server.

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

  6. 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_libraries configuration parameter, add pgpro_axe to 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_metastore from the shared_preload_libraries configuration parameter, since it is no longer a separate library in version 2.x.

    If the shared_preload_libraries or max_prepared_transactions configuration parameters were updated, restart the server.

  7. Create the metadata catalog secret.

  8. (Optional) If you are updating from Postgres Pro AXE 1.x, migrate the metadata catalog.

  9. (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.

  10. Check that Postgres Pro AXE was updated successfully:

    1. 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'
      
    2. Compare the list of analytical tables, schemas, and storages with the previously recorded one.

    3. 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');
      
    4. 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:

  1. Stop one of the follower nodes:

      pg_ctl -D $PGDATA stop
    
  2. 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
      
  3. Start the follower node:

      pg_ctl -D $PGDATA -l $LOGFILE start
    
  4. Promote the upgraded follower node to the leader:

    1. Execute the CHECKPOINT command:

        CHECKPOINT;
      
    2. Connect to the biha_db database and call the biha.set_leader function:

        SELECT biha.set_leader(upgraded_follower_node_ID);
      

    Do not call the biha.set_leader function again until the BiHA cluster nodes are synchronized with the new leader.

  5. Repeat steps 1–3 for each remaining follower node and for the former leader node.

  6. Promote the former leader node to the leader again by executing the CHECKPOINT command and calling the biha.set_leader function on this node.

  7. On the current leader node, connect to each database where the biha extension is installed, including the biha_db database, and update the extension:

      ALTER EXTENSION biha UPDATE;
    
  8. (Optional) On each upgraded node, check the version of the bihactl utility:

      bihactl --version
    

    If the version was not updated automatically, upgrade the biha-utils package manually.

  9. 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 UPDATE command.

    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_secret stored 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_secret stored 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_secret stored 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_secret stored 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_node function, delete its data directory, and set up a new referee node.

  • If entries with invalid configuration parameter names biha.nquorum or biha.minnodes appear in the server log after the update, delete these parameters from the postgresql.biha.conf file.

FAQ