*** a/src/bin/pg_ctl/pg_ctl.c
--- b/src/bin/pg_ctl/pg_ctl.c
***************
*** 142,147 **** static char postopts_file[MAXPGPATH];
--- 142,148 ----
  static char pid_file[MAXPGPATH];
  static char conf_file[MAXPGPATH];
  static char backup_file[MAXPGPATH];
+ static char recovery_file[MAXPGPATH];
  
  #if defined(HAVE_GETRLIMIT) && defined(RLIMIT_CORE)
  static void unlimit_core_size(void);
***************
*** 802,808 **** 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"));
--- 803,810 ----
  	}
  	else
  	{
! 		if ((shutdown_mode == SMART_MODE) && (stat(backup_file, &statbuf) == 0) &&
! 			(stat(recovery_file, &statbuf) != 0))
  		{
  			print_msg(_("WARNING: online backup mode is active\n"
  						"Shutdown will not complete until pg_stop_backup() is called.\n\n"));
***************
*** 879,885 **** do_restart(void)
  			exit(1);
  		}
  
! 		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"));
--- 881,888 ----
  			exit(1);
  		}
  
! 		if ((shutdown_mode == SMART_MODE) && (stat(backup_file, &statbuf) == 0) &&
! 			(stat(recovery_file, &statbuf) != 0))
  		{
  			print_msg(_("WARNING: online backup mode is active\n"
  						"Shutdown will not complete until pg_stop_backup() is called.\n\n"));
***************
*** 1962,1967 **** main(int argc, char **argv)
--- 1965,1971 ----
  		snprintf(pid_file, MAXPGPATH, "%s/postmaster.pid", pg_data);
  		snprintf(conf_file, MAXPGPATH, "%s/postgresql.conf", pg_data);
  		snprintf(backup_file, MAXPGPATH, "%s/backup_label", pg_data);
+ 		snprintf(recovery_file, MAXPGPATH, "%s/recovery.conf", pg_data);
  	}
  
  	switch (ctl_command)
