cockroachdb / cockroachdb/cockroach

sql: Support CDC queries on RLS-enabled tables

Open
#142,171 0 comments 0 reactions 0 assignees View on GitHub
A-sql-privileges C-enhancement docs-known-limitation T-sql-foundations X-anchored-telemetry
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

We currently block CDC queries on tables with row-level security (RLS) enabled. This issue is to remove that block. The main challenge in supporting CDC on RLS-enabled tables is that the CDC expression requires that filters introduced by RLS be converted into projections. For regular user-defined filters, this conversion is handled by predicateAsProjection (see below). We need to update this logic so it also converts RLS predicates into projections.

https://github.com/cockroachdb/cockroach/blob/65de681fae64493f30647bd17dc77424e260c242/pkg/ccl/changefeedccl/cdceval/expr_eval.go#L545-L551

Jira issue: CRDB-48196

Epic CRDB-52152

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.