Prepare a PostgreSQL database

Important: Depending on the PostgreSQL distribution you installed, the installation paths may be different.

Manage large objects

The LO extension is a prerequisite and must be public. Run this PostgreSQL command:

alter extension lo set schema public;

Prepare a local PostgreSQL

To use a pre-installed local PostgreSQL database, configure it to enable local access using the local host name or IP address.

  1. Verify that the PostgreSQL SuperUser has a password set. The server installer cannot proceed if the password is blank.
  2. Modify this configuration file:

    %POSTGRESQL_HOME%\data\pg10\pg_hba.conf
  3. Add the following lines:

    host all all <this hosts IPV6 address>/120 md5 
    host all all <this hosts IPV4 address>/24 md5
  4. Restart PostgreSQL after updating the configuration file.

Prepare a remote PostgreSQL‌

To use a pre-installed remote PostgreSQL database, log in to the remote machine and configure it as follows.

  1. Verify that the PostgreSQL server is listening on the correct network address. Open this file:

    %POSTGRESQL_HOME%\data\pg10\postgresql.conf

    Check the settings for the parameter listen_addresses.

  2. Verify that the PostgreSQL SuperUser has a password set. The server installer cannot proceed if the password is blank.

  3. Modify this configuration file:

    %POSTGRESQL_HOME%\data\pg10\pg_hba.conf
  4. Add the following lines:

    host all all <this hosts IPV6 address>/120 md5 
    host all all <this hosts IPV4 address>/24 md5
  5. Verify that the psql utility is available on your path.

    For example: SET PATH=%PATH%;%POSTGRESQL_HOME%\bin

    Do not ’quote’ the PostgreSQL installation path, even if it includes spaces.

  6. If required, run initdb to create a PostgreSQL database cluster, for example:

    initdb -U postgres -D C:\ProgramData\PostgreSQL\data
  7. Run the following scripts to create the main database users and roles, in the following order:

    db_preinstall/poistgresql/unix/ 
      postgresql_pre_install.sh 
      pulse_postgresql_pre_install.sh

    Both scripts describe the mandatory parameters.

    Example commands:

    sh ./postgres_pre_installsh --
      dbadmin postgres -- dbadmin_pwd postgres_password --dbname dim14 --datadir
      /opt/opentext/dimensions/postgresql/datadir --dbowner 
      postgres --dbowner_pwd postgres_password
    sh pulse_postgres_pre_install.sh --dbadmin postgres -- dbadmin_pwd postgres_password --dbname dim14 -- pulse_user pulse

Scale and performance tuning

PostgreSQL ships with a basic configuration tuned for wide compatibility rather than performance, and the default parameters may be undersized for your system.

For details about resource consumption and tuning your PostgreSQL, see the PostgreSQL documentation.

High availability and load balancing

PostgreSQL offers native capability for load balancing and failover. For details, see the PostgreSQL documentation.