Re: security labels on databases are bad for dump & restore

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: security labels on databases are bad for dump & restore
Дата
Msg-id 20150719171854.GA1301225@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: security labels on databases are bad for dump & restore  (Andres Freund <andres@anarazel.de>)
Ответы Re: security labels on databases are bad for dump & restore  (Adam Brightwell <adam.brightwell@crunchydatasolutions.com>)
Re: security labels on databases are bad for dump & restore  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Jul 15, 2015 at 11:08:53AM +0200, Andres Freund wrote:
> On 2015-07-15 12:04:40 +0300, Alvaro Herrera wrote:
> > Andres Freund wrote:
> > > One thing worth mentioning is that arguably the problem is caused by the
> > > fact that we're here emitting database level information in pg_dump,
> > > normally only done for dumpall.

Consistency with existing practice would indeed have pg_dump ignore
pg_shseclabel and have pg_dumpall reproduce its entries.

> > ... the reason for which is probably the lack of CURRENT_DATABASE as a
> > database specifier.  It might make sense to add the rest of
> > database-level information to pg_dump output, when we get that.
> 
> I'm not sure. I mean, it's not that an odd idea to assign a label to a
> database and then restore data into it, and expect the explicitly
> assigned label to survive.  Not sure if there actually is a good
> behaviour either way here :/

In a greenfield, I would make "pg_dump --create" reproduce pertinent entries
from datacl, pg_db_role_setting, pg_shseclabel and pg_shdescription.  I would
make non-creating pg_dump reproduce none of those.  Moreover, I would enable
--create by default.  Restoring into a user-provided shell database is
specialized compared to reproducing a database from scratch.



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Bug in bttext_abbrev_convert()
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: LWLock deadlock and gdb advice