From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_upgrade if 'postgres' database is dropped |
Date: | 2011-11-02 18:23:44 |
Message-ID: | CA+TgmoYL40pidfeXeYfqFjza7J2c2m+wQVP2Bnf4UEtD9mfwfA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 2, 2011 at 2:05 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Robert Haas wrote:
>> > However, we need to rethink the flag to be used for this: pg_dumpall
>> > uses -l, but many of the other utilities already use that for some
>> > other purpose, and it's not exactly mnemonic anyway. ?"-d" for
>> > database could work, but that's also in use in some places, and
>> > furthermore somewhat confusing since many if not all of these
>> > utilities have an option to operate on a single database only, and you
>> > might think that -d would specify the database to operate on, rather
>> > than the one to be used to get the list of databases. ?pgAdmin uses
>> > the term "maintenance database" to refer to a database to be used when
>> > none is explicitly specified, and I think that's fairly clear
>> > terminology. ?So I propose that we add a --maintenance-db option (with
>> > no short form, since this is a relatively obscure need) to the tools
>> > listed above. ?The tools will pass the associated value (or NULL if
>> > the option is not specified) to the above-mentioned routine in
>> > common.c, which will do the rest.
>> >
>> > If nobody objects, I'll go do that. ?Hopefully that should be enough
>> > to put this problem to bed more or less permanently.
>>
>> All right, I've worked up a (rather boring and tedious) patch to do
>> this, which is attached.
>
> I wonder if we should bother using a flag for this. No one has asked
> for one, and the new code to conditionally connect to databases should
> function fine for most use cases.
True, but OTOH we have such a flag for pg_dumpall, and I've already
done the work.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-11-02 18:27:25 | Re: [COMMITTERS] pgsql: Reduce checkpoints and WAL traffic on low activity database serv |
Previous Message | Robert Haas | 2011-11-02 18:20:54 | Re: Single pass vacuum - take 2 |