Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLzXc-0007f3-6a for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2015 19:35:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YLzXb-0005op-Hw for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Feb 2015 19:35:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YLzXa-0005nx-F2 for pgsql-bugs@postgresql.org; Thu, 12 Feb 2015 19:35:10 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YLzXU-0000Ha-VZ for pgsql-bugs@postgresql.org; Thu, 12 Feb 2015 19:35:08 +0000 MIME-Version: 1.0 Subject: BUG #12765: Postgresql ROLE dropped, but its not dropped from pg_roles To: pgsql-bugs@postgresql.org From: vivek.singh@rackspace.com Date: Thu, 12 Feb 2015 19:34:20 +0000 Message-ID: <20150212193420.2590.49423@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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