Propogate pg_ctl -D to the postmaster as a -D flag for identification by
ps for multiple postmasters, for Kevin Brown.
This commit is contained in:
parent
2dde90ad8d
commit
ba16df979c
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.30 2002/10/18 22:05:35 petere Exp $
|
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.31 2003/02/14 22:18:25 momjian Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -115,6 +115,8 @@ wait_seconds=60
|
|||||||
logfile=
|
logfile=
|
||||||
silence_echo=
|
silence_echo=
|
||||||
shutdown_mode=smart
|
shutdown_mode=smart
|
||||||
|
PGDATAOPTS=""
|
||||||
|
POSTOPTS=""
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
@ -129,7 +131,8 @@ do
|
|||||||
;;
|
;;
|
||||||
-D)
|
-D)
|
||||||
shift
|
shift
|
||||||
# pass environment into new postmaster
|
# we need to do this so -D datadir shows in ps display
|
||||||
|
PGDATAOPTS="-D $1"
|
||||||
PGDATA="$1"
|
PGDATA="$1"
|
||||||
export PGDATA
|
export PGDATA
|
||||||
;;
|
;;
|
||||||
@ -333,12 +336,12 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$logfile" ]; then
|
if [ -n "$logfile" ]; then
|
||||||
"$po_path" ${1+"$@"} </dev/null >>$logfile 2>&1 &
|
"$po_path" ${1+"$@"} ${PGDATAOPTS+$PGDATAOPTS} </dev/null >>$logfile 2>&1 &
|
||||||
else
|
else
|
||||||
# when starting without log file, redirect stderr to stdout, so
|
# when starting without log file, redirect stderr to stdout, so
|
||||||
# pg_ctl can be invoked with >$logfile and still have pg_ctl's
|
# pg_ctl can be invoked with >$logfile and still have pg_ctl's
|
||||||
# stderr on the terminal.
|
# stderr on the terminal.
|
||||||
"$po_path" ${1+"$@"} </dev/null 2>&1 &
|
"$po_path" ${1+"$@"} ${PGDATAOPTS+$PGDATAOPTS} </dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if had an old lockfile, check to see if we were able to start
|
# if had an old lockfile, check to see if we were able to start
|
||||||
|
Loading…
x
Reference in New Issue
Block a user