First off all, thank you for all the hard work building Cockroach DB!
I’ve been evaluating moving from Postgres 10 to Cockroach DB, but came across a few issues/questions that I wasn’t able to find answers on that I hope you can advise on.
How do I replace PG’s row-level security feature to avoid application errors / issues from leaking one tenants data to an other?
A previous question last year pointed to https://github.com/cockroachdb/cockroach/issues/16978 as a way to track it - but it seems to refer more to partitioning than security. Any updates to adding row level security to CRDB?
Notifications for micro-services
One of my favourite PG features is LISTEN/NOTIFY. From what I’ve read, this is not possible in CRDB. It appears that change feeds MAY help, but I’m not sure since it is enterprise only and still in development?
Our use case is that we have a whole bunch of micro-services that need to act when there are certain changes made to a table. I use a combination of PG triggers, functions and LISTEN/NOTIFY to achieve this.
Say we have a table that I need to track changes on. I attach a trigger that calls a function to assemble a JSON payload of the change, and send it via the NOTIFY channel.
I have a service listening on that channel, which then publishes this change. This allows any service listening to capture that payload and decide whether it’s useful or not. This includes updating a cache, or kick starting a process.
How can I achieve something similar with CRDB? I’m assuming I’ll need to add some code on top of the database. I’d appreciate some guidance on where to start since it looks like triggers, functions and listen/notify are not supported.
Thanks again for your time!