In order to begin using PostgreSQL environments with Delphix, you will need to configure the source and target with the requirements described on this page.
PostgreSQL hosts and databases
On each host with Postgres, there must be an operating system user configured to the required specifications for Delphix, as explained in the table below. These requirements apply to both source and target environments. However, target environments have additional requirements which are detailed in the Target Host Requirements section below.
The PostgreSQL plugin requires the use of the default user which gets created during the Postgres DB installation process. Usually, 'postgres'. In case you want to use a low-privileged OS user to add the environment and create datasets with the same, make sure that the additional requirements for Privilege elevation are met, see Prerequisites for Privilege Elevation using DLPX_DB_EXEC Script
Source database requirements
The source database can be in READ-WRITE or READ-only mode. It can be a standby database(streaming site) as well.
The Staging host must have access to a PostgreSQL role on the source side 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:
You must make the following changes to postgresql.conf:
modifying the parameter
Note: 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.
The simplest way to configure PostgresSQL is so that it listens on all available IP interfaces:
(for more information, see the Server Configuration chapter in the PostgreSQL documentation)
The value of
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:
The value of,
In releases prior to PostgreSQL 9.6.x, parameter 'wal_level' allowed the values 'archive' and 'hot_standby'. These values are still accepted but mapped to 'replica'.
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:
You must configure PostgreSQL to allow PostgreSQL client connections and replication client connections from the staging target environment.
To configure appropriately, add the following entries to pg_hba.conf:
<auth-method> can be set to trust, scram-sha-256, or md5 on source. Delphix inherits the same authentication method from the source while dSource creation and VDB provisioning. For more information on how to configure, pg_hba.conf see the Client Authentication section in the PostgreSQL documentation.
Postgres 13 onwards, the configuration parameter
It is mandatory to have "port" (can be commented or not commented) in postgresql.conf file.
Target Host Requirements
The operating system and architecture of the target environment must match those of the source environment.
It is recommended that the source and the target environments should be identical and hardware configurations should match.
Compatible Operating System supported by the Plugin is CentOS 7.3/7.4/7.5/7.6/7.7/7.8/7.9 and RHEL 7.3/7.4/7.5/7.6/7.7/7.8/7.9/8.3/8.6.
The underlying Operating System for both the Source and Staging environment should be among these versions.
There must be an installation of PostgreSQL on the target environment that is compatible with the installation of PostgreSQL on the source environment.
Two installations of PostgreSQL are compatible if and only if:
There must be an operating system user (e.g Postgres) with the following privileges:
See Sudo Privilege Requirements for PostgreSQL Environments for further explanation of the commands, and Sudo File Configuration Examples for PostgreSQL Environments for examples of the /etc/sudoers file on different operating systems.
There must be a directory on the target environment where the Delphix Engine Plugin can be installed (for example, /var/tmp ) with the following properties:
There must be a mount point directory (for example, /mnt) that will be used as the base for mount points that are created when provisioning a VDB with the following properties:
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 [postgres@source ~]$ hostname -i
The output of “hostname -i” command should produce the correct result as the IP address of the server.
When using the External Backup method for ingestion the directories being used for keeping Backup file and WAL file should be accessible by OS User.
Ensure that either the
Checking if netstat utility is installed:
Checking if ss utility is installed:
Zip must be installed on the Staging/Target Host for External Backup Support.
Checking if zip utility is installed:
From PostgreSQL Plugin 3.2.0 onwards, the backups can be provided in three ways:
1. Database full Backup in tar format can be placed inside organized folders named PostgreSQL_T<YYYYMMDDhhmmss>, created within the backup path.
For example, PostgreSQL_T20230224033939.
2. Database full Backup in tar format can be directly placed within the backup path. 3. Providing the full backup encapsulated in a ZIP file in the format PostgreSQL_T<YYYYMMDD>.zip (supported by previous plugin versions). Make sure that the backup files are available directly at the root level of the ZIP.
For example, PostgreSQL_T20230224.zip.
Note: YYYY denotes year, MM denotes month, DD denotes date, hh denotes hours, mm denotes minutes and ss denotes seconds.
Checking if backups are available at the root of the ZIP file:
If there's no PostgreSQL instance running on the Staging/Target host, however, we have a PostgreSQL installation, even then the plugin relies on the "DELPHIX_PG_PATH" variable to discover the environment.
In the absence of "DELPHIX_PG_PATH" variable or if the value of "DELPHIX_PG_PATH" variable is NULL then Linux "find" command will be used for the Environment discovery which may impact the overall performance. Hence, it is preferred to create this Environment Variable with correct entries.
In order to optimize the performance, it is preferred to create an Environment Variable "DELPHIX_PG_PATH" which should be accessible by OS users.
Below should be the syntax for "DELPHIX_PG_PATH" variable:
The variable "DELPHIX_PG_PATH" must be available to the environment user in a non-interactive way. You can test this variable for non-interactive logins using
ssh <your_username>@<target_host> "env | grep DELPHIX_PG_PATH".