agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Include check on polpermissive relcache for policies
Date: Wed, 15 Jul 2026 01:04:16 +0000
Message-ID: <E1wjo2p-000DeQ-2m@gemulon.postgresql.org> (raw)

Include check on polpermissive relcache for policies

equalPolicy() is used in the relation cache to check if two policy
definitions are equivalent, but missed to check for polpermissive.

ALTER POLICY cannot switch a policy to be PERMISSIVE or RESTRICTIVE, so
this would need a dropped and then re-created policy, which would
trigger a relcache invalidation.  Anyway, there is no harm in being
consistent in the check, and if one decides to add an ALTER POLICY to
switch PERMISSIVE or RESTRICTIVE, we would be silently in trouble.

Author: Andreas Lind <andreaslindpetersen@gmail.com>
Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Discussion: https://postgr.es/m/CAMxA3rv1CS6R7JR5ojz-3CmCEnZEFrqu+XXTnGbLRWrjJRH7sA@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ddce02d353f3b955287a833f13eef1abeb8d8200

Modified Files
--------------
src/backend/utils/cache/relcache.c | 2 ++
1 file changed, 2 insertions(+)



view thread (7+ messages)  latest in thread

Message-ID: <E1wjo2p-000DeQ-2m@gemulon.postgresql.org>
Permalink:  ../E1wjo2p-000DeQ-2m@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wjo2p-000DeQ-2m@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Include check on polpermissive relcache for policies
  In-Reply-To: <E1wjo2p-000DeQ-2m@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