pgsql: Invalidate plan cache after role changes.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Invalidate plan cache after role changes.
Date: 2026-08-10 13:41:33
Message-ID: E1wtQFx-00000000yPY-1lBN@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Invalidate plan cache after role changes.

Role membership, role attribute, and database ownership changes may
impact the expected behavior of row-level security policies, but
currently the plan cache doesn't take notice. To fix, register
syscache callbacks on pg_auth_members, pg_authid, and pg_database
that invalidate the role-dependent plans. Changes to other
databases' pg_database rows are ignored.

Reported-by: Ilya Staroverov <i(dot)staroverov(at)ftdata(dot)ru>
Reported-by: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Author: Ilya Staroverov <i(dot)staroverov(at)ftdata(dot)ru>
Author: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Co-authored-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Security: CVE-2026-14666
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f4174aa84a3ce73ac8dd20f0a6b495d00028d3f0
Author: Nathan Bossart <nathan(at)postgresql(dot)org>

Modified Files
--------------
src/backend/utils/adt/acl.c | 2 +-
src/backend/utils/cache/plancache.c | 60 ++++++++++++++++++++++++++++++++++++-
src/include/utils/acl.h | 3 ++
3 files changed, 63 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-08-10 16:15:44 pgsql: Last-minute updates for release notes.
Previous Message Noah Misch 2026-08-10 13:41:32 pgsql: ecpg: Fix out-of-bound writes due to processing of invalid bytea