fast_promote = false;
}
- /*
- * We only look for fast promote via the pg_ctl promote option.
- * It would be possible to extend trigger file support for the
- * fast promotion option but that wouldn't be backwards compatible
- * anyway and we're looking to focus further work on the promote
- * option as the right way to signal end of recovery.
- */
- if (fast_promote)
- ereport(LOG,
- (errmsg("received fast promote request")));
- else
- ereport(LOG,
- (errmsg("received promote request")));
+ ereport(LOG, (errmsg("received promote request")));
ResetPromoteTriggered();
triggered = true;
(errmsg("trigger file found: %s", TriggerFile)));
unlink(TriggerFile);
triggered = true;
+ fast_promote = true;
return true;
}
return false;
}
/*
- * Use two different kinds of promotion file so we can understand
- * the difference between smart and fast promotion.
+ * For 9.3 onwards, use fast promotion as the default option.
+ * Promotion with a full checkpoint is still possible by writing
+ * a file called "promote", e.g.
+ * snprintf(promote_file, MAXPGPATH, "%s/promote", pg_data);
*/
- if (shutdown_mode >= FAST_MODE)
- snprintf(promote_file, MAXPGPATH, "%s/fast_promote", pg_data);
- else
- snprintf(promote_file, MAXPGPATH, "%s/promote", pg_data);
+ snprintf(promote_file, MAXPGPATH, "%s/fast_promote", pg_data);
if ((prmfile = fopen(promote_file, "w")) == NULL)
{
" [-o \"OPTIONS\"]\n"), progname);
printf(_(" %s reload [-D DATADIR] [-s]\n"), progname);
printf(_(" %s status [-D DATADIR]\n"), progname);
- printf(_(" %s promote [-D DATADIR] [-s] [-m PROMOTION-MODE]\n"), progname);
+ printf(_(" %s promote [-D DATADIR] [-s]\n"), progname);
printf(_(" %s kill SIGNALNAME PID\n"), progname);
#if defined(WIN32) || defined(__CYGWIN__)
printf(_(" %s register [-N SERVICENAME] [-U USERNAME] [-P PASSWORD] [-D DATADIR]\n"
printf(_(" fast quit directly, with proper shutdown\n"));
printf(_(" immediate quit without complete shutdown; will lead to recovery on restart\n"));
- printf(_("\nPromotion modes are:\n"));
- printf(_(" smart promote after performing a checkpoint\n"));
- printf(_(" fast promote quickly without waiting for checkpoint completion\n"));
-
printf(_("\nAllowed signal names for kill:\n"));
printf(" ABRT HUP INT QUIT TERM USR1 USR2\n");