13.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 12.1.
Required privileges: Superuser or the Postgres Pro AXE administrator.
For more information about access management, refer to Chapter 17.
Execute the following command on the Postgres Pro AXE server:
SELECT axe.migrate('host', 'port', 'database'[, 'username', 'password']);
Where:
hostandport: 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.usernameandpassword: 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 13.5. Migrating the Metadata Catalog on the Local Server
SELECT axe.migrate(current_setting('unix_socket_directories'), current_setting('port'), 'postgres', '', '');