Re: pg_upgrade if 'postgres' database is dropped
От | Bruce Momjian |
---|---|
Тема | Re: pg_upgrade if 'postgres' database is dropped |
Дата | |
Msg-id | 201111021805.pA2I5Dk20828@momjian.us обсуждение исходный текст |
Ответ на | Re: pg_upgrade if 'postgres' database is dropped (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: pg_upgrade if 'postgres' database is dropped
|
Список | pgsql-hackers |
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. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-hackers по дате отправления: