Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump
Дата
Msg-id 20180124193131.GZ2416@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump
Список pgsql-hackers
Tom,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > I'm afraid we may still get some push-back from existing users of
> > --clean since, with the change you're proposing, we wouldn't be cleaning
> > up anything that's been done to the public schema when it comes to
> > comment changes or ACL changes, right?
>
> No, if you have a nondefault ACL, that will still get applied.  This
> arrangement would drop comment changes, but I can't get excited about
> that; it's certainly far less of an inconvenience in that scenario
> than dumping the comment is in non-superuser-restore scenarios.

That nondefault ACL from the system the pg_dump was run on will get
applied *over-top* of whatever the current ACL on the system that the
restore is being run on, which may or may not be what's expected.

That's different from the case where the public schema is dropped and
recreated because, in that case, the schema will start out with an
empty ACL and the resulting ACL should end up matching what was on the
source system (ignoring the current issue with a non-clean pg_dump into
a custom format dump being used with a pg_restore --clean).

Just to be clear, I'm not suggesting that's a huge deal, but it's
certainly a change and something we should at least recognize and
contemplate.

I'm also not really worried about losing the comment.  I definitely
don't think it's worth putting in the kind of infrastructure that we put
in for init ACLs to handle comments being changed on initdb-time
objects.

Thanks!

Stephen

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: copy.c allocation constant
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Add parallel-aware hash joins.