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

Commitbf74477

Browse files
committed
check for failure after vacuuming each DB, not only the last one.
1 parentb95f81a commitbf74477

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎src/bin/scripts/vacuumdb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
#
1313
# IDENTIFICATION
14-
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.13 2000/11/25 19:05:44 petere Exp $
14+
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.14 2001/01/08 20:32:27 tgl Exp $
1515
#
1616
#-------------------------------------------------------------------------
1717

@@ -145,7 +145,7 @@ if [ "$alldb" ]; then
145145
dbname=`${PATHNAME}psql$PSQLOPT -q -t -A -d template1 -c'SELECT datname FROM pg_database'`
146146

147147
elif [-z"$dbname" ];then
148-
echo"$CMDNAME: missing required argument database name"1>&2
148+
echo"$CMDNAME: missing required argument: database name"1>&2
149149
echo"Try '$CMDNAME -?' for help."1>&2
150150
exit 1
151151
fi
@@ -154,11 +154,10 @@ for db in $dbname
154154
do
155155
["$alldb"-a"$quiet"-ne 1 ]&&echo"Vacuuming$db"
156156
${PATHNAME}psql$PSQLOPT$ECHOOPT -c"VACUUM$verbose$analyze$table" -d$db
157+
if [$?-ne 0 ];then
158+
echo"$CMDNAME: vacuum$table$db failed"1>&2
159+
exit 1
160+
fi
157161
done
158162

159-
if [$?-ne 0 ];then
160-
echo"$CMDNAME: vacuum failed"1>&2
161-
exit 1
162-
fi
163-
164163
exit 0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp