11.1. Обновление Postgres Pro AXE #

В этом разделе описывается, как обновить Postgres Pro AXE. Процесс обновления зависит от того, установлен ли Postgres Pro AXE как независимая СУБД или в качестве опции к Postgres Pro Enterprise, а также от того, установлен ли Postgres Pro AXE в BiHA-кластере.

Обновление необходимо выполнять в запланированное окно обслуживания.

11.1.1. Обновление Postgres Pro AXE, установленного как независимая СУБД #

Перед обновлением Postgres Pro AXE:

  1. Если вы обновляете Postgres Pro AXE с версии 1.x, сначала обновитесь до версии 2.0. За дополнительными инструкциями обратитесь в техническую поддержку Postgres Pro.

  2. Зафиксируйте список аналитических таблиц, схем и хранилищ на сервере с каталогом метаданных.

    • При обновлении с Postgres Pro AXE 2.x выполните следующую команду:

        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;
    • При обновлении с Postgres Pro AXE 1.x выполните следующую команду:

        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. Зафиксируйте количество строк аналитических таблиц.

  4. Зафиксируйте расположение Parquet-файлов аналитических таблиц.

  5. Выполните резервное копирование базы данных каталога метаданных.

  6. Зафиксируйте номер сборки текущей развёрнутой версии Postgres Pro AXE.

  7. Если Postgres Pro AXE установлен в BiHA-кластере, обратитесь к Подразделу 11.1.3.

Чтобы обновить Postgres Pro AXE, установленный как независимая СУБД:

  1. При обновлении с Postgres Pro AXE 1.x удалите теперь устаревшее расширение pgpro_metastore:

      sudo apt-get remove pgpro-metastore
  2. Установите новые версии пакетов Postgres Pro AXE и pgpro_axe без удаления текущих установленных пакетов. Все версии доступны в репозитории:

      sudo apt update
      sudo apt install --only-upgrade dbms-axe-17 pgpro-axe
  3. Перезапустите сервер.

  4. Обновите расширение pgpro_axe до версии, поставляемой с установленным пакетом:

      ALTER EXTENSION pgpro_axe UPDATE;

    Если версия расширения уже совпадает с версией пакета, расширение не обновляется.

  5. Обновите параметры конфигурации Postgres Pro AXE.

    Например:

      shared_preload_libraries = 'pgpro_axe'
      duckdb.unsafe_allow_execution_inside_functions = on
      axe.data_storage_location = 'axelake_files'
      max_prepared_transactions = 100

    При обновлении параметра конфигурации shared_preload_libraries добавляйте pgpro_axe к существующему списку предварительно загружаемых библиотек, а не заменяйте этот список. В противном случае остальные предварительно загружаемые библиотеки больше не будут загружаться.

    Если вы обновляете Postgres Pro AXE с версии 1.x, также удалите pgpro_metastore из параметра конфигурации shared_preload_libraries, так как в версии 2.x она больше не является отдельной библиотекой.

    Если параметры конфигурации shared_preload_libraries или max_prepared_transactions были обновлены, перезапустите сервер.

  6. Создайте секрет каталога метаданных.

  7. (Необязательно) Если вы обновляете Postgres Pro AXE с версии 1.x, выполните миграцию каталога метаданных.

  8. (Необязательно) Если вы планируете выполнять хранимые процедуры, работающие с каталогом метаданных, используя их имена из Postgres Pro AXE 1.x, создайте псеводнимы.

    За сопоставлением хранимых процедур между выпусками обратитесь к Приложению B.

    Примечание

    Предыдущие хранимые процедуры поддерживаются до 31 декабря 2027 года. Рекомендуется перейти на новые SQL-команды и хранимые процедуры до этой даты.

  9. Проверьте, что Postgres Pro AXE был обновлён успешно:

    1. Проверьте версии СУБД, расширения pgpro_axe и установленных пакетов.

      Например:

        -- версии СУБД и pgpro_axe --
        psql -c "SELECT version();"
        psql -c "SELECT extversion FROM pg_extension WHERE extname = 'pgpro_axe';"
      
        -- установленные пакеты, в зависимости от ОС --
        apt list --installed | grep -E 'postgrespro|axe'
        rpm -qa | grep -E 'postgrespro|axe'
    2. Сравните список аналитических таблиц, схем и хранилищ с ранее зафиксированным списком.

    3. Убедитесь, что аналитические таблицы доступны, выполнив к ним запросы и изменив их с помощью стандартных SQL-команд.

      Например:

        INSERT INTO public.my_table (column1, column2, column3)
        VALUES ('Value 1', 123, '2026-09-21');
    4. Сравните количество строк с ранее зафиксированными значениями.

      Например:

        SELECT count(*) FROM public.my_table;

Если обновление завершилось ошибкой, восстановите базу данных каталога метаданных с помощью ранее созданной резервной копии и установите предыдущую версию Postgres Pro AXE.

11.1.2. Обновление Postgres Pro AXE, установленного в качестве опции к Postgres Pro Enterprise #

Перед обновлением Postgres Pro AXE:

  1. Если вы обновляете Postgres Pro AXE с версии 1.x, сначала обновитесь до версии 2.0. За дополнительными инструкциями обратитесь в техническую поддержку Postgres Pro.

  2. Зафиксируйте список аналитических таблиц, схем и хранилищ на сервере с каталогом метаданных.

    • При обновлении с Postgres Pro AXE 2.x выполните следующую команду:

        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;
    • При обновлении с Postgres Pro AXE 1.x выполните следующую команду:

        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. Зафиксируйте количество строк аналитических таблиц.

  4. Зафиксируйте расположение Parquet-файлов аналитических таблиц.

  5. Выполните резервное копирование базы данных каталога метаданных.

  6. Зафиксируйте номер сборки текущей развёрнутой версии Postgres Pro AXE.

  7. Если Postgres Pro AXE установлен в BiHA-кластере, обратитесь к Подразделу 11.1.3.

Чтобы обновить Postgres Pro AXE, установленный в качестве опции к Postgres Pro Enterprise:

  1. Обновите Postgres Pro Enterprise до версии 17.11.2.

  2. При обновлении с Postgres Pro AXE 1.x удалите теперь устаревшее расширение pgpro_metastore:

      sudo apt-get remove pgpro-metastore
  3. Установите новую версию пакета pgpro_axe без удаления текущего установленного пакета. Все версии доступны в репозитории:

      sudo apt update
      sudo apt install --only-upgrade pgpro-axe
  4. Перезапустите сервер.

  5. Обновите расширение pgpro_axe до версии, поставляемой с установленным пакетом:

      ALTER EXTENSION pgpro_axe UPDATE;

    Если версия расширения уже совпадает с версией пакета, расширение не обновляется.

  6. Обновите параметры конфигурации Postgres Pro AXE.

    Например:

      shared_preload_libraries = 'pgpro_axe'
      duckdb.unsafe_allow_execution_inside_functions = on
      axe.data_storage_location = 'axelake_files'
      max_prepared_transactions = 100

    При обновлении параметра конфигурации shared_preload_libraries добавляйте pgpro_axe к существующему списку предварительно загружаемых библиотек, а не заменяйте этот список. В противном случае остальные предварительно загружаемые библиотеки больше не будут загружаться.

    Если вы обновляете Postgres Pro AXE с версии 1.x, также удалите pgpro_metastore из параметра конфигурации shared_preload_libraries, так как в версии 2.x она больше не является отдельной библиотекой.

    Если параметры конфигурации shared_preload_libraries или max_prepared_transactions были обновлены, перезапустите сервер.

  7. Создайте секрет каталога метаданных.

  8. (Необязательно) Если вы обновляете Postgres Pro AXE с версии 1.x, выполните миграцию каталога метаданных.

  9. (Необязательно) Если вы планируете выполнять хранимые процедуры, работающие с каталогом метаданных, используя их имена из Postgres Pro AXE 1.x, создайте псеводнимы.

    За сопоставлением хранимых процедур между выпусками обратитесь к Приложению B.

    Примечание

    Предыдущие хранимые процедуры поддерживаются до 31 декабря 2027 года. Рекомендуется перейти на новые SQL-команды и хранимые процедуры до этой даты.

  10. Проверьте, что Postgres Pro AXE был обновлён успешно:

    1. Проверьте версии СУБД, расширения pgpro_axe и установленных пакетов.

      Например:

        -- версии СУБД и pgpro_axe --
        psql -c "SELECT version();"
        psql -c "SELECT extversion FROM pg_extension WHERE extname = 'pgpro_axe';"
      
        -- установленные пакеты, в зависимости от ОС --
        apt list --installed | grep -E 'postgrespro|axe'
        rpm -qa | grep -E 'postgrespro|axe'
    2. Сравните список аналитических таблиц, схем и хранилищ с ранее зафиксированным списком.

    3. Убедитесь, что аналитические таблицы доступны, выполнив к ним запросы и изменив их с помощью стандартных SQL-команд.

      Например:

        INSERT INTO public.my_table (column1, column2, column3)
        VALUES ('Value 1', 123, '2026-09-21');
    4. Сравните количество строк с ранее зафиксированными значениями.

      Например:

        SELECT count(*) FROM public.my_table;

Если обновление завершилось ошибкой, восстановите базу данных каталога метаданных с помощью ранее созданной резервной копии и установите предыдущую версию Postgres Pro AXE.

11.1.3. Обновление BiHA-кластера с установленным Postgres Pro AXE #

В этом разделе описывается, как обновить BiHA-кластер до корректирующей версии СУБД, необходимой для Postgres Pro AXE, установленного как независимая СУБД или в качестве опции к Postgres Pro Enterprise. Обновляйте узлы BiHA-кластера по-очереди: сначала узлы-последователи, затем узел-лидер.

Общий процесс обновления BiHA-кластера описан в официальной документации Postgres Pro. В шагах ниже этот процесс адаптируется под Postgres Pro AXE.

Перед обновлением BiHA-кластера с установленным Postgres Pro AXE в производственной среде выполните обновление на тестовом кластере.

Чтобы обновить BiHA-кластер с установленным Postgres Pro AXE:

  1. Остановите один из узлов-последователей:

      pg_ctl -D $PGDATA stop
  2. На остановленном узле-последователе установите новые версии пакетов, не удаляя уже установленные:

    • Для независимой СУБД:

        sudo apt update
        sudo apt install --only-upgrade dbms-axe-17 pgpro-axe
    • Для опции к Postgres Pro Enterprise:

        sudo apt update
        sudo apt install --only-upgrade postgrespro-ent-17 pgpro-axe
  3. Запустите узел-последователь:

      pg_ctl -D $PGDATA -l $LOGFILE start
  4. Повысьте обновлённый узел-последователь до лидера:

    1. Выполните команду CHECKPOINT:

        CHECKPOINT;
    2. Подключитесь к базе данных biha_db и вызовите функцию biha.set_leader:

        SELECT biha.set_leader(идентификатор_обновленного_узла_последователя);

    Не вызывайте функцию biha.set_leader повторно до тех пор, пока узлы BiHA-кластера не будут синхронизированы с новым лидером.

  5. Повторите шаги 1–3 для каждого оставшегося узла-последователя, а также для бывшего узла-лидера.

  6. Повторно повысьте бывший узел-лидер до лидера, выполнив команду CHECKPOINT и вызвав функцию biha.set_leader на этом узле.

  7. На текущем узле-лидере подключитесь к каждой базе данных, где установлено расширение biha, включая базу данных biha_db, и обновите расширение:

      ALTER EXTENSION biha UPDATE;
  8. (Необязательно) На каждом обновлённом узле проверьте версию утилиты bihactl:

      bihactl --version

    Если версия не была обновлена автоматически, обновите пакет biha-utils вручную.

  9. Обновите Postgres Pro AXE. Конкретные шаги зависят от того, установлен ли Postgres Pro AXE как независимая СУБД или в качестве опции к Postgres Pro Enterprise. В любом случае, в соответствующем сценарии пропустите шаги по установке пакетов и перезапуску, уже выполненные на узлах BiHA-кластера, и начните с выполнения команды ALTER EXTENSION pgpro_axe UPDATE.

    После завершения обновления проверьте версии СУБД и установленных пакетов на каждом узле BiHA-кластера.

Важно

  • После перезапуска узлов BiHA-кластера проверьте на текущем узле-лидере, создан ли секрет каталога метаданных, с помощью хранимой процедуры axe.show_catalog_secret:

      SELECT * FROM axe.show_catalog_secret();

    Если секрет каталога метаданных не создан, создайте его повторно на узле-лидере с помощью хранимой процедуры axe.create_catalog_secret.

    Например:

      SELECT axe.create_catalog_secret(current_setting('unix_socket_directories'), current_setting('port'), 'postgres', '', '');

    Если данные хранились в S3-хранилище, проверьте на текущем узле-лидере, создан ли секрет хранилища, с помощью хранимой процедуры axe.show_simple_secret:

      SELECT * FROM axe.show_simple_secret();

    Если секрет хранилища не создан, создайте его повторно на узле-лидере с помощью хранимой процедуры axe.create_simple_secret.

    Например:

      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'
      );
  • Чтобы обновить узел-рефери, удалите его, вызвав функцию biha.remove_node, затем удалите его каталог данных и подготовьте новый узел-рефери.

  • Если после обновления в журнале сервера появляются записи с неверными именами параметров конфигурации biha.nquorum или biha.minnodes, удалите эти параметры из файла postgresql.biha.conf.

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