Re: pg_ctl restart just appends to command line instead of regenerating original cmd

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_ctl restart just appends to command line instead of regenerating original cmd
Дата
Msg-id 200107110457.f6B4v8j07222@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pg_ctl restart just appends to command line instead of regenerating original cmd  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
I have applied the following patch based on Peter's fix.  The forced -D
in the old code clearly was error-prone.  This should fix the reported
problem.


> > Patricia Holben (pholben@greatbridge.com) reports a bug with a severity of 3
>
> > Then when "pg_ctl restart" is executed, the "pg_ctl status" will display:
> >     pg_ctl: postmaster is running (pid: 14635)
> >     Command line was:
> >     /usr/bin/postmaster '-D' '/var/lib/pgsql/data' '-D' '/var/lib/pgsql/data'
> >
> > A subsequent "pg_ctl restart" causes the next "pg_ctl status" to display:
> >     pg_ctl: postmaster is running (pid: 14635)
> >     Command line was:
> >     /usr/bin/postmaster '-D' '/var/lib/pgsql/data' '-D' '/var/lib/pgsql/data' '-D' '/var/lib/pgsql/data'
>
> Actually, only the -D option is repeated.  The patch below might fix it,
> but please check all the other start and restart modes, too (with/without
> -o, especially).
>
> --- pg_ctl.sh   Sat Apr 21 13:23:58 2001
> +++ pg_ctl.sh.new       Wed Jun 20 17:03:07 2001
> @@ -316,7 +316,7 @@
>          eval set X "$POSTOPTS"; shift
>      fi
>
> -    set X -D "$PGDATA" ${1+"$@"}; shift
> +    export PGDATA
>
>      if [ -n "$logfile" ]; then
>          "$po_path" "$@" </dev/null >>$logfile 2>&1 &
>
> --
> Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: src/bin/pg_ctl/pg_ctl.sh
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg_ctl/pg_ctl.sh,v
retrieving revision 1.20
diff -c -r1.20 pg_ctl.sh
*** src/bin/pg_ctl/pg_ctl.sh    2001/04/21 11:23:58    1.20
--- src/bin/pg_ctl/pg_ctl.sh    2001/07/11 04:54:31
***************
*** 316,322 ****
          eval set X "$POSTOPTS"; shift
      fi

!     set X -D "$PGDATA" ${1+"$@"}; shift

      if [ -n "$logfile" ]; then
          "$po_path" "$@" </dev/null >>$logfile 2>&1 &
--- 316,323 ----
          eval set X "$POSTOPTS"; shift
      fi

!     # pass environment into new postmaster
!     export PGDATA

      if [ -n "$logfile" ]; then
          "$po_path" "$@" </dev/null >>$logfile 2>&1 &

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,9) not found
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: shared library compile error