]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Include check on polpermissive relcache for policies REL_15_STABLE github/REL_15_STABLE
authorMichael Paquier <michael@paquier.xyz>
Wed, 15 Jul 2026 01:03:45 +0000 (10:03 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 15 Jul 2026 01:03:45 +0000 (10:03 +0900)
commit38d24d705ffda0d22628737cacc13034948594c0
tree5dab5f77bb8d672566ecde1713248086ebb38fb9
parent494f4f409c0d5866101dc232454e1187d50a84e0
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
src/backend/utils/cache/relcache.c