Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3607cb0

Browse files
committed
Add ORDER BY to vacummdb so databases are scaned in the same order as
pg_dumpall.
1 parent 954eb25 commit 3607cb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/scripts/vacuumdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
8-
* $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.15 2007/01/05 22:19:50 momjian Exp $
8+
* $PostgreSQL: pgsql/src/bin/scripts/vacuumdb.c,v 1.16 2007/02/13 17:39:39 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -234,7 +234,7 @@ vacuum_all_databases(bool full, bool verbose, bool analyze,
234234
int i;
235235

236236
conn = connectDatabase("postgres", host, port, username, password, progname);
237-
result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn;", progname, echo);
237+
result = executeQuery(conn, "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;", progname, echo);
238238
PQfinish(conn);
239239

240240
for (i = 0; i < PQntuples(result); i++)

0 commit comments

Comments
 (0)