You can change the VMware Cloud 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 the operation of the cluster requires periodic overwriting of the file and the changes are not persistent.
Procedure
- Log in directly or by using an SSH client to the OS of the primary appliance as root.
- Change the user to postgres.
- Use the PostgreSQL ALTER SYSTEM command to change a parameter.
psql -c "ALTER SYSTEM set parameter='value';"
- Repeat Step 3 for each configuration parameter you want to change.
- If some of the parameters you want to change require a restart of the PostgreSQL service, restart the vpostgres process.
systemctl restart vpostgres
- If your environment has standby nodes, copy the postgresql.auto.conf file to the standby appliances, and restart the PostgreSQL service if necessary.
- 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/
- 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
- Repeat Step a and Step b for each standby node.