citusdata / citus

Distributed PostgreSQL as an extension
https://www.citusdata.com
GNU Affero General Public License v3.0
10.63k stars 670 forks source link

automate the placement of synchronous restore points #7716

Closed akalend closed 3 weeks ago

akalend commented 4 weeks ago

We have developed a patch that allows you to automate the placement of synchronous restore points. The placement of synchronous recovery points can occur either "daily" at 00:00 at the local server time or "hourly". This is set by the GUC variable: citus.restore_point_interval. By default, or the absence of an option, the value is "never".

The name of the save point has the format: restore_autosave_dd.mm_hh:00. The default name prefix is restore_autosave, but can be changed by using the GUС variable citus.restore_point_interval_name.

It is implemented like this: MantainceDaemon monitors the required time intervals and at the right moment starts a background process that executes the request: SELECT citus_create_restore_point();