Updated on 2025-05-29 GMT+08:00

Archiving

archive_timeout

Parameter description: Specifies the archiving period.

  • 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.

Parameter type: Integer

Unit: second

Value range: 0 to 1073741823. 0 indicates that archiving timeout is disabled.

Default value: 0

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, Xlogs will be switched frequently, occupying storage space.

archive_interval

Parameter description: Specifies the archiving interval. Log files are forcibly archived when the period specified by this parameter has elapsed.

Parameter type: Integer

Unit: second

Value range: 1 to 1000

Default value: 1

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, data will be archived frequently, occupying storage space. If the value is too large, the RPO of PITR will be affected.

time_to_target_rpo

Parameter description: In remote DR mode of dual database instances, logs of the primary database instance are archived to OBS. This parameter specifies the time allowed from the time when the primary database instance is abnormal to the time when the primary database instance is archived to the recovery point of OBS.

Parameter type: Integer

Unit: second

Value range: 0 to 3600

  • 0: Log flow control is disabled.
  • 1 to 3600: duration from the time when the primary database instance is abnormal to the time when the primary database instance is archived to the recovery point of OBS. This ensures that the maximum data loss duration is within the allowed range when the primary database instance breaks down due to a disaster.

Default value: 0

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

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, the host performance is affected. If the value is too large, the flow control does not take effect.