From: Bruce Momjian Date: Tue, 13 Feb 2007 17:39:39 +0000 (+0000) Subject: Add ORDER BY to vacummdb so databases are scaned in the same order as X-Git-Tag: REL8_3_BETA1~1237 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3607cb04884ec193c9ffc3027292e89e3ef1182f;p=postgresql Add ORDER BY to vacummdb so databases are scaned in the same order as pg_dumpall. --- diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index 7bd67c2456..aaa897b747 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.15 2007/01/05 22:19:50 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.16 2007/02/13 17:39:39 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -234,7 +234,7 @@ vacuum_all_databases(bool full, bool verbose, bool analyze, int i; conn = connectDatabase("postgres", host, port, username, password, progname); - result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn;", progname, echo); + result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;", progname, echo); PQfinish(conn); for (i = 0; i < PQntuples(result); i++)