How was I able to drop a role even though objects depend on it? - Mailing list pgsql-admin

From Wojciechowski, Robert (GE Transportation)
Subject How was I able to drop a role even though objects depend on it?
Date
Msg-id 59BF48FAC524384DA413D8F4F2E4BA6907D9A9DA@CINURCNA06.e2k.ad.ge.com
Whole thread Raw
Responses Re: How was I able to drop a role even though objects depend on it?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: How was I able to drop a role even though objects depend on it?  (David Johnston <polobo@yahoo.com>)
List pgsql-admin
I’ve noticed a weird situation on one of our development servers running PostgreSQL 9.1.3 where roles have been dropped
eventhough objects depend on that user. I didn’t think that was possible due to the dependency checks on DROP
USER/ROLE.For example, there is a database that shows this connect grant to a user that was known as foo1_userA (oid
3562339547):3562339547=c/postgres This happened after a nightly database import script was run that takes in new clone
databasesfrom production. After the script imports new databases another script runs that drop all users matching a
regex(/^foo1_user/ for example) to clear out stale users. This obviously should succeed dropping a user that does not
havedependent objects and should fail on users that do. For some this is not holding true. Is this a bug? Am I relying
toomuch on DROP USER/ROLE? Any alternative approaches to clearing out users that do not have dependent objects or
guidanceon debugging this situation would be much appreciated! -- Robert 


pgsql-admin by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Ubuntu Precise and auto startup of pg databases
Next
From: Alvaro Herrera
Date:
Subject: Re: How was I able to drop a role even though objects depend on it?