Skip site navigation (1) Skip section navigation (2)

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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-01-06 20:32:29
Message-ID: AANLkTimwZEr6Q-NJCoorFCPkOo_MP9sQLe7Qhso48gmx@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Jan 6, 2011 at 1:59 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Well, if everyone who logs in gets the same username, you can easily
> conclude that trying to dump/restore the database will cause problems if
> you have objects in there that are not owned by that user.

I can't, and neither could Florian.  I'm not sure why this is so
obvious to you and Tom.  Unless I've made some catastrophic *manual*
change to the system catalogs, like nuking pg_proc, I expect dump and
restore to just work.  pg_dump's job is to emit a series of commands
that will work.  Every time I run across a case where it doesn't, I'm
violently annoyed, because it's happened to me as a user and it feels
like a bug every time.  Florian is probably made of a bit sterner
stuff than the typical user, but a typical user doesn't go "Oh, gee,
dump and restore didn't work, I guess that setting I installed in
there six years ago must actually be something that the developers
never intended for me to do."  First they cuss, and then they blame us
for not being able to dump the database that we let them create, and
then if they're really ticked they go use some other product.  When
someone actually takes the time to troubleshoot what broke and let us
know, the only correct response from our end is to say "thanks, we'll
work on making that less confusing", not "well that was a stupid thing
to do".

> I now realize the pg_upgrade problem was that it requires super-user
> objects.  You could argue that requiring the ability for a super-user to
> do things in every database is either reasonable or overly-restrictive.
> I am not sure which it is, but I do know pg_upgrade requires it.  Does
> anything else require super-user in every database.

Monitoring and/or management applications of any sort, I would assume.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-01-06 20:54:33
Subject: Re: Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE
Previous:From: Stephen FrostDate: 2011-01-06 20:20:48
Subject: DISCARD ALL ; stored procedures

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group