mirror of https://github.com/citusdata/citus.git
automate create restory sync point
parent
f6959715dc
commit
81448abd3e
|
@ -112,6 +112,7 @@
|
||||||
#include "distributed/transaction_recovery.h"
|
#include "distributed/transaction_recovery.h"
|
||||||
#include "distributed/utils/citus_stat_tenants.h"
|
#include "distributed/utils/citus_stat_tenants.h"
|
||||||
#include "distributed/utils/directory.h"
|
#include "distributed/utils/directory.h"
|
||||||
|
#include "distributed/utils/restore_interval.h"
|
||||||
#include "distributed/worker_log_messages.h"
|
#include "distributed/worker_log_messages.h"
|
||||||
#include "distributed/worker_manager.h"
|
#include "distributed/worker_manager.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
|
@ -2678,6 +2679,26 @@ RegisterCitusConfigVariables(void)
|
||||||
GUC_STANDARD,
|
GUC_STANDARD,
|
||||||
NULL, NULL, NULL);
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
|
DefineCustomStringVariable(
|
||||||
|
"citus.restore_point_interval",
|
||||||
|
gettext_noop("Sets the timeout for periodic recovery cluster point"),
|
||||||
|
NULL,
|
||||||
|
&RestorePointInterval,
|
||||||
|
"never",
|
||||||
|
PGC_SIGHUP,
|
||||||
|
GUC_STANDARD,
|
||||||
|
GucCheckInterval, NULL, NULL);
|
||||||
|
|
||||||
|
DefineCustomStringVariable(
|
||||||
|
"citus.restore_point_interval_name",
|
||||||
|
gettext_noop("Sets the prefix of pointname for the periodic recovery cluster point"),
|
||||||
|
NULL,
|
||||||
|
&RestorePointIntervalName,
|
||||||
|
NULL,
|
||||||
|
PGC_SIGHUP,
|
||||||
|
GUC_STANDARD,
|
||||||
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
/* warn about config items in the citus namespace that are not registered above */
|
/* warn about config items in the citus namespace that are not registered above */
|
||||||
EmitWarningsOnPlaceholders("citus");
|
EmitWarningsOnPlaceholders("citus");
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
#include "distributed/shard_cleaner.h"
|
#include "distributed/shard_cleaner.h"
|
||||||
#include "distributed/statistics_collection.h"
|
#include "distributed/statistics_collection.h"
|
||||||
#include "distributed/transaction_recovery.h"
|
#include "distributed/transaction_recovery.h"
|
||||||
|
#include "distributed/utils/restore_interval.h"
|
||||||
#include "distributed/version_compat.h"
|
#include "distributed/version_compat.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -955,6 +956,11 @@ CitusMaintenanceDaemonMain(Datum main_arg)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( restorePointIntervalMode && IsCoordinator() && !RecoveryInProgress())
|
||||||
|
{
|
||||||
|
CheckRestoreInterval(MyDatabaseId, myDbData->userOid);
|
||||||
|
}
|
||||||
|
|
||||||
if (got_SIGHUP)
|
if (got_SIGHUP)
|
||||||
{
|
{
|
||||||
got_SIGHUP = false;
|
got_SIGHUP = false;
|
||||||
|
|
Loading…
Reference in New Issue