pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bossartn@amazon.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail
Date: Mon, 11 Jul 2016 22:36:41 +0000
Message-ID: <20160711223641.1426.86096@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:      14242
Logged by:          Nathan Bossart
Email address:      bossartn@amazon.com
PostgreSQL version: 9.5.2
Operating system:   64-bit Linux
Description:        

It is possible to modify the "role" setting in setconfig in the
pg_db_role_setting table such that it points to a nonexistent role.  When
this is the case, restoring the output of pg_dumpall will fail due to the
missing role.
 
Steps to reproduce:
 
1. As superuser, execute "create role foo with login password 'test'"
2. As foo, execute "alter role foo set role = 'foo'"
3. As superuser, execute "alter role foo rename to bar"
        a. At this point, the setconfig entry in pg_db_role_setting for
'bar' will contain '{role=foo}', which no longer exists
4. Execute pg_upgrade with the recommended steps in
https://www.postgresql.org/docs/current/static/pgupgrade.html
 
During pg_upgrade (more specifically, during the restore of the output from
pg_dumpall), the "ALTER ROLE "bar" SET "role" TO 'foo'" command generated
will fail with "ERROR: role "foo" does not exist".
 
This issue was identified by Jordan Lange and Nathan Bossart.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


view thread (14+ messages)  latest in thread

Message-ID: <20160711223641.1426.86096@wrigleys.postgresql.org>
Permalink:  ../20160711223641.1426.86096@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160711223641.1426.86096@wrigleys.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: bossartn@amazon.com
  Subject: Re: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail
  In-Reply-To: <20160711223641.1426.86096@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