From: vivek.singh@rackspace.com
To: pgsql-bugs@postgresql.org
Subject: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles
Date: Thu, 12 Feb 2015 19:34:20 +0000
Message-ID: <20150212193420.2590.49423@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 12765
Logged by: vivek singh
Email address: vivek.singh@rackspace.com
PostgreSQL version: 9.3.5
Operating system: CentOS release 6.5
Description:
Postgresql ROLE dropped, but its not dropped from pg_roles view. rolconfig
column of pg_roles still shows the dropped role for associated user.
Bug reproduction:
=================================
postgres=# CREATE ROLE role1;
CREATE ROLE
postgres=# CREATE USER user1;
CREATE ROLE
postgres=# ALTER ROLE user1 SET ROLE TO role1;
ALTER ROLE
postgres=# \du+
List of roles
Role name | Attributes | Member of |
Description
-----------+------------------------------------------------+-----------+-------------
postgres | Superuser, Create role, Create DB, Replication | {} |
role1 | Cannot login | {} |
user1 | | {} |
postgres=# \x
Expanded display is on.
postgres=# SELECT * FROM pg_roles WHERE rolname ='user1';
-[ RECORD 1 ]--+-------------
rolname | user1
rolsuper | f
rolinherit | t
rolcreaterole | f
rolcreatedb | f
rolcatupdate | f
rolcanlogin | t
rolreplication | f
rolconnlimit | -1
rolpassword | ********
rolvaliduntil |
rolconfig | {role=role1}
oid | 24861
postgres=# DROP ROLE role1 ;
DROP ROLE
postgres=# \x
Expanded display is off.
postgres=# \du+
List of roles
Role name | Attributes | Member of |
Description
-----------+------------------------------------------------+-----------+-------------
postgres | Superuser, Create role, Create DB, Replication | {} |
user1 | | {} |
postgres=# \x
Expanded display is on.
postgres=# SELECT * FROM pg_roles WHERE rolname ='user1';
-[ RECORD 1 ]--+-------------
rolname | user1
rolsuper | f
rolinherit | t
rolcreaterole | f
rolcreatedb | f
rolcatupdate | f
rolcanlogin | t
rolreplication | f
rolconnlimit | -1
rolpassword | ********
rolvaliduntil |
rolconfig | {role=role1}
oid | 24861
postgres=# SELECT version();
-[ RECORD 1
]---------------------------------------------------------------------------------------------------------
version | PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc
(GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit
postgres=#
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: vivek.singh@rackspace.com
Subject: Re: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles
In-Reply-To: <20150212193420.2590.49423@wrigleys.postgresql.org>
References: <20150212193420.2590.49423@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox