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

From: Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Subject: Re: security labels on databases are bad for dump & restore
Date: 2015-07-31 02:37:33
Message-ID: CAKRt6CSM+BDtnwOTUfB3TGsQ5krmzpDc2PjsCenWKRB+F-i6cQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> 1. "pg_dumpall -g"
>> 2. "pg_dump --create" per database
>
> Gah, OK, I see your point. But we better document this, because if
> you need a PhD in PostgreSQL-ology to take a backup, we're not in a
> good place.

Agreed. Though, honestly, I find this to be a cumbersome approach. I
think it just makes things more confusing, even if it is well
documented. Perhaps it might be necessary as a bridge to get to a
better place. But my first question as an end user would be, 'why
can't one tool do this?'. Also, by using 'pg_dumpall -g' aren't you
potentially getting things that you don't want/need/care about? For
instance, if database 'foo' is owned by 'user1' and database 'bar' is
owned by 'user2' and neither have any knowledge/relation of/to the
other, then when I dump 'foo', in this manner, wouldn't I also be
including 'user2'? Said differently, a restore of a 'foo'-only dump
would also include a 'bar' related role. That seems like a bad idea,
IMHO. Maybe it can't be avoided, but I'd expect that only relevant
information for the database being dumped would be included.

-Adam

--
Adam Brightwell - adam(dot)brightwell(at)crunchydatasolutions(dot)com
Database Engineer - www.crunchydatasolutions.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2015-07-31 02:41:35 Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );
Previous Message Andres Freund 2015-07-31 02:28:57 Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );