*** a/src/backend/postmaster/postmaster.c --- b/src/backend/postmaster/postmaster.c *************** *** 2187,2194 **** pmdie(SIGNAL_ARGS) * backends to die off; once they do, we'll kill the startup * and walreceiver processes. */ ! pmState = (pmState == PM_RUN) ? ! PM_WAIT_BACKUP : PM_WAIT_READONLY; } /* --- 2187,2206 ---- * backends to die off; once they do, we'll kill the startup * and walreceiver processes. */ ! if (pmState == PM_RUN) ! { ! if (BackupInProgress()) ! { ! pmState = PM_WAIT_BACKUP; ! ereport(WARNING, ! (errmsg("online backup mode is active"), ! errhint("shutdown will not complete until pg_stop_backup() is called."))); ! } ! else ! pmState = PM_WAIT_BACKENDS; ! } ! else ! pmState = PM_WAIT_READONLY; } /* *** a/src/bin/pg_ctl/pg_ctl.c --- b/src/bin/pg_ctl/pg_ctl.c *************** *** 769,775 **** do_stop(void) { int cnt; pgpid_t pid; - struct stat statbuf; pid = get_pgpid(); --- 769,774 ---- *************** *** 802,813 **** do_stop(void) } else { - if ((shutdown_mode == SMART_MODE) && (stat(backup_file, &statbuf) == 0)) - { - print_msg(_("WARNING: online backup mode is active\n" - "Shutdown will not complete until pg_stop_backup() is called.\n\n")); - } - print_msg(_("waiting for server to shut down...")); for (cnt = 0; cnt < wait_seconds; cnt++) --- 801,806 ----