Re: tiny patch to make vacuumdb -a's database order match pg_dumpall

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Dan Thomas <godders(at)gmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: tiny patch to make vacuumdb -a's database order match pg_dumpall
Date: 2007-02-13 17:40:04
Message-ID: 200702131740.l1DHe4W25046@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Dan Thomas wrote:
> Hiya,
>
> I've been having trouble running vacuumdb -a and pg_dumpall
> concurrently because they run through the databases in a different
> order (so dumpall was getting stuck behind vacuum's lock, and my
> firewall was rather unhelpfully closing the idle connection). I can't
> see a good reason for them to be using a different order, and as it
> will only affect those that have created new databases since restoring
> from a dump, may not be instantly obvious. It appears slightly more
> thought has gone into pg_dumpall's code (in that it actually includes
> an ORDER BY), so I elected to fiddle with vacuumdb.
>
> I hope this is in the correct format (this is the first patch I've
> submitted for anything), please let me know if I've done something
> daft.
>
> Dan
>
> 237c237
> < 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);

OK, ORDER BY added for 8.3.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 919 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-02-13 17:43:19 Re: Variable length varlena headers redux
Previous Message Bruce Momjian 2007-02-13 17:39:39 pgsql: Add ORDER BY to vacummdb so databases are scaned in the same

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-13 18:01:14 Re: [GENERAL] contrib/levenshtein() has a bug?
Previous Message Bruce Momjian 2007-02-13 16:26:57 Re: Have psql show current sequnce values - (Resubmission)