mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Prevent vacuumdb from trying to vacuum template0.
This commit is contained in:
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.14 2001/01/08 20:32:27 tgl Exp $
|
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.15 2001/01/08 23:02:36 tgl Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ if [ "$alldb" ]; then
|
|||||||
echo "$CMDNAME: cannot vacuum all databases and a specific one at the same time" 1>&2
|
echo "$CMDNAME: cannot vacuum all databases and a specific one at the same time" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
dbname=`${PATHNAME}psql $PSQLOPT -q -t -A -d template1 -c 'SELECT datname FROM pg_database'`
|
dbname=`${PATHNAME}psql $PSQLOPT -q -t -A -d template1 -c 'SELECT datname FROM pg_database WHERE datallowconn'`
|
||||||
|
|
||||||
elif [ -z "$dbname" ]; then
|
elif [ -z "$dbname" ]; then
|
||||||
echo "$CMDNAME: missing required argument: database name" 1>&2
|
echo "$CMDNAME: missing required argument: database name" 1>&2
|
||||||
|
Reference in New Issue
Block a user