Re: CREATEROLE and role ownership hierarchies
Joshua Brindle <joshua.brindle@crunchydata.com>
From: Joshua Brindle <joshua.brindle@crunchydata.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>, Shinya Kato <Shinya11.Kato@oss.nttdata.com>, "Bossart,
Nathan" <bossartn@amazon.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>,
Jeff Davis <pgsql@j-davis.com>
Date: 2022-01-04T14:35:31Z
Lists: pgsql-hackers
On Mon, Jan 3, 2022 at 5:08 PM Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 12/23/21 16:06, Joshua Brindle wrote:
> > On Tue, Dec 21, 2021 at 8:26 PM Mark Dilger
> > <mark.dilger@enterprisedb.com> wrote:
> >>
> >>
> >>> On Dec 21, 2021, at 5:11 PM, Shinya Kato <Shinya11.Kato@oss.nttdata.com> wrote:
> >>>
> >>> I fixed the patches because they cannot be applied to HEAD.
> >> Thank you.
> > I reviewed and tested these and they LGTM. FYI the rebased v3 patches
> > upthread are raw diffs so git am won't apply them.
>
>
> That's not at all unusual. I normally apply patches just using
>
> patch -p 1 < $patchfile
>
> > I can add myself to
> > the CF as a reviewer if it is helpful.
>
>
> Please do.
I just ran across this and I don't know if it is intended behavior or
not, can you tell me why this happens?
postgres=> \du+
List of roles
Role name | Owner | Attributes
| Member of | Description
-----------+----------+------------------------------------------------------------+-----------+-------------
brindle | brindle | Password valid until 2022-01-05 00:00:00-05
| {} |
joshua | postgres | Create role
| {} |
postgres | postgres | Superuser, Create role, Create DB,
Replication, Bypass RLS | {} |
postgres=> \password
Enter new password for user "brindle":
Enter it again:
ERROR: role "brindle" with OID 16384 owns itself
Commits
-
Make role grant system more consistent with other privileges.
- ce6b672e4455 16.0 landed
-
Ensure that pg_auth_members.grantor is always valid.
- 6566133c5f52 16.0 landed
-
Remove the ability of a role to administer itself.
- 79de9842ab03 15.0 landed
-
Add tests of the CREATEROLE attribute
- e9d4001ec592 15.0 landed
-
Replace explicit PIN entries in pg_depend with an OID range test.
- a49d08123599 15.0 cited
-
Shore up ADMIN OPTION restrictions.
- fea164a72a7b 9.4.0 cited
-
Add pg_has_role() family of privilege inquiry functions modeled after the
- f9fd1764615e 8.1.0 cited
-
Align GRANT/REVOKE behavior more closely with the SQL spec, per discussion
- 4b2dafcc0b1a 8.0.0 cited