agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Invalidate plan cache after role changes.
Date: Mon, 10 Aug 2026 13:41:29 +0000
Message-ID: <E1wtQFt-00000000yHM-3e9y@gemulon.postgresql.org> (raw)

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.staroverov@ftdata.ru>
Reported-by: Shinya Kato <shinya11.kato@gmail.com>
Author: Ilya Staroverov <i.staroverov@ftdata.ru>
Author: Shinya Kato <shinya11.kato@gmail.com>
Co-authored-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Security: CVE-2026-14666
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f5f2da795b395449ca2970330bbdc88f8366bf68
Author: Nathan Bossart <nathan@postgresql.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(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1wtQFt-00000000yHM-3e9y@gemulon.postgresql.org>
Permalink:  ../E1wtQFt-00000000yHM-3e9y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wtQFt-00000000yHM-3e9y@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Invalidate plan cache after role changes.
  In-Reply-To: <E1wtQFt-00000000yHM-3e9y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox