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

Commita92ab52

Browse files
committed
Enhance pg_ctl so that it prints error messages from postmaster
if it fails to start up it (this is only vaild if -w is given).
1 parent2ce4b4c commita92ab52

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎src/bin/pg_ctl/pg_ctl.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
#
99
#
1010
# IDENTIFICATION
11-
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.10 2000/03/14 08:34:47 ishii Exp $
11+
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.11 2000/03/27 02:12:03 ishii Exp $
1212
#
1313
#-------------------------------------------------------------------------
1414
CMDNAME=`basename$0`
15+
tmp=/tmp/tmp$$
16+
trap"rm -f$tmp; exit" 0 1 2 13 15
1517

1618
# Check for echo -n vs echo \c
1719

@@ -219,17 +221,17 @@ if [ $op = "start" -o $op = "restart" ];then
219221
if [$op="start" ];then
220222
# if we are in start mode, then look for postmaster.opts.default
221223
if [-f$DEFPOSTOPTS ];then
222-
eval"$po_path`cat$DEFPOSTOPTS`"&
224+
eval"$po_path`cat$DEFPOSTOPTS`">$tmp2>&1&
223225
else
224226
$ECHO"$CMDNAME: Can't find$DEFPOSTOPTS"
225227
exit 1
226228
fi
227229
else
228230
# if we are in restart mode, then look postmaster.opts
229-
eval`cat$POSTOPTSFILE`&
231+
eval`cat$POSTOPTSFILE`>$tmp2>&1&
230232
fi
231233
else
232-
eval"$po_path$POSTOPTS"&
234+
eval"$po_path$POSTOPTS">$tmp2>&1&
233235
fi
234236

235237
if [-f$PIDFILE ];then
@@ -253,6 +255,11 @@ if [ $op = "start" -o $op = "restart" ];then
253255
cnt=`expr$cnt + 1`
254256
if [$cnt-gt 60 ];then
255257
$ECHO"$CMDNAME: postmaster does not start up"
258+
if [-r$tmp ];then
259+
$ECHO"$CMDNAME: messages from postmaster:"
260+
$ECHO
261+
cat$tmp
262+
fi
256263
exit 1
257264
fi
258265
sleep 1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp