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

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Martin Pitt <martin(at)piware(dot)de>
Cc: 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 01:06:04
Message-ID: 200512300106.jBU164104762@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Martin Pitt wrote:
-- Start of PGP signed section.
> Hi PostgreSQL developers!
> 
> 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.
> 
> My current solution checks for this situation and aborts the upgrade
> if there is at least one name which is both an user and a group (and
> asks for renaming either before attempting the upgrade again).
> 
> For an upstream solution, maybe pg_dumpall should detect this
> situation and abort with an error?

I think we decided that the number of users who have this problem and 
would be using upgraded pg_dumpall to upgrade to 8.1 is too small.  (If
we had realized this problem pre-8.1, it would have been great to have
fixed it.)  In your upgrade script, you _know_ they are going to use
your code for the upgrade so it is much more useful for you to check it.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-12-30 03:20:13
Subject: Re: Upgrading from < 8.1 with users and groups with same name
Previous:From: Martin PittDate: 2005-12-29 22:00:27
Subject: Upgrading from < 8.1 with users and groups with same name

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