agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Include check on polpermissive relcache for policies
7+ messages / 1 participants
[nested] [flat]

* pgsql: Include check on polpermissive relcache for policies
@ 2026-07-15 01:04  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2026-07-15 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8c551aab156d45f0626a64c43fcdeba1a40ead0d

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Include check on polpermissive relcache for policies
@ 2026-07-15 01:04  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2026-07-15 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/31d04313c1163497f4c6f4f64fad2359cbbab149

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Include check on polpermissive relcache for policies
@ 2026-07-15 01:04  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2026-07-15 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/36c6b499761878d40fd5f62b698546374a8aa5bc

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Include check on polpermissive relcache for policies
@ 2026-07-15 01:04  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2026-07-15 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2d1ed2c1dd8e8eb4daa300f574331864a6c49688

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Include check on polpermissive relcache for policies
@ 2026-07-15 01:04  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2026-07-15 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Include check on polpermissive relcache for policies
@ 2026-07-15 01:04  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2026-07-15 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/38d24d705ffda0d22628737cacc13034948594c0

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Include check on polpermissive relcache for policies
@ 2026-07-15 01:04  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2026-07-15 01:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/99eb806ab48f77d06b9e902742d0b91f289b1ffa

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2026-07-15 01:04 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15 01:04 pgsql: Include check on polpermissive relcache for policies Michael Paquier <michael@paquier.xyz>
2026-07-15 01:04 pgsql: Include check on polpermissive relcache for policies Michael Paquier <michael@paquier.xyz>
2026-07-15 01:04 pgsql: Include check on polpermissive relcache for policies Michael Paquier <michael@paquier.xyz>
2026-07-15 01:04 pgsql: Include check on polpermissive relcache for policies Michael Paquier <michael@paquier.xyz>
2026-07-15 01:04 pgsql: Include check on polpermissive relcache for policies Michael Paquier <michael@paquier.xyz>
2026-07-15 01:04 pgsql: Include check on polpermissive relcache for policies Michael Paquier <michael@paquier.xyz>
2026-07-15 01:04 pgsql: Include check on polpermissive relcache for policies Michael Paquier <michael@paquier.xyz>

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