![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
I think we decided that the number of users who have this problem and=20 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. |

#4
| |||
| |||
|
|
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. =20 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; |
|
but of course we can't do anything about dumps made with existing versions of pg_dump. |
|
My current solution checks for this situation and aborts the upgrade =20 That seems like serious overkill. |
#5
| |||
| |||
|
|
Tom Lane [2005-12-29 22:20 -0500]: 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? |
![]() |
| Thread Tools | |
| Display Modes | |
| |