Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitba16df9

Browse files
committed
Propogate pg_ctl -D to the postmaster as a -D flag for identification by
ps for multiple postmasters, for Kevin Brown.
1 parent2dde90a commitba16df9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/bin/pg_ctl/pg_ctl.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
#
1010
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.30 2002/10/18 22:05:35 petere Exp $
11+
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.31 2003/02/14 22:18:25 momjian Exp $
1212
#
1313
#-------------------------------------------------------------------------
1414

@@ -115,6 +115,8 @@ wait_seconds=60
115115
logfile=
116116
silence_echo=
117117
shutdown_mode=smart
118+
PGDATAOPTS=""
119+
POSTOPTS=""
118120

119121
while ["$#"-gt 0 ]
120122
do
@@ -129,7 +131,8 @@ do
129131
;;
130132
-D)
131133
shift
132-
# pass environment into new postmaster
134+
# we need to do this so -D datadir shows in ps display
135+
PGDATAOPTS="-D$1"
133136
PGDATA="$1"
134137
export PGDATA
135138
;;
@@ -333,12 +336,12 @@ if [ "$op" = "start" -o "$op" = "restart" ];then
333336
fi
334337

335338
if [-n"$logfile" ];then
336-
"$po_path"${1+"$@"}</dev/null>>$logfile2>&1&
339+
"$po_path"${1+"$@"}${PGDATAOPTS+$PGDATAOPTS}</dev/null>>$logfile2>&1&
337340
else
338341
# when starting without log file, redirect stderr to stdout, so
339342
# pg_ctl can be invoked with >$logfile and still have pg_ctl's
340343
# stderr on the terminal.
341-
"$po_path"${1+"$@"}</dev/null2>&1&
344+
"$po_path"${1+"$@"}${PGDATAOPTS+$PGDATAOPTS}</dev/null2>&1&
342345
fi
343346

344347
# if had an old lockfile, check to see if we were able to start

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp