22.4. Миграция каталога метаданных (axe.migrate) #

Хранимая процедура axe.migrate выполняет миграцию хранилищ, общих каталогов, схем и аналитических таблиц, а также добавляет существующие Parquet-файлы в аналитические таблицы. Содержимое Parquet-файлов не копируется, поэтому убедитесь, что Postgres Pro AXE 2.x имеет доступ к локальным путям и S3-хранилищам предыдущего выпуска перед миграцией. Миграция секретов хранилищ и снимков не выполняется.

Важно

При миграции аналитических таблиц эта хранимая процедура выполняет команду DROP VIEW IF EXISTS ... CASCADE для соответствующих имён таблиц. Зависимые объекты могут быть удалены вместе с представлениями.

Перед миграцией каталога метаданных обновите Postgres Pro AXE и создайте секрет каталога метаданных.

За подробной информацией об обновлении Postgres Pro AXE обратитесь к Разделу 11.1.

Требуемые права: суперпользователь или администратор Postgres Pro AXE.

За подробной информацией об управлении доступом обратитесь к Главе 12.

Выполните следующую команду на сервере Postgres Pro AXE:

  SELECT axe.migrate('хост', 'порт', 'база_данных'[, 'имя_пользователя', 'пароль']);

Где:

  • хост и порт: имя хоста и порт сервера с каталогом метаданных предыдущего выпуска.

  • база_данных: имя базы данных, в которой хранятся таблицы метаданных предыдущего выпуска.

  • имя_пользователя и пароль: учётные данные для подключения к серверу с каталогом метаданных предыдущего выпуска.

    Необязательные параметры. Чтобы подключиться локально без учётных данных, передайте пустую строку.

Пример 22.5. Миграция каталога метаданных на локальном сервере

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

22.4. Migrating the Metadata Catalog (axe.migrate) #

The axe.migrate stored procedure migrates storages, shared directories, schemas, and analytical tables and adds the existing Parquet files to analytical tables. The contents of the Parquet files are not copied, so ensure that Postgres Pro AXE 2.x has access to the local paths and S3 storages of the previous release before migrating. Storage secrets and snapshots are not migrated.

Important

When migrating analytical tables, this stored procedure executes the DROP VIEW IF EXISTS ... CASCADE command for the corresponding table names. Dependent objects can be dropped along with the views.

Before migrating the metadata catalog, update Postgres Pro AXE and create the metadata catalog secret.

For more information about updating Postgres Pro AXE, refer to Section 11.1.

Required privileges: Superuser or the Postgres Pro AXE administrator.

For more information about access management, refer to Chapter 12.

Execute the following command on the Postgres Pro AXE server:

  SELECT axe.migrate('host', 'port', 'database'[, 'username', 'password']);

Where:

  • host and port: The hostname and port of the server with the metadata catalog of the previous release.

  • database: The name of the database where metadata tables of the previous release are stored.

  • username and password: The credentials for connecting to the server with the metadata catalog of the previous release.

    Optional parameters. To connect locally without credentials, pass an empty string.

Example 22.5. Migrating the Metadata Catalog on the Local Server

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

FAQ