[MASSMAIL]REASSIGN pg_auth_members - Mailing list pgsql-hackers

From Étienne BERSAC
Subject [MASSMAIL]REASSIGN pg_auth_members
Date
Msg-id dbfd6ee6d4e1d5a9c7ae019a50968ae199436745.camel@dalibo.com
Whole thread Raw
List pgsql-hackers
Hi,

I encounter a new behaviour in Postgres 16: DROP OWNED BY drops
memberships when dropping grantor of memberhsip. A call on REASSIGN
OWNED BY does not reassign membership from grantor to target owner.

Attached is a script my-reassign.sql which reproduce the behaviour.
Just run it with psql -f to reproduce. If you get *MEMBERSHIP LOST!!*
message, then the DROP OWNED BY "unexpectedly" dropped the membership.

This script run smoothly on Postgres 15. Membership is survives drop of
grantor.

What do you think of this ? How to change grantor of memberships before
dropping the grantor role ? Should we fix REASSIGN to change grantor in
pg_auth_members ?

Regards,
Étienne BERSAC
Dalibo

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Streaming read-ready sequential scan code
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: Using the %m printf format more