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:28
Message-ID: E1wtQFs-00000000yEX-1Crt@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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1974acf23cb2a5273821162abe68cd2f70fde682
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 Noah Misch 2026-08-10 13:41:29 pgsql: Add an output_plugin_libraries GUC to bless trusted output plugi
Previous Message Noah Misch 2026-08-10 13:41:27 pgsql: Preserve the owner of extended statistics rebuilt by ALTER TABLE