summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gtm/main/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gtm/main/main.c b/src/gtm/main/main.c
index 123350029e..c0b3832123 100644
--- a/src/gtm/main/main.c
+++ b/src/gtm/main/main.c
@@ -193,9 +193,6 @@ InitGTMProcess()
MyThreadID = pthread_self();
MemoryContextInit();
- /* Backup the restore point */
- GTM_WriteRestorePoint();
-
/*
* The memory context is now set up.
* Add the thrinfo structure in the global array
@@ -706,6 +703,10 @@ main(int argc, char *argv[])
GTM_MutexLockRelease(&control_lock);
}
+ /* Backup the restore point */
+ GTM_SetNeedBackup();
+ GTM_WriteRestorePoint();
+
if (Recovery_IsStandby())
{
if (!gtm_standby_register_self(NodeName, GTMPortNumber, GTMDataDir))
@@ -2230,6 +2231,8 @@ PromoteToActive(void)
errmsg("could not close GTM configuration file \"%s\": %m",
conf_file)));
}
+ GTM_SetNeedBackup();
+ GTM_WriteRestorePoint();
return;
}