Seeking Guidance on Fixing the Cyclic RLS Policy / Infinite Recursion Bug in PostgreSQL

From: Aditya Dave <daveaditya2004(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Seeking Guidance on Fixing the Cyclic RLS Policy / Infinite Recursion Bug in PostgreSQL
Date: 2026-05-25 09:12:35
Message-ID: CAAF19zU7LpLGiLbnMGu2TueD5LLN6dHaHW8OzA1QC_OddUg6Pg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Respected Sir,

I am Aditya, a student currently working on a research project with my
professor, where we are addressing the cyclic RLS policy problem in
PostgreSQL.

The issue is that when a SECURITY DEFINER UDF is not used and the rewriter
encounters a cyclic policy, PostgreSQL throws an "infinite recursion" error
in the terminal. This behavior is also acknowledged in the official
PostgreSQL test cases. Our goal is to find a solution to this problem and
potentially contribute the fix to the PostgreSQL community.

It would be incredibly valuable to have your guidance on this. Being able
to solve this problem in PostgreSQL would be a significant achievement, and
I believe your expertise could greatly help us move in the right direction.

Thank you for your time and consideration.

Regards,
Aditya.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-05-25 09:31:07 doc: Clarify ALTER CONSTRAINT enforceability wording
Previous Message Alexander Korotkov 2026-05-25 09:00:20 Re: Implement waiting for wal lsn replay: reloaded