13.2. Creating a Custom Storage (axe.create_storage) #

Before creating a custom S3 storage, create a storage secret. You can create only one S3 storage.

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.create_storage('storage_name', 'storage_URI');

Where:

  • storage_name: The unique storage name.

  • storage_URI: The URI of the root storage directory.

Local storages have simple URIs (e.g., file:///home/j.doe/workspace/axe/).

S3 storages have URIs with more complicated structures and parsing (e.g., s3://premdb/team01.csv?versionId=w_B5qT8s5MkiT09.IRHay0lW.PycsHTS). These URIs are generated using third-party libraries.

Important

This stored procedure does not check that the storage URI is valid or that data can be written to the storage. Errors caused by an invalid URI or insufficient privileges are returned only when you try to use the storage (e.g., when creating an analytical table in it).

Example 13.1. Creating a Local Storage

  SELECT axe.create_storage('local_axe_storage', 'file:///tmp/local_axe_storage/');

Example 13.2. Creating an S3 Storage

  SELECT axe.create_storage('s3_axe_storage', 's3://demo/s3_axe_storage/');

For an S3 storage connection scenario, refer to Section 26.2.

FAQ