pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: andrewbille@gmail.com
Cc: pgsql-bugs@lists.postgresql.org, Daniel Gustafsson <daniel@yesql.se>
Subject: Re: BUG #17346: pg_upgrade fails with role granted by other role
Date: Mon, 27 Dec 2021 11:02:27 -0500
Message-ID: <1489048.1640620947@sss.pgh.pa.us> (raw)
In-Reply-To: <17346-f72b28bd1a341060@postgresql.org>
References: <17346-f72b28bd1a341060@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> After the commit:

> commit 371087d006e04991080bf17cf2287db38d3ea92e
> Author: Daniel Gustafsson <dgustafsson@postgresql.org>
> Date:   Fri Nov 26 14:02:01 2021 +0100
>     Fix GRANTED BY support in REVOKE ROLE statements
    
> pg_upgrade for example from 10.19 version causes the error:

Yeah, you don't even need pg_upgrade.  Just do

regression=# CREATE ROLE user1; CREATE ROLE user2; GRANT user1 TO user2 GRANTED BY user1;
CREATE ROLE
CREATE ROLE
ERROR:  grantor must be current user

A superuser, or really anyone who's a member of the user1 role,
ought to be able to do that (especially since it used to be allowed).
So it seems the permissions check was coded incorrectly.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <1489048.1640620947@sss.pgh.pa.us>
Permalink:  ../1489048.1640620947@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1489048.1640620947@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, andrewbille@gmail.com, daniel@yesql.se
  Subject: Re: BUG #17346: pg_upgrade fails with role granted by other role
  In-Reply-To: <1489048.1640620947@sss.pgh.pa.us>

* 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