git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2dde90a)
Propogate pg_ctl -D to the postmaster as a -D flag for identification by
2003年2月14日 22:18:25 +0000 (22:18 +0000)
2003年2月14日 22:18:25 +0000 (22:18 +0000)
ps for multiple postmasters, for Kevin Brown.


diff --git a/src/bin/pg_ctl/pg_ctl.sh b/src/bin/pg_ctl/pg_ctl.sh
index 0c7341bd9bc2c3999c23af7dfb441929dfe69ac2..7e7828b1fae168ba1d1601af953e1e707a70d24d 100755 (executable)
--- a/src/bin/pg_ctl/pg_ctl.sh
+++ b/src/bin/pg_ctl/pg_ctl.sh
@@ -8,7 +8,7 @@
#
#
# 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=
silence_echo=
shutdown_mode=smart
+PGDATAOPTS=""
+POSTOPTS=""
while [ "$#" -gt 0 ]
do
@@ -129,7 +131,8 @@ do
;;
-D)
shift
- # pass environment into new postmaster
+ # we need to do this so -D datadir shows in ps display
+ PGDATAOPTS="-D 1ドル"
PGDATA="1ドル"
export PGDATA
;;
@@ -333,12 +336,12 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
fi
if [ -n "$logfile" ]; then
- "$po_path" ${1+"$@"} </dev/null >>$logfile 2>&1 &
+ "$po_path" ${1+"$@"} ${PGDATAOPTS+$PGDATAOPTS} </dev/null >>$logfile 2>&1 &
else
# when starting without log file, redirect stderr to stdout, so
# pg_ctl can be invoked with >$logfile and still have pg_ctl's
# stderr on the terminal.
- "$po_path" ${1+"$@"} </dev/null 2>&1 &
+ "$po_path" ${1+"$@"} ${PGDATAOPTS+$PGDATAOPTS} </dev/null 2>&1 &
fi
# if had an old lockfile, check to see if we were able to start
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /