Invalidate acl.c caches for pg_authid.rolinherit changes
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: pgsql-hackers@postgresql.org
Date: 2020-12-21T09:50:28Z
Lists: pgsql-hackers
Attachments
- noinherit-inval-v1.patch (text/plain) patch v1
Backends reflect "GRANT role_name" changes rather quickly, due to a syscache invalidation callback. Let's register an additional callback to reflect "ALTER ROLE ... [NO]INHERIT" with equal speed. I propose to back-patch this. While pg_authid changes may be more frequent than pg_auth_members changes, I expect neither is frequent enough to worry about the resulting acl.c cache miss rate. pg_authid changes don't affect cached_membership_roles, so I could have invalidated cached_privs_roles only. That felt like needless complexity. I expect cached_privs_role gets the bulk of traffic, since SELECT, INSERT, UPDATE and DELETE use it. cached_membership_roles pertains to DDL and such.
Commits
-
Fix back-patch of "Invalidate acl.c caches when pg_authid changes."
- 14649bf502eb 9.5.25 landed
- 3f920e876bdc 9.6.21 landed
- d176b9d5e187 10.16 landed
-
Invalidate acl.c caches when pg_authid changes.
- b81d3791ed8f 9.6.21 landed
- 90383a613b48 9.5.25 landed
- e83e8509b0c8 11.11 landed
- d7c197f46251 10.16 landed
- c96698806042 12.6 landed
- 9f8a48bb2c0e 13.2 landed
- 08db7c63f34e 14.0 landed