You can change the vCloud Director appliance PostgreSQL configurations by using the PostgreSQL ALTER SYSTEM command.

The ALTER SYSTEM command writes the changes of the parameter settings to the postgresql.auto.conf file which takes precedence over the postgresql.conf file during the PostgreSQL initialization. Some settings require a restart of the PostgreSQL service while others are dynamically configured and do not require a restart. Do not change the postgresql.conf file, because those changes do not persist after reboot.

Procedure

  1. Log in directly or by using an SSH client to the OS of the primary appliance as root.
  2. Change the user to postgres.
    sudo -i -u postgres
  3. Use the PostgreSQL ALTER SYSTEM command to change a parameter.
    psql -c "ALTER SYSTEM set parameter='value';"
  4. Repeat Step 3 for each configuration parameter you want to change.
  5. If some of the parameters you want to change require a restart of the PostgreSQL service, restart the vpostgres process.
    systemctl restart vpostgres
  6. If your environment has standby nodes, copy the postgresql.auto.conf file to the standby appliances, and restart the PostgreSQL service if necessary.
    1. Copy the postgresql.auto.conf from the primary node to a standby node.
      scp /var/vmware/vpostgres/current/pgdata/postgresql.auto.conf postgres@<standby-node-address>:/var/vmware/vpostgres/current/pgdata/
    2. If some of the parameters in the copied postgresql.auto.conf file require a restart to take effect, restart the vpostgres process on the standby node.
      systemctl restart vpostgres
    3. Repeat Step a and Step b for each standby node.