cockroachdb / cockroachdb/cockroach

cdc: allow database as changefeed target

Open
#93,793 1 comment 0 reactions 0 assignees View on GitHub
A-cdc C-enhancement T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**

Users have expressed interest in create a changefeed for an entire database, instead of specific tables. In addition to being a convenience, I believe the intention is that new tables in said database will always be included in (added to) the changefeed.

**Describe the solution you'd like**

New syntax to have a changefeed for a database.

Question: is there a semantic distinction between a changefeed on a “database” vs “all tables in a database”? Depending on this answer, our syntax could be:

- `CREATE CHANGEFEED FOR DATABASE mydb`
- `CREATE CHANGEFEED FOR TABLE *` or `CREATE CHANGEFEED FOR TABLE mydb.*`

Or the `ALL` keyword in there somewhere.

We might also consider same for `SCHEMA`.

Edit, see also previous issue: https://github.com/cockroachdb/cockroach/issues/73435. I’ll still keep this issue open since it’s narrower.

Jira issue: CRDB-22530

Epic CRDB-1421

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.