cockroachdb / cockroachdb/cockroach

logical,txn: allowlist nullable ADD COLUMN for LDR

Open
#173,607 2 comments 0 reactions 0 assignees View on GitHub
A-cdc A-logical-data-replication C-enhancement T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Allow plain nullable `ADD COLUMN` on transactional LDR tables when the stream uses `schema_conflict_policy = 'pause'`. Replace the hardcoded `schemaChangeAllowed = false` with the configured policy and allowlist the schema-skew, boundary, and replanning behavior from the earlier tickets.

Unsupported schema changes should remain blocked. If an incompatible change is nevertheless encountered at runtime, the LDR job should pause with a useful schema-conflict error.

**Out of scope:** Schema-conflict DLQ, defaults, computed columns, constraints, `SET NOT NULL`, `DROP COLUMN`, type changes, and automatic backfills.

**Done when:** An opted-in stream continues replicating through a plain nullable `ADD COLUMN` on either side. Streams without the policy retain today's behavior, and unsupported changes remain blocked or pause safely.

**Notes / risk:** This changes user-visible behavior and must merge after all other tickets. End-to-end coverage should include both schema-change directions, bidirectional replication, restart/resume, and mixed-version rejection.

**Depends on:** #173601, #173602, #173603, #173604, #173605, #173606. This ticket must merge last.

Jira issue: CRDB-66919

Epic CRDB-66920

Contributor guide

Open the contributing guide

Research direction

Start by reading dependent issues #173601 through #173606 and the existing LDR schema-conflict policy, since this ticket must merge last. Validate the stated done criteria across nullable ADD COLUMN in both directions, bidirectional replication, restart/resume, streams without the policy, unsupported changes, and mixed-version rejection.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.