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

Re: Upgrading from < 8.1 with users and groups with same name

From: Martin Pitt <martin(at)piware(dot)de>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Upgrading from < 8.1 with users and groups with same name
Date: 2005-12-30 10:25:38
Message-ID: 20051230102538.GB14308@box79162.elkhouse.de (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi!

Tom Lane [2005-12-29 22:20 -0500]:
> Martin Pitt <martin(at)piware(dot)de> writes:
> > I recently got a rather interesting Debian bug [1]: When upgrading a
> > pre-8.1 database to 8.1, the upgrade messes up permissions if the old
> > database had users and groups with the same name. Since in 8.1 they
> > get collapsed to a 'role' there will be a name clash.
> 
> I think the only real problem here is that the role ends up with
> NOLOGIN set, which we could probably fix by reordering the commands;

It will also lead to confusion, especially if the user is not in the
group with the same name. If the admin assigned different privileges
to the group and to the user, then collapsing them into one role
would change the privileges for the members of the group, or not?

> but of course we can't do anything about dumps made with existing
> versions of pg_dump.

At least in Debian the upgrade process always uses the latest
pg_dumpall.

> > My current solution checks for this situation and aborts the upgrade
> 
> That seems like serious overkill.

Since I currently do not know any other clean way, it seemed like a
safe choice to me for now. The script just aborts and asks the admin
to rename the affected user or groups, and then reattempt the upgrade.
What would you recommend instead?

Thanks,

Martin

-- 
Martin Pitt              http://www.piware.de
Ubuntu Developer   http://www.ubuntulinux.org
Debian Developer        http://www.debian.org

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-12-30 15:11:14
Subject: Re: Upgrading from < 8.1 with users and groups with same name
Previous:From: Martin PittDate: 2005-12-30 10:19:19
Subject: Re: Upgrading from < 8.1 with users and groups with same name

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