PostgREST Infinite Recursion on Constraint after removing constraint
We had a bad constraint on a table causing infinite recursion. We've verified that the table can now be queried directly with the same query without issues after removing that constraint. However after removing the constraint, PostgREST requests are still returning
infinite recursion detected in policy for relation \"users\". We've ran NOTIFY pgrst, 'reload schema' to try and clear the issue but it persists. Anyone have any idea?
At this point the only constraints on the impacted table are just foreign key relationships. But even simple selects by the primary key of the table are returning this behavior. Super strange.2 Replies
You could take a look in the postgres logs, it helps you understand where the recursion is coming from. Saved me a lot of times with RLS infinite recursions
the log reports the same message, however, taking the query and running it manually through the sql editor works without errors 🙁
its so weird, I've used supabase for about 5 years now and never encountered something like this before