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

Commit2110be0

Browse files
committed
Cleanup for CLUSTERDB failure:
On Sat, Oct 19, 2002 at 12:11:32AM +0200, Peter Eisentraut wrote:> $ ./clusterdb> psql: could not connect to server: No such file or directory> Is the server running locally and accepting> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?> psql: could not connect to server: No such file or directory> Is the server running locally and accepting> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?> clusterdb: While clustering peter, the following failed:> $>> This could probably handled a little more gracefully.Yes, sorry. A patch for this is attached. Please apply.Alvaro Herrera
1 parente49c1a9 commit2110be0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/bin/scripts/clusterdb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
#
1313
# IDENTIFICATION
14-
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.7 2002/10/18 22:05:36 petere Exp $
14+
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/clusterdb,v 1.8 2002/10/21 20:32:33 momjian Exp $
1515
#
1616
#-------------------------------------------------------------------------
1717

@@ -141,6 +141,7 @@ if [ "$alldb" ]; then
141141
exit 1
142142
fi
143143
dbname=`${PATHNAME}psql$PSQLOPT -q -t -A -d template1 -c'SELECT datname FROM pg_database WHERE datallowconn'`
144+
["$?"-ne 0 ]&&exit 1
144145

145146
elif [-z"$dbname" ];then
146147
if ["$PGDATABASE" ];then
@@ -159,6 +160,7 @@ do
159160
query="SELECT nspname, pg_class.relname, pg_class_2.relname FROM pg_class, pg_class AS pg_class_2 JOIN pg_namespace ON (pg_namespace.oid=relnamespace), pg_index WHERE pg_class.oid=pg_index.indrelid AND pg_class_2.oid=pg_index.indexrelid AND pg_index.indisclustered AND pg_class.relowner=(SELECT usesysid FROM pg_user WHERE usename=current_user)"
160161
if [-z"$table" ];then
161162
tables=`${PATHNAME}psql$db$PSQLOPT -F: -P format=unaligned -t -c"$query"`
163+
["$?"-ne 0 ]&&exit 1
162164
else
163165
# if tablename has a dot, use it as namespace separator
164166
ifecho$table| grep -s'\.'2>&1>/dev/null

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp