What does HackerNews think of walrus?

Applying RLS to PostgreSQL WAL

Language: PLpgSQL

#23 in JSON
#30 in PostgreSQL
I've always known that you run vanilla PostgREST, and that it evaluates RLS in-pg, and it all works great. However when I first looked at walrus[0] a while back (18 months ago?), I couldn't quite figure out what the mechanism of action was, i.e. whether the RLS rules were being evaluated in the database or being parsed in from the DDL and then (partially?) reinterpreted by your WAL subscriber. I hope that explains my comment.

I've had another brief look at that repo, and either you've clarified a few things since I last looked at it, or I didn't look at it closely enough in the first place. It makes far more sense to me now, the impersonation + re-query mechanism puts me at 100%.

Thanks for the response, I appreciate it.

[0]: https://github.com/supabase/walrus

Wen Bo from the Supabase Realtime team here!

We actually use https://github.com/supabase/walrus to get the database changes and we're planning on moving to a Rust worker (https://github.com/supabase/walrus/tree/worker/worker) for better performance especially in the RLS-enabled use case.

I promised José that I would check out Postgrex.ReplicationConnection and we might add it in to our Supabase Realtime some time in the future.

WALRUS is all SQL, so you could use it with anything (probably with a bit of extra code-wrangling): https://github.com/supabase/walrus
[Supabase cofounder] thanks for the kind words.

We're about to wrap up Row Level Security on our real-time APIs too[0] - soon you'll be able to use Policies universally on all APIs.

[0] https://github.com/supabase/walrus