Index: src/bin/pg_ctl/pg_ctl.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/pg_ctl/pg_ctl.c,v
retrieving revision 1.89
diff -c -c -r1.89 pg_ctl.c
*** src/bin/pg_ctl/pg_ctl.c	15 Nov 2007 21:14:41 -0000	1.89
--- src/bin/pg_ctl/pg_ctl.c	20 Nov 2007 19:21:09 -0000
***************
*** 77,86 ****
  	RUN_AS_SERVICE_COMMAND
  } CtlCommand;
  
  
  static bool do_wait = false;
  static bool wait_set = false;
! static int	wait_seconds = 60;
  static bool silent_mode = false;
  static ShutdownMode shutdown_mode = SMART_MODE;
  static int	sig = SIGTERM;		/* default */
--- 77,87 ----
  	RUN_AS_SERVICE_COMMAND
  } CtlCommand;
  
+ #define DEFAULT_WAIT	60
  
  static bool do_wait = false;
  static bool wait_set = false;
! static int	wait_seconds = DEFAULT_WAIT;
  static bool silent_mode = false;
  static ShutdownMode shutdown_mode = SMART_MODE;
  static int	sig = SIGTERM;		/* default */
***************
*** 1031,1036 ****
--- 1032,1041 ----
  	if (registration && do_wait)
  		strcat(cmdLine, " -w");
  
+ 	if (registration && wait_seconds != DEFAULT_WAIT)
+ 		/* concatenate */
+ 		sprintf(cmdLine + strlen(cmdLine), " -t %d", wait_seconds);
+ 
  	if (post_opts)
  	{
  		strcat(cmdLine, " ");
***************
*** 1472,1478 ****
  	printf(_("Usage:\n"));
  	printf(_("  %s start   [-w] [-t SECS] [-D DATADIR] [-s] [-l FILENAME] [-o \"OPTIONS\"]\n"), progname);
  	printf(_("  %s stop    [-W] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n"), progname);
! 	printf(_("  %s restart [-w] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n                   [-o \"OPTIONS\"]\n"), progname);
  	printf(_("  %s reload  [-D DATADIR] [-s]\n"), progname);
  	printf(_("  %s status  [-D DATADIR]\n"), progname);
  	printf(_("  %s kill    SIGNALNAME PID\n"), progname);
--- 1477,1484 ----
  	printf(_("Usage:\n"));
  	printf(_("  %s start   [-w] [-t SECS] [-D DATADIR] [-s] [-l FILENAME] [-o \"OPTIONS\"]\n"), progname);
  	printf(_("  %s stop    [-W] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n"), progname);
! 	printf(_("  %s restart [-w] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]\n"
! 		 "                 [-o \"OPTIONS\"]\n"), progname);
  	printf(_("  %s reload  [-D DATADIR] [-s]\n"), progname);
  	printf(_("  %s status  [-D DATADIR]\n"), progname);
  	printf(_("  %s kill    SIGNALNAME PID\n"), progname);
