Summary
Allow the declarative schema changer to run the supported DROP COLUMN migration on transactional LDR tables, after all required decoder and index-rewrite correctness work is cluster-wide.
Initial supported scope
Support dropping a nullable, non-primary-key column that is not involved in:
- Secondary indexes
- Unique, foreign-key, or check constraints
- Computed, default, or on-update expressions
- Multiple column families
ALTER PRIMARY KEY
- Compound
ALTER TABLE statements or DROP COLUMN ... CASCADE
Scope
- Extend the LDR DDL allowlist for the narrow
DROP COLUMN operation.
- Require every LDR job referencing the table to permit online schema changes.
- Keep
ON_SCHEMA_CONFLICT and TRUNCATE EXTRA COLUMNS as separate safety controls: the former enables schema skew; the latter authorizes dropping non-NULL source-only data.
- Reject unsupported dependency/index cases before changing the descriptor, with actionable errors.
- Add a cluster-version gate that becomes active only after live-row metadata, tombstones, temporary-index merge metadata, and decoder truncation support are present on every node.
- Verify source and destination schema replanning across the drop boundary.
- Add focused SQL/integration tests for allowed and rejected forms.
Done when
The supported DROP operation completes while LDR continues through temporary schema skew, unsupported forms are rejected before mutation, and mixed-version clusters cannot enter a state older nodes handle incorrectly.
Dependencies
Depends on all three index-backfill correctness tickets, per-table TRUNCATE EXTRA COLUMNS, and the policy-gated column-change work in cockroachlabs/cockroach#5064.
Design: https://docs.google.com/document/d/1FRb0lVEKAZGOGW0csPw5HBtf5_FqSPBoP-RcW_pnVdM/edit
Jira issue: CRDB-68658
Epic CRDB-68660
Summary
Allow the declarative schema changer to run the supported
DROP COLUMNmigration on transactional LDR tables, after all required decoder and index-rewrite correctness work is cluster-wide.Initial supported scope
Support dropping a nullable, non-primary-key column that is not involved in:
ALTER PRIMARY KEYALTER TABLEstatements orDROP COLUMN ... CASCADEScope
DROP COLUMNoperation.ON_SCHEMA_CONFLICTandTRUNCATE EXTRA COLUMNSas separate safety controls: the former enables schema skew; the latter authorizes dropping non-NULL source-only data.Done when
The supported DROP operation completes while LDR continues through temporary schema skew, unsupported forms are rejected before mutation, and mixed-version clusters cannot enter a state older nodes handle incorrectly.
Dependencies
Depends on all three index-backfill correctness tickets, per-table
TRUNCATE EXTRA COLUMNS, and the policy-gated column-change work in cockroachlabs/cockroach#5064.Design: https://docs.google.com/document/d/1FRb0lVEKAZGOGW0csPw5HBtf5_FqSPBoP-RcW_pnVdM/edit
Jira issue: CRDB-68658
Epic CRDB-68660