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

Flashback

This section describes parameters related to the flashback function. In this version, only the Ustore supports flashback, while the Astore does not support flashback.

enable_recyclebin

Parameter description: Specifies whether the recycle bin is enabled or disabled in real time.

Parameter type: Boolean

Unit: None

Value range:
  • on: The recycle bin is enabled in real time.
  • off: The recycle bin is disabled in real time.

Default value: off

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

Setting suggestion: To use the flashback table function, set enable_recyclebin to on.

Risks and impacts of improper settings: When this parameter is disabled, the flashback function cannot be used.

recyclebin_retention_time

Parameter description: Specifies the retention period of objects in the recycle bin. The objects will be automatically deleted after the retention period expires.

Parameter type: Integer

Unit: second

Value range: 1 to 2147483647

Default value: 900 (that is, 15 minutes)

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 900 without a unit, recyclebin_retention_time indicates 900s. If the value is 15min, recyclebin_retention_time indicates 15 minutes. The unit must be s, min, h, or d if required.

Setting suggestion: Set the retention period of objects in the recycle bin as required.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

undo_retention_time

Parameter description: Specifies the period for retaining undo logs of earlier versions.

Parameter type: Integer

Unit: second

Value range: 0 to 259200.

Default value: 0

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 900 without a unit, undo_retention_time indicates 900s. If the value is 15min, undo_retention_time indicates 15 minutes. The unit must be s, min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is out of the range or the value contains a unit other than s, min, h, and d, an error message is displayed.

  • If this parameter is set to 0 during the Ustore flashback query, the snapshot information at the flashback point will be cleared. In earlier versions, no flashback query can be performed. When a flashback query is performed, the error message "cannot find the restore point" is displayed.
  • If the time within which the undo logs of earlier versions need to be retained is time1 and the SQL statement execution time for the flashback query is time2, you need to set undo_retention_time to a value greater than time1 + time2. That is, set undo_retention_time to a value greater than time1 + time2 + 3s. You are advised to set undo_retention_time to a value equal to time1 + 1.5 x time2. For example, if you want to retain the logs of earlier versions within the latest 3 hours, and the SQL statement execution time for the flashback query is 1 hour, set undo_retention_time to a value equal to 3 hours + 1.5 x 1 hour, that is, 4.5 hours.