Configure an external database for ADBM

For production environments, it is recommended to use an external PostgreSQL database as ADBM data storage for high performance and fault tolerance. Starting with ADBM 1.7.3, to configure an external database, you need to follow the steps that are described below:

  1. Perform the following queries in PostgreSQL. The queries should be run under the default user postgres with the superuser rights:

    CREATE ROLE <user_name> LOGIN PASSWORD '<user_password>'; (1)
    ALTER ROLE <user_name> SET search_path TO public, adbm;
    CREATE DATABASE <database_name> WITH owner <user_name>; (2)
    1 Create the <user_name> user with appropriate rights for connecting to the external database.
    2 Create the <database_name> database for ADBM data migration.
  2. Connect to the created database <database_name> under a superuser and run:

    CREATE SCHEMA adbm; (1)
    GRANT USAGE, CREATE ON SCHEMA adbm TO <user_name>; (2)
    ALTER DEFAULT PRIVILEGES IN SCHEMA adbm GRANT UPDATE, INSERT, SELECT, DELETE ON TABLES TO <user_name>;
    CREATE EXTENSION btree_gin WITH schema adbm;
    CREATE EXTENSION pg_trgm WITH schema adbm;
    GRANT SELECT ON pg_extension TO <user_name>;
    1 Create the adbm schema in the <database_name> database for ADBM data migration.
    2 Create extensions in the adbm schema and grant of their usage to the <user_name> user.

    If you can assign superuser rights to a PostgreSQL user (which will be used for connecting to an external database from ADBM), it is enough to create a role and a database in PostgreSQL before installation or reconfiguration of ADBM:

    CREATE ROLE <user_name> LOGIN PASSWORD '<user_password>' SUPERUSER;
    ALTER ROLE <user_name> SET search_path TO public, adbm;
    CREATE DATABASE <database_name> WITH owner <user_name>;
  3. Provide the ADBM access to the external PostgreSQL database by adding the following record to the pg_hba.conf file on the PostgreSQL server:

    host    <database_name>  <user_name>       <adbm_address>      trust

    where:

    • <database_name> — a name of the created database.

    • <user_name> — a name of the created user.

    • <adbm_address> — an IP address of ADBM with a subnet number.

  4. On the ADBM service configuration page, activate the External database parameters toggle and fill in all parameters in the list that opens. The assignment of parameters is described in the Configuration parameters → ADBM → External database parameters section.

    Parameters for connecting to the external PostgreSQL DB
    Parameters for connecting to the external PostgreSQL DB
  5. Click Save to save the ADBM configuration.

  6. Install the ADBM service using the Install service action or apply the Reconfigure & Restart action to the ADBM service if it is already installed.

Found a mistake? Seleсt text and press Ctrl+Enter to report it