13.1. Managing a Metadata Catalog Secret #

This section describes how to create and view the metadata catalog secret. The metadata catalog secret stores connection parameters and credentials for connecting to the server with the metadata catalog and initializes the metadata catalog on the Postgres Pro AXE server or on a remote server.

13.1.1. Creating a Metadata Catalog Secret (axe.create_catalog_secret) #

Before creating a metadata catalog secret, set the axe.use_catalog_secret configuration parameter to true. Re-creating the secret replaces the previous one.

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.create_catalog_secret('host', 'port', 'database'[, 'role', 'password']);

Where:

  • host and port: The hostname and port for connecting to the server with the metadata catalog.

  • database: The name of the metadata catalog database.

  • role and password: The role and password for logging in to the server with the metadata catalog. The role must have privileges to create and modify metadata tables in the specified database.

    Optional parameters. To connect without a role and password, pass an empty string.

Example 13.1. Creating a Metadata Catalog Secret

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

13.1.2. Viewing a Metadata Catalog Secret (axe.show_catalog_secret) #

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 * FROM axe.show_catalog_secret();

Postgres Pro AXE will return a table with the following columns:

  • secret_name: The secret name.

  • secret_type: The secret type.

  • options: The connection parameters of the secret.

Example 13.2. Viewing a Metadata Catalog Secret

  SELECT * FROM axe.show_catalog_secret();
  secret_name | secret_type |              options
-------------+-------------+-------------------------------------
  axe         | postgres    | host 'localhost', port '5433', dbname 'postgres'

FAQ