Re: Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE - Mailing list pgsql-hackers

From Robert Treat
Subject Re: Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE
Date
Msg-id AANLkTik4K1UgNwVbhCfhCNu=X7O5tPBLAp5cuog-T=Yr@mail.gmail.com
Whole thread Raw
In response to Re: Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Mon, Feb 28, 2011 at 3:42 AM, Magnus Hagander <magnus@hagander.net> wrote:
> On Mon, Feb 28, 2011 at 06:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Treat <rob@xzilla.net> writes:
>>> Did anything ever come of this discussion?
>>
>> I think it's a TODO --- nothing done about it as yet, AFAIR.
>>
>>> On one of the databases I
>>> was upgrading, I ran into a similar problem with roles that are set as
>>> roles. The problem seems to stem from pg_dumpall dumping roles in
>>> alphabetical order:
>>
>>> CREATE ROLE asha;
>>> ALTER ROLE asha SET role TO 'omniti';
>>> .. sometime later ...
>>> CREATE ROLE omniti;
>>
>> That seems like a pretty bizarre thing to do.  Why would you want such a
>> setting?
>
> I'm sure there are several. I've seen (and done) this more than once
> to ensure that the owner of newly created object is the "shared role"
> and not the individual, for example.
>

Yeah, there are actually several of the roles that get set to the
"omniti" role, like the "robert" role, which doesn't have any issue
because it comes alphabetically after omniti. This also helps folks
get around several permission related issues (simplified management,
uniform permissions across users, simplified dependencies, etc..), but
object ownership is a key part of it.


Robert Treat
play: xzilla.net
work: omniti.com
hiring: l42.org/Lg


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG signal handler and non-reentrant malloc/free calls
Next
From: Robert Haas
Date:
Subject: Re: Native XML