Increasing the PostgreSQL archive_timeout on VMware

Increase change the archive_timeout to 3600 (seconds) so that accumulated wal files do not cause a disk-space issue during a network outage.

About this task

PostgreSQL sends its wal archives to the backup location (S3 or local PVC) whenever the configured archive_timeout period elapses. By default, the archive_timeout is set to 60 seconds. During a network outage, the files cannot be transferred and instead accumulate on the current server, and could cause a disk-space issue. Increasing the archive_timeout value helps to mitigate this issue by creating archive files less frequently.

For information on tracking the Postgres disk space, see Monitoring Postgres disk usage on VMware.

Complete the following steps to increase the PostgreSQL archive_timeout value.


  1. SSH into the server by completing the following steps:
    1. Run the following command to connect as the API Connect administrator, replacing ip_address with the appropriate IP address:
      ssh ip_address -l apicadm
    2. When prompted, select Yes to continue connecting.
    3. When you are connected, run the following command to receive the necessary permissions for working directly on the appliance:
      sudo -i
  2. Get the name of the pgha config map by running the following command:
    kubectl -n <namespace> get cm -l pgha-config='true'

    The response looks like the following example:

    NAME                                               DATA   AGE
    apis-produ-d18f3f0-0d18f3f0-postgres-pgha-config   5      22d
  3. Edit the config map by running the following command:
    kubectl -n <namespace> edit configmap <config-map-name>

    In the command, replace <config-map-name> with the NAME returned in step 1.

  4. Change the archive_timeout value to 3600.

    The value must be an integer, and represents the number of seconds that must elapse before the archive file is generated.

  5. Save the file and exit the editor.

    The configuration is updated automatically; archives will be generated and pushed every 3600 seconds.