Updated on 2024-06-03 GMT+08:00

Archiving

archive_timeout

Parameter description: Specifies the archiving period.

This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

  • The server is forced to switch to a new WAL segment file when the period specified by this parameter has elapsed since the last file switch.
  • Archived files that are closed early due to a forced switch are still of the same length as full files. Therefore, a very short archive_timeout will bloat the archive storage. You are advised to set archive_timeout to 60s.

Value range: an integer ranging from 0 to 1073741823. The unit is s. 0 indicates that archiving timeout is disabled.

Default value: 0

archive_interval

Parameter description: Specifies the archiving interval.

This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

  • Log files are forcibly archived when the period specified by this parameter has elapsed.
  • Archiving involves I/O operations. Therefore, frequent archiving is not allowed. In addition, the RPO cannot be set to a large value; otherwise, the PITR will be affected. You are advised to use the default value.

Value range: an integer ranging from 1 to 1000. The unit is second.

Default value: 1