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

From Lou Picciano
Subject ERROR: cannot drop objects owned by role postgres because they are required by the database system
Date
Msg-id 298939598.7519881273276049285.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net
Whole thread Raw
List 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:

Previous
From: Michael Meskes
Date:
Subject: Re: Possible 9.0 bug
Next
From: Lou Picciano
Date:
Subject: testing simple SELECT commands on newly-created databases. Apparently blocked by (lack of) privileges?