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

ERROR: cannot drop objects owned by role postgres because they are required by the database system

From: Lou Picciano <loupicciano(at)comcast(dot)net>
To: pgsql-testers <pgsql-testers(at)postgresql(dot)org>
Subject: ERROR: cannot drop objects owned by role postgres because they are required by the database system
Date: 2010-05-07 23:47:29
Message-ID: 298939598.7519881273276049285.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net (view raw or flat)
Thread:
Lists: pgsql-testers




[TEST REPORT] 

[Release]: 9.0beta1 

[Test Type]: psql CLI 

[Test]: Trying to perform basic change ownership operations using psql; percursor to dropping the postgres role. 

[Platform]: Solaris SPARC 4u (E450) 

[Parameters]: Objective: replace postgres user with 'admin', then drop 'postgres'. First, trying to change ownerships of system objects... 

postgres=# ALTER ROLE admin CREATEDB CREATEROLE LOGIN ENCRYPTED PASSWORD '<pword>'; 



postgres=# REASSIGN OWNED BY postgres TO admin; 

- ERROR: cannot drop objects owned by role postgres because they are required by the database system 

postgres=# ALTER DATABASE postgres OWNER TO admin; 



postgres=# REASSIGN OWNED BY postgres TO admin; 

- ERROR: cannot drop objects owned by role postgres because they are required by the database system 



postgres=# \c postgres admin 

- You are now connected to database "postgres" as user "admin". 

postgres=# DROP role postgres; 

- ERROR: cannot drop role postgres because it is required by the database system (Makes sense!) 

postgres=# REASSIGN OWNED BY postgres TO admin; 

- ERROR: cannot drop objects owned by role postgres because they are required by the database system 









[Failure]: Dunno? 

[Results]: 



postgres=# REASSIGN OWNED BY postgres TO admin; 

- ERROR: cannot drop objects owned by role postgres because they are required by the database system 



[Comments]: Should we be able to get rid of the postgres user 'elegantly'? Is there a way to REASSIGN without DROPping? Perhaps new design precludes this? Documentation opportunity? 

pgsql-testers by date

Next:From: Lou PiccianoDate: 2010-05-11 20:41:00
Subject: testing simple SELECT commands on newly-created databases. Apparently blocked by (lack of) privileges?
Previous:From: Michael MeskesDate: 2010-05-07 20:22:43
Subject: Re: Possible 9.0 bug

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