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

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Treat <rob(at)xzilla(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Florian Pflug <fgp(at)phlo(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE
Date: 2011-02-28 08:42:50
Message-ID: AANLkTindCoTf=Num0uiKxKtX=-rrj3aHc=MqWE0uqTUH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 28, 2011 at 06:21, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Treat <rob(at)xzilla(dot)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.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anton 2011-02-28 09:25:29 Re: Native XML
Previous Message Tom Lane 2011-02-28 06:20:32 Re: wCTE: about the name of the feature