Re: [HACKERS] Refactor handling of database attributes betweenpg_dump and pg_dumpall

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Refactor handling of database attributes betweenpg_dump and pg_dumpall
Дата
Msg-id CA+TgmobXwkmjxZcwN9zdZHcrYrkJzGhRKaW3-tHB9kXJxgwq_g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall
Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall
Список pgsql-hackers
On Wed, Jan 17, 2018 at 6:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> * As the patch stands, --set-db-properties is implicit when you specify
> -C, and in fact the patch goes to the trouble of throwing an error if you
> try to specify both switches.  I'm inclined to think this might be a bad
> idea.  What about saying that -C enables emitting CREATE DATABASE and
> reconnecting to that DB, and independently of that, --set-db-properties
> enables emitting the additional per-database properties?  This seems
> simpler to understand, more flexible, and less of a change from the
> previous behavior of -C.  On the other hand you could argue that people
> would always want --set-db-properties with -C and so we're merely
> promoting carpal tunnel (and errors of omission) if we do it like that.

I would vigorously agree with that latter argument.  I think the
chances of errors of omission would be very high even if the carpal
tunnel dangers were ameliorated by giving --set-db-properties a short
option name.

> If so, maybe we could say "-C implies --set-db-properties by default, but
> if you really don't want that, you can say -C --no-set-db-properties".

That seems like a better idea.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH][PROPOSAL] Refuse setting toast.* reloptions when TOASTtable does not exist
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table