diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 3cb866f..584b44a 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -9906,18 +9906,7 @@ CheckForStandbyTrigger(void) 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, + ereport(LOG, (errmsg("received promote request"))); ResetPromoteTriggered(); @@ -9934,6 +9923,7 @@ CheckForStandbyTrigger(void) (errmsg("trigger file found: %s", TriggerFile))); unlink(TriggerFile); triggered = true; + fast_promote = true; return true; } return false; diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index a4e7922..83ca437 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -1107,13 +1107,12 @@ do_promote(void) } /* - * 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) {