Source hosts are servers which contain the source databases from which virtual database copies are made. Collectively, the source host and database are referred to as the source environment. This topic describes the requirements for creating connections between PostgreSQL source environments and the Delphix Engine.

Source Host Requirements

  • There must be an operating system user (i.e postgres) with the following privileges:

    • The Delphix Engine must be able to make an SSH connection to the source environment using the operating system user.

    • The operating system user must have read and execute privileges on the PostgreSQL binaries installed on the source environment.

    • The operating system user must have read, write, and execute access to the PostgreSQL data directories on the source environment.

  • There must be a directory on the source host where you can install the Delphix Engine toolkit – for example, /opt/delphix. The directory must have the following properties:

    • be writable by the operating system user mentioned above.

    • have at least 256 MB of available storage.

  • TCP/IP connectivity to and from the source environment must be configured as described in General Network and Connectivity Requirements.

  • Hostname and IP must be correctly set in /etc/hosts file. For example - 

    the output of  “hostname -i” command should produce correct results as IP address of the server. For example:

    [postgres@source postgres]$ hostname -i

    10.110.207.113

  • In order to optimize the performance, it is preferred to create an Environment Variable "DELPHIX_PG_PATH" which should be accessible by OS user.
    Below should be the syntax for  "DELPHIX_PG_PATH" variable:

    DELPHIX_PG_PATH="binary_path:data_path1;binary_path:data_path2;"

    For example:
    DELPHIX_PG_PATH="/usr/pgsql-9.6/bin:/var/lib/pgsql/9.6/data;/opt/edb/as9.6/bin:/opt/edb/as9.6/data;/usr/pgsql-9.6/bin:/tmp/TESING/data;"

In the absence of  "DELPHIX_PG_PATH" variable or if value of  "DELPHIX_PG_PATH" variable is NULL then Linux "find" command will be used for Environment discovery which may impact the overall performance. Hence, it is preferred to create this Environment Variable with correct entries.

The variable "DELPHIX_PG_PATH"  must be available to the environment user in a non-interactive way.

Source Database Requirements

    • The database must accept read/write connections. In other words, it must not be in standby mode.

    • The Delphix Engine must have access to a PostgreSQL role that has replication, and login privileges. This can be the built-in PostgreSQL role or a newly-created role (for example, delphix).

      Creating a Role for Use with the Delphix Engine

      To create a new role for use with the Delphix Engine, use the following command:

      SQL> CREATE ROLE delphix SUPERUSER LOGIN REPLICATION [ PASSWORD 'password']
    • You must make the following changes to postgresql.conf (for more information, see the Server Configuration chapter in the PostgreSQL documentation):
    • TCP/IP connectivity must be configured to allow the role mentioned above to connect to the source database from the Delphix Engine and from the standby DBMS instance set up by the Delphix Engine on the staging environment. This can be done by modifying the parameterlisten_addresses, which specifies the TCP/IP addresses on which the DBMS is to listen for connections from client applications.

      listen_addresses Configuration

      The simplest way to configure PostgresSQL is so that it listens on all available IP interfaces:

      listen_addresses = '*'    # Default is 'localhost'
    • The value of max_wal_senders, which specifies the maximum number of concurrent connections from standby servers or streaming base backup clients, must be increased from its desired value by four. That is, in addition to the allowance of connections for consumers other than the Delphix Engine, there must be an allowance for four additional connections from consumers set up by the Delphix Engine.

      max_wal_senders Configuration

      The default value max_wal_senders is zero, meaning replication is disabled. In this configuration, the value of max_wal_senders must be increased to two for the Delphix Engine:

      max_wal_senders = 4       # Default is 0
    • The value of, wal_level which determines how much information is written to the write-ahead log (WAL), must be set to archive or hot_standby to allow connections from standby servers. The value "logical" for wal_level (introduced in PostgreSQL 9.4) is also supported.

      wal_level Configuration

      The default value of wal_level is minimal, which writes only the information needed to recover from a crash or immediate shutdown to the WAL archives. In this configuration, you must add the logging required for WAL archiving as follows:

      wal_level = archive       # Default is minimal
    • PostgreSQL must be configured to allow PostgreSQL client connections from the Delphix Engine and from the staging target environment, as well as PostgreSQL replication client connections from the staging target environment. To configure appropriately, add the following entries to pg_hba.conf:

      pg_hba.conf Configuration

      host    all            <role>    <ip-address_of_delphix_engine>/32    <auth-method>
      host    all            <role>    <ip-address_of_staging_target>/32    <auth-method>
      host    replication    <role>    <ip-address_of_staging_target>/32    <auth-method>
    • <auth-method> must be set to trust. For more information on how to configure, pg_hba.conf see the Client Authentication chapter in the PostgreSQL documentation.

    • wal_keep_segments parameter in postgresql.conf file on Source environment should be large enough to support the WAL sync process once the dSource is building up.
    • It is mandatory to have "port" (can be commented or not commented)  in postgresql.conf file.