diff --git a/pkg/sql/schemachanger/scplan/plan_explain.go b/pkg/sql/schemachanger/scplan/plan_explain.go index 0deda38e5282..01f6c162fb26 100644 --- a/pkg/sql/schemachanger/scplan/plan_explain.go +++ b/pkg/sql/schemachanger/scplan/plan_explain.go @@ -190,8 +190,11 @@ func (p Plan) explainTargets(s scstage.Stage, sn treeprinter.Node, style treepri // Generate format string for printing element status transition. fmtCompactTransition := fmt.Sprintf("%%-%ds → %%-%ds %%s", beforeMaxLen, afterMaxLen) // Go over each target grouping. - targetTypeMap.ForEach(func(key, numTransitions int) { - ts := scpb.TargetStatus(key) + for _, ts := range []scpb.TargetStatus{scpb.ToPublic, scpb.Transient, scpb.ToAbsent} { + numTransitions := targetTypeMap.GetDefault(int(ts)) + if numTransitions == 0 { + continue + } plural := "s" if numTransitions == 1 { plural = "" @@ -233,7 +236,7 @@ func (p Plan) explainTargets(s scstage.Stage, sn treeprinter.Node, style treepri } } } - }) + } return nil } diff --git a/pkg/sql/schemachanger/testdata/explain/add_column b/pkg/sql/schemachanger/testdata/explain/add_column index 6333498041d6..812fc97f3772 100644 --- a/pkg/sql/schemachanger/testdata/explain/add_column +++ b/pkg/sql/schemachanger/testdata/explain/add_column @@ -87,10 +87,6 @@ Schema change plan for ALTER TABLE ‹db›.‹public›.‹tbl› ADD COLUMN │ └── ValidateUniqueIndex {"IndexID":2,"TableID":106} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase - │ ├── 3 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} - │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} │ ├── 3 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 106, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -99,6 +95,10 @@ Schema change plan for ALTER TABLE ‹db›.‹public›.‹tbl› ADD COLUMN │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 3} │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 3} + │ ├── 3 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} + │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} │ └── 9 Mutation operations │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":106} │ ├── SetIndexName {"IndexID":1,"Name":"crdb_internal_in...","TableID":106} @@ -110,10 +110,10 @@ Schema change plan for ALTER TABLE ‹db›.‹public›.‹tbl› ADD COLUMN │ ├── SetJobStateOnDescriptor {"DescriptorID":106} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase - │ ├── 1 element transitioning toward ABSENT - │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} │ ├── 1 element transitioning toward TRANSIENT_ABSENT │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 106, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} + │ ├── 1 element transitioning toward ABSENT + │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} │ └── 5 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":106} │ ├── CreateGcJobForIndex {"IndexID":3,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/add_column_default_seq b/pkg/sql/schemachanger/testdata/explain/add_column_default_seq index c142761d30ce..badb937c82c4 100644 --- a/pkg/sql/schemachanger/testdata/explain/add_column_default_seq +++ b/pkg/sql/schemachanger/testdata/explain/add_column_default_seq @@ -93,10 +93,6 @@ Schema change plan for ALTER TABLE ‹db›.‹public›.‹tbl› ADD COLUMN │ └── ValidateUniqueIndex {"IndexID":2,"TableID":106} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase - │ ├── 3 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} - │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} │ ├── 3 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 106, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -105,6 +101,10 @@ Schema change plan for ALTER TABLE ‹db›.‹public›.‹tbl› ADD COLUMN │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 3} │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 3} + │ ├── 3 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} + │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} │ └── 10 Mutation operations │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":106} │ ├── SetIndexName {"IndexID":1,"Name":"crdb_internal_in...","TableID":106} @@ -117,10 +117,10 @@ Schema change plan for ALTER TABLE ‹db›.‹public›.‹tbl› ADD COLUMN │ ├── SetJobStateOnDescriptor {"DescriptorID":107} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase - │ ├── 1 element transitioning toward ABSENT - │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} │ ├── 1 element transitioning toward TRANSIENT_ABSENT │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 106, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} + │ ├── 1 element transitioning toward ABSENT + │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} │ └── 6 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":106} │ ├── CreateGcJobForIndex {"IndexID":3,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid index 5010dcb6d6b4..e29f32904a6b 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid @@ -7,9 +7,6 @@ EXPLAIN (ddl) alter table t add primary key (a); Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ADD PRIMARY KEY (‹a›); ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 2 elements transitioning toward ABSENT - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} @@ -20,6 +17,9 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ADD PRIM │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} + │ ├── 2 elements transitioning toward ABSENT + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 11 Mutation operations │ ├── MakeDroppedColumnDeleteAndWriteOnly {"ColumnID":2,"TableID":104} │ ├── LogEvent {"TargetStatus":1} @@ -82,14 +82,14 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ADD PRIM │ │ └── 1 Validation operation │ │ └── ValidateUniqueIndex {"IndexID":2,"TableID":104} │ ├── Stage 8 of 15 in PostCommitPhase - │ │ ├── 2 elements transitioning toward ABSENT - │ │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ │ ├── 4 elements transitioning toward TRANSIENT_ABSENT │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} │ │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ │ ├── 2 elements transitioning toward ABSENT + │ │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ │ └── 8 Mutation operations │ │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":104} │ │ ├── SetIndexName {"IndexID":1,"Name":"crdb_internal_in...","TableID":104} @@ -144,17 +144,17 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ADD PRIM │ └── ValidateUniqueIndex {"IndexID":4,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 4 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ └── VALIDATED → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ ├── 5 elements transitioning toward TRANSIENT_ABSENT │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ └── VALIDATED → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ └── 6 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} @@ -163,8 +163,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ADD PRIM │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 4 in PostCommitNonRevertiblePhase - │ ├── 1 element transitioning toward ABSENT - │ │ └── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 4} @@ -175,6 +173,8 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ADD PRIM │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 2} │ │ ├── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} + │ ├── 1 element transitioning toward ABSENT + │ │ └── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ └── 12 Mutation operations │ ├── CreateGcJobForIndex {"IndexID":1,"TableID":104} │ ├── MakeIndexAbsent {"IndexID":1,"TableID":104} @@ -196,12 +196,12 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ADD PRIM │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} └── Stage 4 of 4 in PostCommitNonRevertiblePhase + ├── 1 element transitioning toward TRANSIENT_ABSENT + │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} ├── 3 elements transitioning toward ABSENT │ ├── DELETE_ONLY → ABSENT Column:{DescID: 104, ColumnID: 2} │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} │ └── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - ├── 1 element transitioning toward TRANSIENT_ABSENT - │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} └── 6 Mutation operations ├── CreateGcJobForIndex {"IndexID":2,"TableID":104} ├── MakeIndexAbsent {"IndexID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 index e41be8c7d550..fd643771f8ff 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 10 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 index 8c8d302fed27..958c1bf0ac6b 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 11 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 index e129d7283411..eaf8ecf2ed40 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 12 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 index 7a4a9511852e..ca9464597e3a 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 13 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 index cbf35c8706d6..2a06a1d1df25 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 14 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 index 6f796eaeb27c..0f91679d7906 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 15 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 index af155f491507..3e2316912c76 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase + ├── 2 elements transitioning toward PUBLIC + │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} ├── 8 elements transitioning toward ABSENT │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - ├── 2 elements transitioning toward PUBLIC - │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} └── 11 Mutation operations ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} ├── MakeColumnPublic {"ColumnID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 index f4248306ad11..864bea701966 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 index 8f222a0984b6..84035dd0ab55 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 index 32ebb26bc944..2391459261fb 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 index 4233c8264288..eba9610c63f1 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 index f6691650b4cc..7d052cfd47a3 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 index 49035f4490c3..8437d7e65490 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 index 5b572f98718e..3c3821ec75c8 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 8 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 index 3792e52361f2..3bea4b83f4b5 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 9 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ADD PRIMARY KEY (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 14 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid index be4e49446701..64793318132c 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid @@ -7,9 +7,6 @@ EXPLAIN (ddl) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 2 elements transitioning toward ABSENT - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} @@ -20,6 +17,9 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} + │ ├── 2 elements transitioning toward ABSENT + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 11 Mutation operations │ ├── MakeDroppedColumnDeleteAndWriteOnly {"ColumnID":2,"TableID":104} │ ├── LogEvent {"TargetStatus":1} @@ -82,14 +82,14 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ │ └── 1 Validation operation │ │ └── ValidateUniqueIndex {"IndexID":2,"TableID":104} │ ├── Stage 8 of 15 in PostCommitPhase - │ │ ├── 2 elements transitioning toward ABSENT - │ │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ │ ├── 4 elements transitioning toward TRANSIENT_ABSENT │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} │ │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ │ ├── 2 elements transitioning toward ABSENT + │ │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ │ └── 8 Mutation operations │ │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":104} │ │ ├── SetIndexName {"IndexID":1,"Name":"crdb_internal_in...","TableID":104} @@ -144,17 +144,17 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ └── ValidateUniqueIndex {"IndexID":4,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 4 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ └── VALIDATED → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ ├── 5 elements transitioning toward TRANSIENT_ABSENT │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ └── VALIDATED → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ └── 6 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} @@ -163,8 +163,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 4 in PostCommitNonRevertiblePhase - │ ├── 1 element transitioning toward ABSENT - │ │ └── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 4} @@ -175,6 +173,8 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 2} │ │ ├── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} + │ ├── 1 element transitioning toward ABSENT + │ │ └── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ └── 12 Mutation operations │ ├── CreateGcJobForIndex {"IndexID":1,"TableID":104} │ ├── MakeIndexAbsent {"IndexID":1,"TableID":104} @@ -196,12 +196,12 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} └── Stage 4 of 4 in PostCommitNonRevertiblePhase + ├── 1 element transitioning toward TRANSIENT_ABSENT + │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} ├── 3 elements transitioning toward ABSENT │ ├── DELETE_ONLY → ABSENT Column:{DescID: 104, ColumnID: 2} │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} │ └── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - ├── 1 element transitioning toward TRANSIENT_ABSENT - │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} └── 6 Mutation operations ├── CreateGcJobForIndex {"IndexID":2,"TableID":104} ├── MakeIndexAbsent {"IndexID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 index c46321d34ef6..c50cd82e2034 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 10 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 index 7adcc9b13c16..9f3b00c112d1 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 11 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 index aa8ef1e3a521..56d371336c69 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 12 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 index 61b554a7bd61..3ad86ec0957c 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 13 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 index b5c5a97284fd..e1d31a0182a3 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 14 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 index 3cbc8eac266d..87e851ad9f10 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 15 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 index 278d404a265d..ff686b4b1338 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase + ├── 2 elements transitioning toward PUBLIC + │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} ├── 8 elements transitioning toward ABSENT │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - ├── 2 elements transitioning toward PUBLIC - │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} └── 11 Mutation operations ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} ├── MakeColumnPublic {"ColumnID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 index 9615729cabde..770f9d5416d4 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 index 8d1339a76f05..376ff31bfd55 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 index 6a9198a9f45c..306a06bd733c 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 index 12c92622463c..dc9fc66d1bf8 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 index 61cc5bb17586..bb5926696a3e 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 index 9530cc6ebb4a..2fdbc227bb6d 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 index c88c0d45f98b..15249b2aecaf 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 @@ -8,6 +8,9 @@ EXPLAIN (ddl) rollback at post-commit stage 8 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ ├── 8 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} @@ -17,9 +20,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 index eb5df4ea76fd..e3e444d9d15f 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 @@ -8,6 +8,11 @@ EXPLAIN (ddl) rollback at post-commit stage 9 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› ALTER PRIMARY KEY USING COLUMNS (‹a›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 4 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 11 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -20,11 +25,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› A │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ ├── 4 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 14 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"rowid","TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_vanilla b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_vanilla index b3cd5c6552b4..3aa9a50f8030 100644 --- a/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_vanilla +++ b/pkg/sql/schemachanger/testdata/explain/alter_table_alter_primary_key_vanilla @@ -99,11 +99,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ └── ValidateUniqueIndex {"IndexID":4,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} @@ -114,6 +109,11 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 3} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ └── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 1} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 10 Mutation operations │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":104} │ ├── SetIndexName {"IndexID":1,"Name":"crdb_internal_in...","TableID":104} @@ -126,11 +126,11 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› ALTER PR │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase - │ ├── 1 element transitioning toward ABSENT - │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ ├── 2 elements transitioning toward TRANSIENT_ABSENT │ │ ├── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 1} + │ ├── 1 element transitioning toward ABSENT + │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ └── 7 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":104} │ ├── CreateGcJobForIndex {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic b/pkg/sql/schemachanger/testdata/explain/drop_column_basic index 9191bf7214ce..55f8d319519c 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic @@ -7,15 +7,15 @@ EXPLAIN (ddl) ALTER TABLE t DROP COLUMN j; Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COLUMN ‹j›; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 2 elements transitioning toward ABSENT - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ ├── 2 elements transitioning toward TRANSIENT_ABSENT │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ ├── 2 elements transitioning toward ABSENT + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ └── 7 Mutation operations │ ├── MakeDroppedColumnDeleteAndWriteOnly {"ColumnID":2,"TableID":104} │ ├── LogEvent {"TargetStatus":1} @@ -75,18 +75,18 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ └── ValidateUniqueIndex {"IndexID":2,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase - │ ├── 5 elements transitioning toward ABSENT - │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} │ ├── 2 elements transitioning toward TRANSIENT_ABSENT │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ ├── 5 elements transitioning toward ABSENT + │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ └── 8 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":104} @@ -97,10 +97,10 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase - │ ├── 1 element transitioning toward ABSENT - │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ ├── 1 element transitioning toward TRANSIENT_ABSENT │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} + │ ├── 1 element transitioning toward ABSENT + │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ └── 5 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":104} │ ├── CreateGcJobForIndex {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_1_of_7 index 3a3643d03245..d9f1893ae57c 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_1_of_7 @@ -8,14 +8,14 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase + ├── 2 elements transitioning toward PUBLIC + │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} ├── 4 elements transitioning toward ABSENT │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - ├── 2 elements transitioning toward PUBLIC - │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} └── 9 Mutation operations ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} ├── MakeColumnPublic {"ColumnID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_2_of_7 index b186f8147827..0e850b79dd7b 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_2_of_7 @@ -8,14 +8,14 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── 4 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ └── 8 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_3_of_7 index 3564215441a9..cf65e3b830ce 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_3_of_7 @@ -8,14 +8,14 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── 4 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ └── 8 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_4_of_7 index fada25d32582..d9ff3c6936b8 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_4_of_7 @@ -8,14 +8,14 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── 4 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ └── 8 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_5_of_7 index 2b3854b6a7b4..01fac955a805 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_5_of_7 @@ -8,14 +8,14 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── 4 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ └── 7 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_6_of_7 index 800a1818fd39..173baf41cb86 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_6_of_7 @@ -8,14 +8,14 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── 4 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ └── 7 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":3,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_7_of_7 index ed3dd8a6cc16..17bddbf91798 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_basic.rollback_7_of_7 @@ -8,14 +8,14 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── 4 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ └── 7 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":2,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index index 4bf1f0a25b51..92aecc1f9ed5 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index @@ -7,6 +7,12 @@ EXPLAIN (ddl) ALTER TABLE t DROP COLUMN j CASCADE; Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COLUMN ‹j› CASCADE; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ ├── 2 elements transitioning toward TRANSIENT_ABSENT + │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 6 elements transitioning toward ABSENT │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -14,12 +20,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── 2 elements transitioning toward TRANSIENT_ABSENT - │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 12 Mutation operations │ ├── MakeDroppedColumnDeleteAndWriteOnly {"ColumnID":2,"TableID":104} │ ├── LogEvent {"TargetStatus":1} @@ -84,6 +84,12 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ └── ValidateUniqueIndex {"IndexID":3,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ ├── 2 elements transitioning toward TRANSIENT_ABSENT + │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 9 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 3} @@ -94,12 +100,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ └── VALIDATED → DELETE_ONLY SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ ├── 2 elements transitioning toward TRANSIENT_ABSENT - │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 10 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":3,"TableID":104} @@ -112,13 +112,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase + │ ├── 1 element transitioning toward TRANSIENT_ABSENT + │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 4 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT Column:{DescID: 104, ColumnID: 3} │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 3} │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ │ └── DELETE_ONLY → ABSENT SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 1 element transitioning toward TRANSIENT_ABSENT - │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 9 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":104} │ ├── LogEvent {"TargetStatus":1} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_1_of_7 index 61a89e25d4db..77ad6b95fc79 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_1_of_7 @@ -8,11 +8,6 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase - ├── 4 elements transitioning toward ABSENT - │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} ├── 6 elements transitioning toward PUBLIC │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -20,6 +15,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} + ├── 4 elements transitioning toward ABSENT + │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} └── 14 Mutation operations ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} ├── SetColumnName {"ColumnID":3,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_2_of_7 index fade3c656f29..d3394699f993 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_2_of_7 @@ -8,11 +8,6 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -20,6 +15,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":3,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_3_of_7 index 98789b6951b4..1ed91bb75392 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_3_of_7 @@ -8,11 +8,6 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -20,6 +15,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":3,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_4_of_7 index a2c90d2aa915..8c9b172f19b4 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_4_of_7 @@ -8,11 +8,6 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -20,6 +15,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":3,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_5_of_7 index 40b4ecd7191a..4adec81d213d 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_5_of_7 @@ -8,11 +8,6 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -20,6 +15,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":3,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_6_of_7 index 4c9fd672dead..c8d92c0f1ab3 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_6_of_7 @@ -8,11 +8,6 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -20,6 +15,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":3,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_7_of_7 index 1291f5f8b041..b92da02f8e93 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_computed_index.rollback_7_of_7 @@ -8,11 +8,6 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} @@ -20,6 +15,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 3} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":3,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_10_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_10_of_15 index e0aeec5611b8..81c5a97133f6 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_10_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_10_of_15 @@ -9,6 +9,15 @@ EXPLAIN (ddl) rollback at post-commit stage 10 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 8 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 13 elements transitioning toward ABSENT │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} @@ -23,15 +32,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 19 Mutation operations │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_11_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_11_of_15 index 6c67fafa30ca..dc4aa0e21a95 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_11_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_11_of_15 @@ -9,6 +9,15 @@ EXPLAIN (ddl) rollback at post-commit stage 11 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 8 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 13 elements transitioning toward ABSENT │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} @@ -23,15 +32,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 19 Mutation operations │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_12_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_12_of_15 index 10abeb6c1d4d..b1a78782d20e 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_12_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_12_of_15 @@ -9,6 +9,15 @@ EXPLAIN (ddl) rollback at post-commit stage 12 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 8 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 13 elements transitioning toward ABSENT │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} @@ -23,15 +32,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 19 Mutation operations │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_13_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_13_of_15 index f4f834b277dd..80ae4dccacd1 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_13_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_13_of_15 @@ -9,6 +9,15 @@ EXPLAIN (ddl) rollback at post-commit stage 13 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 8 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 13 elements transitioning toward ABSENT │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} @@ -23,15 +32,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 17 Mutation operations │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_14_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_14_of_15 index a059869c7d00..0478d2649978 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_14_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_14_of_15 @@ -9,6 +9,15 @@ EXPLAIN (ddl) rollback at post-commit stage 14 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 8 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 13 elements transitioning toward ABSENT │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} @@ -23,15 +32,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 17 Mutation operations │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_15_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_15_of_15 index 1c7e9e571e6a..b8134bf555dd 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_15_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_15_of_15 @@ -9,6 +9,15 @@ EXPLAIN (ddl) rollback at post-commit stage 15 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 8 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 13 elements transitioning toward ABSENT │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} @@ -23,15 +32,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 17 Mutation operations │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_1_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_1_of_15 index 4038e58ef625..4f02059816af 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_1_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_1_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase - ├── 6 elements transitioning toward ABSENT - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ └── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} ├── 6 elements transitioning toward PUBLIC │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + ├── 6 elements transitioning toward ABSENT + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ └── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} └── 14 Mutation operations ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_2_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_2_of_15 index c1df9924429a..2dbc302c090a 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_2_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_2_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_3_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_3_of_15 index 90fa2bdcdd3b..34b703a5f5b4 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_3_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_3_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_4_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_4_of_15 index 37823b8973cd..df01b16d59a9 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_4_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_4_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 13 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_5_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_5_of_15 index cff6470d1586..65eace05ff7a 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_5_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_5_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_6_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_6_of_15 index 6d8b0b607f80..a81e44c4c0f6 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_6_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_6_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_7_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_7_of_15 index 343c3970c961..4ad3d4fe93ec 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_7_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_7_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_8_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_8_of_15 index 2333970b0678..253057d1c2d3 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_8_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_8_of_15 @@ -9,13 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 8 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 6 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} @@ -23,6 +16,13 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 12 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetColumnName {"ColumnID":4,"Name":"crdb_internal_id...","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_9_of_15 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_9_of_15 index 723c3cea9b08..71cfc4c03175 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_9_of_15 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.rollback_9_of_15 @@ -9,6 +9,15 @@ EXPLAIN (ddl) rollback at post-commit stage 9 of 15; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.public.‹t› (‹k›); └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 8 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 13 elements transitioning toward ABSENT │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} @@ -23,15 +32,6 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 4} - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 20 Mutation operations │ ├── SetIndexName {"IndexID":1,"Name":"t_pkey","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_1_of_2 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_1_of_2 index 4ca6238a76a2..9b5eaa493681 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_1_of_2 @@ -7,13 +7,6 @@ EXPLAIN (ddl) ALTER TABLE t DROP COLUMN j CASCADE; Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COLUMN ‹j› CASCADE; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 4} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 3 elements transitioning toward PUBLIC │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} @@ -22,6 +15,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 4} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 14 Mutation operations │ ├── MakeDroppedColumnDeleteAndWriteOnly {"ColumnID":2,"TableID":104} │ ├── LogEvent {"TargetStatus":1} @@ -88,6 +88,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ └── ValidateUniqueIndex {"IndexID":3,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ ├── 3 elements transitioning toward TRANSIENT_ABSENT + │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} │ ├── 11 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 4} @@ -100,13 +107,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ └── VALIDATED → DELETE_ONLY SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ ├── 3 elements transitioning toward TRANSIENT_ABSENT - │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} │ └── 10 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":4,"TableID":104} @@ -119,13 +119,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase + │ ├── 1 element transitioning toward TRANSIENT_ABSENT + │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 4 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT Column:{DescID: 104, ColumnID: 4} │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ │ └── DELETE_ONLY → ABSENT SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 1 element transitioning toward TRANSIENT_ABSENT - │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 9 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":104} │ ├── LogEvent {"TargetStatus":1} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_2_of_2 b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_2_of_2 index a317fdec2cdb..2737cfb21a29 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_create_index_separate_statements.statement_2_of_2 @@ -56,9 +56,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ └── 1 Validation operation │ │ └── ValidateUniqueIndex {"IndexID":3,"TableID":104} │ ├── Stage 8 of 15 in PostCommitPhase - │ │ ├── 2 elements transitioning toward ABSENT - │ │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ │ ├── 7 elements transitioning toward PUBLIC │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} │ │ │ ├── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} @@ -69,6 +66,9 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} │ │ ├── 1 element transitioning toward TRANSIENT_ABSENT │ │ │ └── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} + │ │ ├── 2 elements transitioning toward ABSENT + │ │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} │ │ └── 12 Mutation operations │ │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":104} │ │ ├── SetIndexName {"IndexID":1,"Name":"crdb_internal_in...","TableID":104} @@ -127,6 +127,14 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ └── ValidateUniqueIndex {"IndexID":5,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: idx, IndexID: 5} + │ ├── 4 elements transitioning toward TRANSIENT_ABSENT + │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ ├── 10 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 4} @@ -138,14 +146,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ └── VALIDATED → DELETE_ONLY SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: idx, IndexID: 5} - │ ├── 4 elements transitioning toward TRANSIENT_ABSENT - │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} │ └── 10 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":4,"TableID":104} @@ -158,6 +158,9 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} └── Stage 2 of 2 in PostCommitNonRevertiblePhase + ├── 2 elements transitioning toward TRANSIENT_ABSENT + │ ├── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} ├── 6 elements transitioning toward ABSENT │ ├── DELETE_ONLY → ABSENT Column:{DescID: 104, ColumnID: 2} │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} @@ -165,9 +168,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ └── DELETE_ONLY → ABSENT SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - ├── 2 elements transitioning toward TRANSIENT_ABSENT - │ ├── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} └── 13 Mutation operations ├── CreateGcJobForIndex {"IndexID":1,"TableID":104} ├── MakeIndexAbsent {"IndexID":1,"TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index index af2234fa4ee0..ea6ccb35eb5f 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index @@ -10,9 +10,6 @@ EXPLAIN (ddl) ALTER TABLE t.test DROP pi; Schema change plan for ALTER TABLE ‹t›.‹public›.‹test› DROP COLUMN ‹pi›; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 2 elements transitioning toward ABSENT - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 106, ColumnID: 3} - │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -23,6 +20,9 @@ Schema change plan for ALTER TABLE ‹t›.‹public›.‹test› DROP COLUMN │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} + │ ├── 2 elements transitioning toward ABSENT + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 106, ColumnID: 3} + │ │ └── PUBLIC → ABSENT ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ └── 11 Mutation operations │ ├── MakeDroppedColumnDeleteAndWriteOnly {"ColumnID":3,"TableID":106} │ ├── LogEvent {"TargetStatus":1} @@ -86,14 +86,6 @@ Schema change plan for ALTER TABLE ‹t›.‹public›.‹test› DROP COLUMN │ └── ValidateUniqueIndex {"IndexID":4,"TableID":106} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase - │ ├── 7 elements transitioning toward ABSENT - │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 106, ColumnID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 1} - │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106, Name: test_pkey, IndexID: 1} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 106, Name: test_pkey, IndexID: 4} @@ -102,6 +94,14 @@ Schema change plan for ALTER TABLE ‹t›.‹public›.‹test› DROP COLUMN │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} + │ ├── 7 elements transitioning toward ABSENT + │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 106, ColumnID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 1} + │ │ ├── PUBLIC → WRITE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106, Name: test_pkey, IndexID: 1} │ └── 8 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":3,"TableID":106} │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":106} @@ -112,10 +112,10 @@ Schema change plan for ALTER TABLE ‹t›.‹public›.‹test› DROP COLUMN │ ├── SetJobStateOnDescriptor {"DescriptorID":106} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase - │ ├── 1 element transitioning toward ABSENT - │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} │ ├── 1 element transitioning toward TRANSIENT_ABSENT │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 106, IndexID: 5, ConstraintID: 6, SourceIndexID: 1} + │ ├── 1 element transitioning toward ABSENT + │ │ └── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} │ └── 5 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":106} │ ├── CreateGcJobForIndex {"IndexID":5,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_1_of_7 index 5073ab3745c0..ffd822345aac 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_1_of_7 @@ -11,6 +11,9 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 7; Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP COLUMN ‹pi›; └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase + ├── 2 elements transitioning toward PUBLIC + │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} + │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} ├── 8 elements transitioning toward ABSENT │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -20,9 +23,6 @@ Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP C │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ └── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - ├── 2 elements transitioning toward PUBLIC - │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} - │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} └── 9 Mutation operations ├── SetColumnName {"ColumnID":3,"Name":"pi","TableID":106} ├── MakeColumnPublic {"ColumnID":3,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_2_of_7 index f100c22ccaf9..6d68357ece79 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_2_of_7 @@ -11,6 +11,9 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 7; Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP COLUMN ‹pi›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ ├── 8 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -20,9 +23,6 @@ Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP C │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ └── 8 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"pi","TableID":106} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":5,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_3_of_7 index c487400caa27..bd29f1941187 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_3_of_7 @@ -11,6 +11,9 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 7; Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP COLUMN ‹pi›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ ├── 8 elements transitioning toward ABSENT │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -20,9 +23,6 @@ Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP C │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ └── 8 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"pi","TableID":106} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":5,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_4_of_7 index 75174dec9c2f..01ea76466665 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_4_of_7 @@ -11,6 +11,9 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 7; Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP COLUMN ‹pi›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ ├── 8 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -20,9 +23,6 @@ Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP C │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ └── 8 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"pi","TableID":106} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":5,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_5_of_7 index 63581e07274e..d89e80f0db3b 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_5_of_7 @@ -11,6 +11,9 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 7; Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP COLUMN ‹pi›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ ├── 8 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -20,9 +23,6 @@ Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP C │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ └── 7 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"pi","TableID":106} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":5,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_6_of_7 index 3aaed05a4262..f59337f7cc66 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_6_of_7 @@ -11,6 +11,9 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 7; Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP COLUMN ‹pi›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ ├── 8 elements transitioning toward ABSENT │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -20,9 +23,6 @@ Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP C │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ └── 7 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"pi","TableID":106} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":5,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_7_of_7 index b7b4d3a04cb7..bdabbddc006e 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_unique_index.rollback_7_of_7 @@ -11,6 +11,9 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 7; Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP COLUMN ‹pi›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} + │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ ├── 8 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} @@ -20,9 +23,6 @@ Schema change plan for rolling back ALTER TABLE ‹t›.public.‹test› DROP C │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106, ColumnID: 3} - │ │ └── ABSENT → PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} │ └── 7 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"pi","TableID":106} │ ├── MakeDroppedIndexDeleteOnly {"IndexID":4,"TableID":106} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index index 2d2feca31f96..4511771cbf3c 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index @@ -7,17 +7,17 @@ EXPLAIN (ddl) ALTER TABLE t DROP COLUMN j; Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COLUMN ‹j›; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ ├── 2 elements transitioning toward PUBLIC │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ ├── 2 elements transitioning toward TRANSIENT_ABSENT │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ └── 9 Mutation operations │ ├── MakeDroppedNonPrimaryIndexDeleteAndWriteOnly {"IndexID":2,"TableID":104} │ ├── SetIndexName {"IndexID":2,"Name":"crdb_internal_in...","TableID":104} @@ -79,6 +79,12 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ └── ValidateUniqueIndex {"IndexID":3,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ ├── 2 elements transitioning toward TRANSIENT_ABSENT + │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 8 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} @@ -88,12 +94,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 2} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ └── VALIDATED → DELETE_ONLY SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ ├── 2 elements transitioning toward TRANSIENT_ABSENT - │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 9 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedPrimaryIndexDeleteAndWriteOnly {"IndexID":1,"TableID":104} @@ -105,11 +105,11 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase + │ ├── 1 element transitioning toward TRANSIENT_ABSENT + │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 2 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ │ └── DELETE_ONLY → ABSENT SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 1 element transitioning toward TRANSIENT_ABSENT - │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 8 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":104} │ ├── LogEvent {"TargetStatus":1} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_1_of_7 index 3aa981462041..c2576a55fc4a 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_1_of_7 @@ -8,16 +8,16 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase - ├── 4 elements transitioning toward ABSENT - │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} ├── 4 elements transitioning toward PUBLIC │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} + ├── 4 elements transitioning toward ABSENT + │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} └── 11 Mutation operations ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} ├── SetIndexName {"IndexID":2,"Name":"t_j_idx","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_2_of_7 index 7e58176c74de..c40861e107bf 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_2_of_7 @@ -8,16 +8,16 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetIndexName {"IndexID":2,"Name":"t_j_idx","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_3_of_7 index c913887eba9a..af14d4e1530e 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_3_of_7 @@ -8,16 +8,16 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetIndexName {"IndexID":2,"Name":"t_j_idx","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_4_of_7 index 5fb9f426ba75..fbc8f4e50d1f 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_4_of_7 @@ -8,16 +8,16 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 10 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetIndexName {"IndexID":2,"Name":"t_j_idx","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_5_of_7 index 9a34edeb342a..41b0d24c3bc6 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_5_of_7 @@ -8,16 +8,16 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetIndexName {"IndexID":2,"Name":"t_j_idx","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_6_of_7 index f9fef0bf8338..5f4ffa684b1c 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_6_of_7 @@ -8,16 +8,16 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetIndexName {"IndexID":2,"Name":"t_j_idx","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_7_of_7 index 1817b9bdffe3..b887580de4b1 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_column_with_index.rollback_7_of_7 @@ -8,16 +8,16 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j›; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ ├── 4 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ └── 9 Mutation operations │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} │ ├── SetIndexName {"IndexID":2,"Name":"t_j_idx","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_1_of_7 index fdcdae2e5819..323d81e19409 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_1_of_7 @@ -9,11 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 1 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹k› CASCADE; └── PostCommitNonRevertiblePhase └── Stage 1 of 1 in PostCommitNonRevertiblePhase - ├── 4 elements transitioning toward ABSENT - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ └── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} ├── 8 elements transitioning toward PUBLIC │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 3} │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: k, ColumnID: 3} @@ -23,6 +18,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + ├── 4 elements transitioning toward ABSENT + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ └── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} └── 17 Mutation operations ├── SetColumnName {"ColumnID":3,"Name":"k","TableID":104} ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_2_of_7 index b8d5dad53ea5..b1b40d712674 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_2_of_7 @@ -9,11 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 2 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹k› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 8 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 3} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: k, ColumnID: 3} @@ -23,6 +18,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 16 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"k","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_3_of_7 index 84d3aacf150f..eba3783b25d2 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_3_of_7 @@ -9,11 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 3 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹k› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 8 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 3} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: k, ColumnID: 3} @@ -23,6 +18,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 16 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"k","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_4_of_7 index be6d464361e7..013ea01434ad 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_4_of_7 @@ -9,11 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 4 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹k› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 8 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 3} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: k, ColumnID: 3} @@ -23,6 +18,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── DELETE_ONLY → ABSENT PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 16 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"k","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_5_of_7 index ca606b5d9cab..86b2eb04ee35 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_5_of_7 @@ -9,11 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 5 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹k› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 8 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 3} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: k, ColumnID: 3} @@ -23,6 +18,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 15 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"k","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_6_of_7 index f5d3db3f31ba..6703a40adf4f 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_6_of_7 @@ -9,11 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 6 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹k› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 8 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 3} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: k, ColumnID: 3} @@ -23,6 +18,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── MERGE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 15 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"k","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_7_of_7 index bd510aa98094..617c3e3b16d7 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.rollback_7_of_7 @@ -9,11 +9,6 @@ EXPLAIN (ddl) rollback at post-commit stage 7 of 7; Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹j› CASCADE; ALTER TABLE ‹defaultdb›.public.‹t› DROP COLUMN ‹k› CASCADE; └── PostCommitNonRevertiblePhase ├── Stage 1 of 2 in PostCommitNonRevertiblePhase - │ ├── 4 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 8 elements transitioning toward PUBLIC │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 104, ColumnID: 3} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: k, ColumnID: 3} @@ -23,6 +18,11 @@ Schema change plan for rolling back ALTER TABLE ‹defaultdb›.public.‹t› D │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ ├── 4 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 15 Mutation operations │ ├── SetColumnName {"ColumnID":3,"Name":"k","TableID":104} │ ├── SetColumnName {"ColumnID":2,"Name":"j","TableID":104} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_1_of_2 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_1_of_2 index 4ca6238a76a2..9b5eaa493681 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_1_of_2 @@ -7,13 +7,6 @@ EXPLAIN (ddl) ALTER TABLE t DROP COLUMN j CASCADE; Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COLUMN ‹j› CASCADE; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 6 elements transitioning toward ABSENT - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 4} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ├── 3 elements transitioning toward PUBLIC │ │ ├── ABSENT → BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} @@ -22,6 +15,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── ABSENT → DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} │ │ └── ABSENT → PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ ├── 6 elements transitioning toward ABSENT + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 104, ColumnID: 4} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ └── 14 Mutation operations │ ├── MakeDroppedColumnDeleteAndWriteOnly {"ColumnID":2,"TableID":104} │ ├── LogEvent {"TargetStatus":1} @@ -88,6 +88,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ └── ValidateUniqueIndex {"IndexID":3,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ ├── 3 elements transitioning toward TRANSIENT_ABSENT + │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} │ ├── 11 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 4} @@ -100,13 +107,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} │ │ └── VALIDATED → DELETE_ONLY SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ ├── 3 elements transitioning toward TRANSIENT_ABSENT - │ │ ├── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ └── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} │ └── 10 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":4,"TableID":104} @@ -119,13 +119,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase + │ ├── 1 element transitioning toward TRANSIENT_ABSENT + │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 4 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT Column:{DescID: 104, ColumnID: 4} │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ │ └── DELETE_ONLY → ABSENT SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 1 element transitioning toward TRANSIENT_ABSENT - │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 9 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":104} │ ├── LogEvent {"TargetStatus":1} diff --git a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_2_of_2 b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_2_of_2 index ac66bdc75b1b..b604773cc105 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain/drop_multiple_columns_separate_statements.statement_2_of_2 @@ -66,6 +66,12 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ └── ValidateUniqueIndex {"IndexID":3,"TableID":104} └── PostCommitNonRevertiblePhase ├── Stage 1 of 3 in PostCommitNonRevertiblePhase + │ ├── 2 elements transitioning toward PUBLIC + │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ ├── 2 elements transitioning toward TRANSIENT_ABSENT + │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ └── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 14 elements transitioning toward ABSENT │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 3} │ │ ├── WRITE_ONLY → DELETE_ONLY Column:{DescID: 104, ColumnID: 2} @@ -81,12 +87,6 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ │ ├── VALIDATED → DELETE_ONLY SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ ├── 2 elements transitioning toward PUBLIC - │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ └── ABSENT → PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ ├── 2 elements transitioning toward TRANSIENT_ABSENT - │ │ ├── PUBLIC → TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ └── WRITE_ONLY → TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 12 Mutation operations │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":3,"TableID":104} │ ├── MakeDroppedColumnDeleteOnly {"ColumnID":2,"TableID":104} @@ -101,13 +101,13 @@ Schema change plan for ALTER TABLE ‹defaultdb›.‹public›.‹t› DROP COL │ ├── SetJobStateOnDescriptor {"DescriptorID":104} │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} ├── Stage 2 of 3 in PostCommitNonRevertiblePhase + │ ├── 1 element transitioning toward TRANSIENT_ABSENT + │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ ├── 4 elements transitioning toward ABSENT │ │ ├── DELETE_ONLY → ABSENT Column:{DescID: 104, ColumnID: 4} │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} │ │ ├── WRITE_ONLY → DELETE_ONLY PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ │ └── DELETE_ONLY → ABSENT SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ ├── 1 element transitioning toward TRANSIENT_ABSENT - │ │ └── TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ └── 9 Mutation operations │ ├── MakeDroppedIndexDeleteOnly {"IndexID":1,"TableID":104} │ ├── LogEvent {"TargetStatus":1} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column b/pkg/sql/schemachanger/testdata/explain_verbose/add_column index 5223609af54d..6fd0514da4dc 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column @@ -347,26 +347,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 3 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ │ PUBLIC → WRITE_ONLY - │ │ │ - │ │ └── • IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ rule: "index no longer public before dependents" - │ │ │ ├── • 3 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 106, ColumnID: 2} @@ -429,6 +409,26 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ + │ ├── • 3 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ │ PUBLIC → WRITE_ONLY + │ │ │ + │ │ └── • IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ rule: "index no longer public before dependents" + │ │ │ └── • 9 Mutation operations │ │ │ ├── • MakeDroppedPrimaryIndexDeleteAndWriteOnly @@ -488,11 +488,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 1 element transitioning toward ABSENT - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 1 element transitioning toward TRANSIENT_ABSENT │ │ │ │ │ └── • TemporaryIndex:{DescID: 106, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} @@ -504,6 +499,11 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 3} │ │ rule: "dependents removed before index" │ │ + │ ├── • 1 element transitioning toward ABSENT + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 5 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq index 7f42f2e53628..af8573661385 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq @@ -372,26 +372,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 3 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ │ PUBLIC → WRITE_ONLY - │ │ │ - │ │ └── • IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ rule: "index no longer public before dependents" - │ │ │ ├── • 3 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 106, ColumnID: 2} @@ -454,6 +434,26 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ + │ ├── • 3 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ │ PUBLIC → WRITE_ONLY + │ │ │ + │ │ └── • IndexName:{DescID: 106, Name: tbl_pkey, IndexID: 1} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ rule: "index no longer public before dependents" + │ │ │ └── • 10 Mutation operations │ │ │ ├── • MakeDroppedPrimaryIndexDeleteAndWriteOnly @@ -516,11 +516,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 1 element transitioning toward ABSENT - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 1 element transitioning toward TRANSIENT_ABSENT │ │ │ │ │ └── • TemporaryIndex:{DescID: 106, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} @@ -532,6 +527,11 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 3} │ │ rule: "dependents removed before index" │ │ + │ ├── • 1 element transitioning toward ABSENT + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 6 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid index 840de9b9c9dd..5efc6fc6eee7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid @@ -10,17 +10,6 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 2 elements transitioning toward ABSENT -│ │ │ -│ │ ├── • Column:{DescID: 104, ColumnID: 2} -│ │ │ PUBLIC → WRITE_ONLY -│ │ │ -│ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} -│ │ │ PUBLIC → ABSENT -│ │ │ -│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} -│ │ rule: "column no longer public before dependents" -│ │ │ ├── • 2 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} @@ -64,6 +53,17 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ rule: "temp index existence precedes index dependents" │ │ +│ ├── • 2 elements transitioning toward ABSENT +│ │ │ +│ │ ├── • Column:{DescID: 104, ColumnID: 2} +│ │ │ PUBLIC → WRITE_ONLY +│ │ │ +│ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} +│ │ │ PUBLIC → ABSENT +│ │ │ +│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} +│ │ rule: "column no longer public before dependents" +│ │ │ └── • 11 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteAndWriteOnly @@ -307,17 +307,6 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ ├── • Stage 8 of 15 in PostCommitPhase │ │ │ -│ │ ├── • 2 elements transitioning toward ABSENT -│ │ │ │ -│ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED -│ │ │ │ -│ │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} -│ │ │ │ PUBLIC → ABSENT -│ │ │ │ -│ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} -│ │ │ rule: "index no longer public before dependents" -│ │ │ │ │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT │ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -354,6 +343,17 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ │ rule: "temp index existence precedes index dependents" │ │ │ +│ │ ├── • 2 elements transitioning toward ABSENT +│ │ │ │ +│ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} +│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ +│ │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} +│ │ │ rule: "index no longer public before dependents" +│ │ │ │ │ └── • 8 Mutation operations │ │ │ │ │ ├── • MakeDroppedPrimaryIndexDeleteAndWriteOnly @@ -536,35 +536,6 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ ├── • Stage 1 of 4 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column no longer public before dependents" - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ VALIDATED → DELETE_ONLY - │ │ │ ├── • 5 elements transitioning toward TRANSIENT_ABSENT │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} @@ -594,6 +565,35 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column no longer public before dependents" + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ VALIDATED → DELETE_ONLY + │ │ │ └── • 6 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -623,20 +623,6 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ ├── • Stage 2 of 4 in PostCommitNonRevertiblePhase │ │ - │ ├── • 1 element transitioning toward ABSENT - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ DELETE_ONLY → ABSENT - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ rule: "dependents removed before index" - │ │ │ ├── • 2 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} @@ -708,6 +694,20 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} │ │ rule: "dependents removed before index" │ │ + │ ├── • 1 element transitioning toward ABSENT + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ DELETE_ONLY → ABSENT + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ rule: "dependents removed before index" + │ │ │ └── • 12 Mutation operations │ │ │ ├── • CreateGcJobForIndex @@ -800,6 +800,20 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ RunningStatus: PostCommitNonRevertiblePhase stage 4 of 4 with 4 MutationType ops pending │ └── • Stage 4 of 4 in PostCommitNonRevertiblePhase + │ + ├── • 1 element transitioning toward TRANSIENT_ABSENT + │ │ + │ └── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ + │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} + │ │ rule: "dependents removed before index" + │ │ + │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} + │ │ rule: "dependents removed before index" + │ │ + │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 2} + │ rule: "dependents removed before index" │ ├── • 3 elements transitioning toward ABSENT │ │ @@ -846,20 +860,6 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} │ rule: "column no longer public before dependents" │ - ├── • 1 element transitioning toward TRANSIENT_ABSENT - │ │ - │ └── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ - │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} - │ │ rule: "dependents removed before index" - │ │ - │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} - │ │ rule: "dependents removed before index" - │ │ - │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 2} - │ rule: "dependents removed before index" - │ └── • 6 Mutation operations │ ├── • CreateGcJobForIndex diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 index 0dee763526b4..70d3efd7ab0c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_10_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -79,45 +118,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 index 911306702681..b94dfda93991 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_11_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -79,45 +118,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 index fd014c62622d..9ae70b4b805d 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_12_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -79,45 +118,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 index 423199c3c70a..1faec8dbe273 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_13_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -73,45 +112,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 index 4e9bac68e208..f7bd63391384 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_14_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -73,45 +112,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 index 4977e27698a1..bf6d40168120 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_15_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -73,45 +112,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 index 4acd3e789d86..8743e1a38665 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_1_of_15 @@ -10,6 +10,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase + │ + ├── • 2 elements transitioning toward PUBLIC + │ │ + │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ WRITE_ONLY → PUBLIC + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ rule: "column dependents exist before column becomes public" + │ │ + │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ ABSENT → PUBLIC │ ├── • 8 elements transitioning toward ABSENT │ │ @@ -73,26 +93,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ └── • skip PUBLIC → ABSENT operations │ rule: "skip index-column removal ops on index removal" │ - ├── • 2 elements transitioning toward PUBLIC - │ │ - │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ WRITE_ONLY → PUBLIC - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ rule: "column dependents exist before column becomes public" - │ │ - │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ ABSENT → PUBLIC - │ └── • 11 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 index 546771b269f3..8b03f3f772b9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_2_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -67,26 +87,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 index 4c4c94c62677..318373d1697a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_3_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -67,26 +87,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 index e3e559d8ee7b..402225ead8eb 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_4_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -67,26 +87,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 index f263220642b2..02a0588a6cc5 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_5_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 index 8bdecf543ac8..b45a32931c8d 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_6_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 index 993ea0a50de3..4c4ecd558e2c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_7_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 index 2530e6c25df8..3114ba6ea984 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_8_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 index 1f7afde05cca..c0f5328ffc7e 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_primary_key_drop_rowid.rollback_9_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -82,45 +121,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 14 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid index e0be656adee5..b263d11a028e 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid @@ -10,17 +10,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 2 elements transitioning toward ABSENT -│ │ │ -│ │ ├── • Column:{DescID: 104, ColumnID: 2} -│ │ │ PUBLIC → WRITE_ONLY -│ │ │ -│ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} -│ │ │ PUBLIC → ABSENT -│ │ │ -│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} -│ │ rule: "column no longer public before dependents" -│ │ │ ├── • 2 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} @@ -64,6 +53,17 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ rule: "temp index existence precedes index dependents" │ │ +│ ├── • 2 elements transitioning toward ABSENT +│ │ │ +│ │ ├── • Column:{DescID: 104, ColumnID: 2} +│ │ │ PUBLIC → WRITE_ONLY +│ │ │ +│ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} +│ │ │ PUBLIC → ABSENT +│ │ │ +│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} +│ │ rule: "column no longer public before dependents" +│ │ │ └── • 11 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteAndWriteOnly @@ -309,17 +309,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ ├── • Stage 8 of 15 in PostCommitPhase │ │ │ -│ │ ├── • 2 elements transitioning toward ABSENT -│ │ │ │ -│ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED -│ │ │ │ -│ │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} -│ │ │ │ PUBLIC → ABSENT -│ │ │ │ -│ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} -│ │ │ rule: "index no longer public before dependents" -│ │ │ │ │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT │ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -356,6 +345,17 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2} │ │ │ rule: "temp index existence precedes index dependents" │ │ │ +│ │ ├── • 2 elements transitioning toward ABSENT +│ │ │ │ +│ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} +│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ +│ │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} +│ │ │ rule: "index no longer public before dependents" +│ │ │ │ │ └── • 8 Mutation operations │ │ │ │ │ ├── • MakeDroppedPrimaryIndexDeleteAndWriteOnly @@ -539,35 +539,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ ├── • Stage 1 of 4 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column no longer public before dependents" - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ VALIDATED → DELETE_ONLY - │ │ │ ├── • 5 elements transitioning toward TRANSIENT_ABSENT │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} @@ -597,6 +568,35 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column no longer public before dependents" + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ VALIDATED → DELETE_ONLY + │ │ │ └── • 6 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -626,20 +626,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ ├── • Stage 2 of 4 in PostCommitNonRevertiblePhase │ │ - │ ├── • 1 element transitioning toward ABSENT - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ DELETE_ONLY → ABSENT - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ rule: "dependents removed before index" - │ │ │ ├── • 2 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2} @@ -711,6 +697,20 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} │ │ rule: "dependents removed before index" │ │ + │ ├── • 1 element transitioning toward ABSENT + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ DELETE_ONLY → ABSENT + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ rule: "dependents removed before index" + │ │ │ └── • 12 Mutation operations │ │ │ ├── • CreateGcJobForIndex @@ -805,6 +805,20 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ RunningStatus: PostCommitNonRevertiblePhase stage 4 of 4 with 4 MutationType ops pending │ └── • Stage 4 of 4 in PostCommitNonRevertiblePhase + │ + ├── • 1 element transitioning toward TRANSIENT_ABSENT + │ │ + │ └── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ + │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} + │ │ rule: "dependents removed before index" + │ │ + │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} + │ │ rule: "dependents removed before index" + │ │ + │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 2} + │ rule: "dependents removed before index" │ ├── • 3 elements transitioning toward ABSENT │ │ @@ -851,20 +865,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} │ rule: "column no longer public before dependents" │ - ├── • 1 element transitioning toward TRANSIENT_ABSENT - │ │ - │ └── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ - │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} - │ │ rule: "dependents removed before index" - │ │ - │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} - │ │ rule: "dependents removed before index" - │ │ - │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 2} - │ rule: "dependents removed before index" - │ └── • 6 Mutation operations │ ├── • CreateGcJobForIndex diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 index 360c5d4fcd74..5cfe89f5a628 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_10_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -79,45 +118,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 index 740a6e476ad8..ad1d2e1b4d96 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_11_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -79,45 +118,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 index a9d13a2aae08..60787b6e6048 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_12_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -79,45 +118,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 index 1174f0c55601..6cfdad474ba9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_13_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -73,45 +112,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 index 6ad47dc922c2..760e1b3d1471 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_14_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -73,45 +112,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 index 2c3ea2373d7f..6a167bf95feb 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_15_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -73,45 +112,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 index 62081fa425ee..d51a1e040625 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_1_of_15 @@ -10,6 +10,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase + │ + ├── • 2 elements transitioning toward PUBLIC + │ │ + │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ WRITE_ONLY → PUBLIC + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ rule: "column dependents exist before column becomes public" + │ │ + │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ ABSENT → PUBLIC │ ├── • 8 elements transitioning toward ABSENT │ │ @@ -73,26 +93,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ └── • skip PUBLIC → ABSENT operations │ rule: "skip index-column removal ops on index removal" │ - ├── • 2 elements transitioning toward PUBLIC - │ │ - │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ WRITE_ONLY → PUBLIC - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ rule: "column dependents exist before column becomes public" - │ │ - │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ ABSENT → PUBLIC - │ └── • 11 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 index 8471f6587f94..aa23a022eeef 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_2_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -67,26 +87,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 index 39a7044cb506..f3cfddf39da9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_3_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -67,26 +87,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 index 0e46b751f917..c436ca65271b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_4_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -67,26 +87,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 index 6896fa8c2d3e..b1767530c446 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_5_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 index 012f3fbf38b2..f15875995c99 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_6_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 index 1e22b6cb7f2a..63b584cc6eb1 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_7_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 index fc568b938c90..2523c05e2d9d 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_8_of_15 @@ -11,6 +11,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 index ae01b435b079..befa3a831016 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_drop_rowid.rollback_9_of_15 @@ -11,6 +11,45 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 4 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -82,45 +121,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 4 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: rowid, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ ABSENT → PUBLIC - │ │ │ └── • 14 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla index c98e00852d1f..821d19903f2f 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla @@ -381,35 +381,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ PUBLIC → WRITE_ONLY - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ rule: "index no longer public before dependents" - │ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -473,6 +444,35 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 1} │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ PUBLIC → WRITE_ONLY + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ rule: "index no longer public before dependents" + │ │ │ └── • 10 Mutation operations │ │ │ ├── • MakeDroppedPrimaryIndexDeleteAndWriteOnly @@ -529,11 +529,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 1 element transitioning toward ABSENT - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} @@ -548,6 +543,11 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 1} │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ + │ ├── • 1 element transitioning toward ABSENT + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 7 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic index 373e54cb12ef..700b8e466494 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic @@ -10,17 +10,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 2 elements transitioning toward ABSENT -│ │ │ -│ │ ├── • Column:{DescID: 104, ColumnID: 2} -│ │ │ PUBLIC → WRITE_ONLY -│ │ │ -│ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} -│ │ │ PUBLIC → ABSENT -│ │ │ -│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} -│ │ rule: "column no longer public before dependents" -│ │ │ ├── • 2 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -43,6 +32,17 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} │ │ rule: "temp index existence precedes index dependents" │ │ +│ ├── • 2 elements transitioning toward ABSENT +│ │ │ +│ │ ├── • Column:{DescID: 104, ColumnID: 2} +│ │ │ PUBLIC → WRITE_ONLY +│ │ │ +│ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} +│ │ │ PUBLIC → ABSENT +│ │ │ +│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} +│ │ rule: "column no longer public before dependents" +│ │ │ └── • 7 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteAndWriteOnly @@ -255,6 +255,38 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "primary index swap" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ + │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ ├── • 5 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -290,38 +322,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} │ │ rule: "index no longer public before dependents" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "primary index swap" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ - │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ └── • 8 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -368,11 +368,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 1 element transitioning toward ABSENT - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 1 element transitioning toward TRANSIENT_ABSENT │ │ │ │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1} @@ -381,6 +376,11 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} │ │ rule: "dependents removed before index" │ │ + │ ├── • 1 element transitioning toward ABSENT + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 5 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_1_of_7 index 245daf91aed5..53c03b826ac2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_1_of_7 @@ -10,6 +10,23 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase + │ + ├── • 2 elements transitioning toward PUBLIC + │ │ + │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ WRITE_ONLY → PUBLIC + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ rule: "column dependents exist before column becomes public" + │ │ + │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ ABSENT → PUBLIC │ ├── • 4 elements transitioning toward ABSENT │ │ @@ -40,23 +57,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ └── • skip PUBLIC → ABSENT operations │ rule: "skip index-column removal ops on index removal" │ - ├── • 2 elements transitioning toward PUBLIC - │ │ - │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ WRITE_ONLY → PUBLIC - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ rule: "column dependents exist before column becomes public" - │ │ - │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ ABSENT → PUBLIC - │ └── • 9 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_2_of_7 index aa29a0e6d909..d1eaa2e6a8ec 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_2_of_7 @@ -11,6 +11,23 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -37,23 +54,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 8 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_3_of_7 index 5e9f38bdcc55..872386c6bff4 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_3_of_7 @@ -11,6 +11,23 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -37,23 +54,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 8 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_4_of_7 index 9181618deb1b..877404d74cab 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_4_of_7 @@ -11,6 +11,23 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -37,23 +54,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 8 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_5_of_7 index c0c32aa8f125..8b77cfc8abd8 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_5_of_7 @@ -11,6 +11,23 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -31,23 +48,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 7 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_6_of_7 index c0998e2e2a28..16f125654282 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_6_of_7 @@ -11,6 +11,23 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -31,23 +48,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 7 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_7_of_7 index 051c4fb737e7..376a03a0a5d7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic.rollback_7_of_7 @@ -11,6 +11,23 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1} @@ -31,23 +48,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 7 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index index 997dc3ebe4d4..35c731e28db8 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index @@ -10,6 +10,28 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ +│ ├── • 2 elements transitioning toward PUBLIC +│ │ │ +│ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} +│ │ │ ABSENT → BACKFILL_ONLY +│ │ │ +│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} +│ │ │ ABSENT → PUBLIC +│ │ │ +│ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} +│ │ rule: "index existence precedes index dependents" +│ │ +│ ├── • 2 elements transitioning toward TRANSIENT_ABSENT +│ │ │ +│ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} +│ │ │ ABSENT → DELETE_ONLY +│ │ │ +│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} +│ │ │ ABSENT → PUBLIC +│ │ │ +│ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} +│ │ rule: "temp index existence precedes index dependents" +│ │ │ ├── • 6 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -42,28 +64,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ rule: "index no longer public before dependents" │ │ -│ ├── • 2 elements transitioning toward PUBLIC -│ │ │ -│ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} -│ │ │ ABSENT → BACKFILL_ONLY -│ │ │ -│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} -│ │ │ ABSENT → PUBLIC -│ │ │ -│ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} -│ │ rule: "index existence precedes index dependents" -│ │ -│ ├── • 2 elements transitioning toward TRANSIENT_ABSENT -│ │ │ -│ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} -│ │ │ ABSENT → DELETE_ONLY -│ │ │ -│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} -│ │ │ ABSENT → PUBLIC -│ │ │ -│ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} -│ │ rule: "temp index existence precedes index dependents" -│ │ │ └── • 12 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteAndWriteOnly @@ -311,6 +311,38 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "primary index swap" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ + │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ ├── • 9 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -373,38 +405,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ VALIDATED → DELETE_ONLY │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "primary index swap" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ - │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ └── • 10 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -459,6 +459,14 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 1 element transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ │ + │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -498,14 +506,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ │ rule: "dependents removed before index" │ │ - │ ├── • 1 element transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ │ - │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ │ └── • 9 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_1_of_7 index bde234b00922..ecc312a9f615 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_1_of_7 @@ -10,35 +10,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase - │ - ├── • 4 elements transitioning toward ABSENT - │ │ - │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ rule: "dependents removed before index" - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ DELETE_ONLY → ABSENT - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ - │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ PUBLIC → ABSENT - │ │ - │ └── • skip PUBLIC → ABSENT operations - │ rule: "skip index-column removal ops on index removal" │ ├── • 6 elements transitioning toward PUBLIC │ │ @@ -91,6 +62,35 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ └── • IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ ABSENT → PUBLIC │ + ├── • 4 elements transitioning toward ABSENT + │ │ + │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ rule: "dependents removed before index" + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ DELETE_ONLY → ABSENT + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ + │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ PUBLIC → ABSENT + │ │ + │ └── • skip PUBLIC → ABSENT operations + │ rule: "skip index-column removal ops on index removal" + │ └── • 14 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_2_of_7 index 4c0bf9dbbce7..6a95fd897cc1 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_2_of_7 @@ -11,32 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -88,6 +62,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_3_of_7 index ff0b9d0fad27..83b3b5aa26a2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_3_of_7 @@ -11,32 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -88,6 +62,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_4_of_7 index aaebf618a796..ca95ff2ce34e 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_4_of_7 @@ -11,32 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ DELETE_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -88,6 +62,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ DELETE_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_5_of_7 index f8dbece8de40..354a2465c819 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_5_of_7 @@ -11,26 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -82,6 +62,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_6_of_7 index 93c0e45a0a2d..0b44f8d865f8 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_6_of_7 @@ -11,26 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -82,6 +62,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_7_of_7 index abc74e749ce7..8ac4a5aa514c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index.rollback_7_of_7 @@ -11,26 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -82,6 +62,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_10_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_10_of_15 index f05213ca9cc3..2bf366388dd8 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_10_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_10_of_15 @@ -12,6 +12,82 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 8 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 4} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "ensure columns are in increasing order" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ rule: "index named right before index becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 13 elements transitioning toward ABSENT │ │ │ │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} @@ -95,82 +171,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 8 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 4} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "ensure columns are in increasing order" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ rule: "index named right before index becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 19 Mutation operations │ │ │ ├── • SetIndexName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_11_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_11_of_15 index d8bf9dc7912e..4704b7a78459 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_11_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_11_of_15 @@ -12,6 +12,82 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 8 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 4} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "ensure columns are in increasing order" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ rule: "index named right before index becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 13 elements transitioning toward ABSENT │ │ │ │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} @@ -95,82 +171,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 8 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 4} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "ensure columns are in increasing order" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ rule: "index named right before index becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 19 Mutation operations │ │ │ ├── • SetIndexName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_12_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_12_of_15 index 5aefa606e47b..596d1e07a5d3 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_12_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_12_of_15 @@ -12,6 +12,82 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 8 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 4} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "ensure columns are in increasing order" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ rule: "index named right before index becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 13 elements transitioning toward ABSENT │ │ │ │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} @@ -95,82 +171,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 8 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 4} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "ensure columns are in increasing order" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ rule: "index named right before index becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 19 Mutation operations │ │ │ ├── • SetIndexName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_13_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_13_of_15 index 5cd1f482e48f..3b1418718bc2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_13_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_13_of_15 @@ -12,80 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 13 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ PUBLIC → WRITE_ONLY - │ │ │ - │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ rule: "index no longer public before dependents" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -162,6 +88,80 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 13 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ PUBLIC → WRITE_ONLY + │ │ │ + │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ rule: "index no longer public before dependents" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 17 Mutation operations │ │ │ ├── • SetIndexName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_14_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_14_of_15 index 07fcbfe44afe..a69bdaacd53a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_14_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_14_of_15 @@ -12,80 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 13 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ PUBLIC → WRITE_ONLY - │ │ │ - │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ rule: "index no longer public before dependents" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -162,6 +88,80 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 13 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ PUBLIC → WRITE_ONLY + │ │ │ + │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ rule: "index no longer public before dependents" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 17 Mutation operations │ │ │ ├── • SetIndexName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_15_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_15_of_15 index 31fd31cda1e1..69cce34e2ea7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_15_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_15_of_15 @@ -12,80 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 13 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ rule: "index no longer public before dependents" - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ PUBLIC → WRITE_ONLY - │ │ │ - │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ rule: "index no longer public before dependents" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -162,6 +88,80 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 13 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ rule: "index no longer public before dependents" + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ PUBLIC → WRITE_ONLY + │ │ │ + │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ rule: "index no longer public before dependents" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 6} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 6} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 17 Mutation operations │ │ │ ├── • SetIndexName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_1_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_1_of_15 index 00caae4639f3..4718c0215723 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_1_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_1_of_15 @@ -11,53 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase - │ - ├── • 6 elements transitioning toward ABSENT - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ rule: "dependents removed before index" - │ │ - │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ DELETE_ONLY → ABSENT - │ │ - │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ - │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ rule: "dependents removed before index" │ ├── • 6 elements transitioning toward PUBLIC │ │ @@ -113,6 +66,53 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ABSENT → PUBLIC │ + ├── • 6 elements transitioning toward ABSENT + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ rule: "dependents removed before index" + │ │ + │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ DELETE_ONLY → ABSENT + │ │ + │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ + │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ rule: "dependents removed before index" + │ └── • 14 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_2_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_2_of_15 index 9341293d4412..574bff0d5326 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_2_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_2_of_15 @@ -12,47 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 6 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -107,6 +66,47 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 6 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_3_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_3_of_15 index 16274a9e8a14..32b37c2c8908 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_3_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_3_of_15 @@ -12,47 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 6 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -107,6 +66,47 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 6 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_4_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_4_of_15 index 9d1dddf77714..0b7e271f6a84 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_4_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_4_of_15 @@ -12,47 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 6 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ DELETE_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -107,6 +66,47 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 6 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ DELETE_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 13 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_5_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_5_of_15 index 0b9deb3eef5e..9cc38bdf8e41 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_5_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_5_of_15 @@ -12,38 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 6 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -98,6 +66,38 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 6 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_6_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_6_of_15 index 298708bb6371..345ac0651925 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_6_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_6_of_15 @@ -12,38 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 6 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -98,6 +66,38 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 6 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_7_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_7_of_15 index a2c1c6d9192c..22abb30c48d0 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_7_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_7_of_15 @@ -12,38 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 6 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -98,6 +66,38 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 6 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_8_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_8_of_15 index 81a068e0f6be..8a2b76adbf42 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_8_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_8_of_15 @@ -12,38 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 6 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 6 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -98,6 +66,38 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 6 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 12 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_9_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_9_of_15 index 8116a9c38a85..0835f894c952 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_9_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.rollback_9_of_15 @@ -12,6 +12,82 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 8 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 2} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Column:{DescID: 104, ColumnID: 4} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} + │ │ │ │ rule: "ensure columns are in increasing order" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ rule: "primary index swap" + │ │ │ + │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ rule: "index named right before index becomes public" + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 13 elements transitioning toward ABSENT │ │ │ │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} @@ -101,82 +177,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 8 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 2} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Column:{DescID: 104, ColumnID: 4} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104, ColumnID: 2} - │ │ │ │ rule: "ensure columns are in increasing order" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 4} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 2, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ rule: "primary index swap" - │ │ │ - │ │ ├── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 4, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ rule: "index named right before index becomes public" - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} - │ │ ABSENT → PUBLIC - │ │ │ └── • 20 Mutation operations │ │ │ ├── • SetIndexName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_1_of_2 index f35c6c887d52..2b666c0c5ffa 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_1_of_2 @@ -10,38 +10,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 6 elements transitioning toward ABSENT -│ │ │ -│ │ ├── • Column:{DescID: 104, ColumnID: 2} -│ │ │ PUBLIC → WRITE_ONLY -│ │ │ -│ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} -│ │ │ │ PUBLIC → ABSENT -│ │ │ │ -│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} -│ │ │ rule: "column no longer public before dependents" -│ │ │ -│ │ ├── • Column:{DescID: 104, ColumnID: 4} -│ │ │ │ PUBLIC → WRITE_ONLY -│ │ │ │ -│ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} -│ │ │ rule: "secondary indexes containing column as key reach write-only before column" -│ │ │ -│ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} -│ │ │ │ PUBLIC → ABSENT -│ │ │ │ -│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 4} -│ │ │ rule: "column no longer public before dependents" -│ │ │ -│ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} -│ │ │ PUBLIC → VALIDATED -│ │ │ -│ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} -│ │ │ PUBLIC → ABSENT -│ │ │ -│ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} -│ │ rule: "index no longer public before dependents" -│ │ │ ├── • 3 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} @@ -76,6 +44,38 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ │ rule: "temp index existence precedes index dependents" │ │ +│ ├── • 6 elements transitioning toward ABSENT +│ │ │ +│ │ ├── • Column:{DescID: 104, ColumnID: 2} +│ │ │ PUBLIC → WRITE_ONLY +│ │ │ +│ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} +│ │ │ rule: "column no longer public before dependents" +│ │ │ +│ │ ├── • Column:{DescID: 104, ColumnID: 4} +│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ +│ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} +│ │ │ rule: "secondary indexes containing column as key reach write-only before column" +│ │ │ +│ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 4} +│ │ │ rule: "column no longer public before dependents" +│ │ │ +│ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} +│ │ │ PUBLIC → VALIDATED +│ │ │ +│ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} +│ │ │ PUBLIC → ABSENT +│ │ │ +│ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} +│ │ rule: "index no longer public before dependents" +│ │ │ └── • 14 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteAndWriteOnly @@ -341,6 +341,47 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "primary index swap" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 3 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ + │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -421,47 +462,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ VALIDATED → DELETE_ONLY │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "primary index swap" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 3 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ - │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ └── • 10 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -516,6 +516,17 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 1 element transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ │ + │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 4} @@ -558,17 +569,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ rule: "dependents removed before index" │ │ - │ ├── • 1 element transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ │ - │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ │ └── • 9 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_2_of_2 index 89f18b0e9cf9..6ba3d0e67732 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_create_index_separate_statements.statement_2_of_2 @@ -172,17 +172,6 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ ├── • Stage 8 of 15 in PostCommitPhase │ │ │ -│ │ ├── • 2 elements transitioning toward ABSENT -│ │ │ │ -│ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED -│ │ │ │ -│ │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} -│ │ │ │ PUBLIC → ABSENT -│ │ │ │ -│ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} -│ │ │ rule: "index no longer public before dependents" -│ │ │ │ │ ├── • 7 elements transitioning toward PUBLIC │ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} @@ -245,6 +234,17 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • Precedence dependency from PUBLIC PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} │ │ │ rule: "primary index with new columns should exist before temp indexes" │ │ │ +│ │ ├── • 2 elements transitioning toward ABSENT +│ │ │ │ +│ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} +│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ +│ │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 1} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} +│ │ │ rule: "index no longer public before dependents" +│ │ │ │ │ └── • 12 Mutation operations │ │ │ │ │ ├── • MakeDroppedPrimaryIndexDeleteAndWriteOnly @@ -455,6 +455,47 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: idx, IndexID: 5} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ rule: "index named right before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: idx, IndexID: 5} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} + │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ ├── • 10 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -529,47 +570,6 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ └── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ VALIDATED → DELETE_ONLY │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 5} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: idx, IndexID: 5} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ rule: "index named right before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: idx, IndexID: 5} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} - │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ └── • 10 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -615,6 +615,20 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ pending │ └── • Stage 2 of 2 in PostCommitNonRevertiblePhase + │ + ├── • 2 elements transitioning toward TRANSIENT_ABSENT + │ │ + │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ │ + │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ + │ └── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} + │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ ├── • 6 elements transitioning toward ABSENT │ │ @@ -692,20 +706,6 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ rule: "dependents removed before index" │ - ├── • 2 elements transitioning toward TRANSIENT_ABSENT - │ │ - │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ │ - │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ - │ └── • TemporaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 4, SourceIndexID: 3} - │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ └── • 13 Mutation operations │ ├── • CreateGcJobForIndex diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index index 5d0819b20b2b..8cc693129b2a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index @@ -13,17 +13,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 2 elements transitioning toward ABSENT -│ │ │ -│ │ ├── • Column:{DescID: 106, ColumnID: 3} -│ │ │ PUBLIC → WRITE_ONLY -│ │ │ -│ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} -│ │ │ PUBLIC → ABSENT -│ │ │ -│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106, ColumnID: 3} -│ │ rule: "column no longer public before dependents" -│ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} @@ -70,6 +59,17 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106, IndexID: 5, ConstraintID: 6, SourceIndexID: 1} │ │ rule: "temp index existence precedes index dependents" │ │ +│ ├── • 2 elements transitioning toward ABSENT +│ │ │ +│ │ ├── • Column:{DescID: 106, ColumnID: 3} +│ │ │ PUBLIC → WRITE_ONLY +│ │ │ +│ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} +│ │ │ PUBLIC → ABSENT +│ │ │ +│ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106, ColumnID: 3} +│ │ rule: "column no longer public before dependents" +│ │ │ └── • 11 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteAndWriteOnly @@ -320,6 +320,56 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "primary index swap" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106, Name: test_pkey, IndexID: 4} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 4} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 4} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 106, Name: test_pkey, IndexID: 4} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 106, IndexID: 5, ConstraintID: 6, SourceIndexID: 1} + │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} + │ │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} + │ │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} + │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ + │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ ├── • 7 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 106, ColumnID: 3} @@ -373,56 +423,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} │ │ rule: "index no longer public before dependents" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "primary index swap" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106, Name: test_pkey, IndexID: 4} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 4} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 4} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 4} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 106, Name: test_pkey, IndexID: 4} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 106, IndexID: 5, ConstraintID: 6, SourceIndexID: 1} - │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 5} - │ │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 5} - │ │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} - │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ - │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ └── • 8 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -469,11 +469,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ - │ ├── • 1 element transitioning toward ABSENT - │ │ │ - │ │ └── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 1 element transitioning toward TRANSIENT_ABSENT │ │ │ │ │ └── • TemporaryIndex:{DescID: 106, IndexID: 5, ConstraintID: 6, SourceIndexID: 1} @@ -488,6 +483,11 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106, ColumnID: 4, IndexID: 5} │ │ rule: "dependents removed before index" │ │ + │ ├── • 1 element transitioning toward ABSENT + │ │ │ + │ │ └── • PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 5 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_1_of_7 index 004496d3175e..d772a10165ed 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_1_of_7 @@ -13,6 +13,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase + │ + ├── • 2 elements transitioning toward PUBLIC + │ │ + │ ├── • Column:{DescID: 106, ColumnID: 3} + │ │ │ WRITE_ONLY → PUBLIC + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ rule: "column dependents exist before column becomes public" + │ │ + │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ ABSENT → PUBLIC │ ├── • 8 elements transitioning toward ABSENT │ │ @@ -79,26 +99,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ └── • skip PUBLIC → ABSENT operations │ rule: "skip index-column removal ops on index removal" │ - ├── • 2 elements transitioning toward PUBLIC - │ │ - │ ├── • Column:{DescID: 106, ColumnID: 3} - │ │ │ WRITE_ONLY → PUBLIC - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ rule: "column dependents exist before column becomes public" - │ │ - │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ ABSENT → PUBLIC - │ └── • 9 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_2_of_7 index 5f3f9104f38d..853124d947e3 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_2_of_7 @@ -14,6 +14,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 106, ColumnID: 3} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} @@ -70,26 +90,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 106, ColumnID: 3} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ ABSENT → PUBLIC - │ │ │ └── • 8 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_3_of_7 index e0606d4c2adc..ddca208de1ed 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_3_of_7 @@ -14,6 +14,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 106, ColumnID: 3} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} @@ -70,26 +90,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 106, ColumnID: 3} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ ABSENT → PUBLIC - │ │ │ └── • 8 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_4_of_7 index fe1c100821c1..3fbb9ff1946b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_4_of_7 @@ -14,6 +14,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 106, ColumnID: 3} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} @@ -70,26 +90,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 106, ColumnID: 3} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ ABSENT → PUBLIC - │ │ │ └── • 8 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_5_of_7 index aff17316dc89..5f14c41d52a4 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_5_of_7 @@ -14,6 +14,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 106, ColumnID: 3} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 106, ColumnID: 3} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ ABSENT → PUBLIC - │ │ │ └── • 7 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_6_of_7 index 5f4247e79190..c28e13ac0914 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_6_of_7 @@ -14,6 +14,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 106, ColumnID: 3} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 106, ColumnID: 3} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ ABSENT → PUBLIC - │ │ │ └── • 7 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_7_of_7 index 0dc89d7e443f..54d780f503ce 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index.rollback_7_of_7 @@ -14,6 +14,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • Column:{DescID: 106, ColumnID: 3} + │ │ │ │ WRITE_ONLY → PUBLIC + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} + │ │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} + │ │ │ rule: "column dependents exist before column becomes public" + │ │ │ + │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} + │ │ ABSENT → PUBLIC + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106, IndexID: 4, ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1} @@ -58,26 +78,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • Column:{DescID: 106, ColumnID: 3} - │ │ │ │ WRITE_ONLY → PUBLIC - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106, ColumnID: 3} - │ │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1} - │ │ │ rule: "column dependents exist before column becomes public" - │ │ │ - │ │ └── • ColumnName:{DescID: 106, Name: pi, ColumnID: 3} - │ │ ABSENT → PUBLIC - │ │ │ └── • 7 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index index b41427f836b1..04f7ba90824b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index @@ -10,6 +10,28 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ +│ ├── • 2 elements transitioning toward PUBLIC +│ │ │ +│ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} +│ │ │ ABSENT → BACKFILL_ONLY +│ │ │ +│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} +│ │ │ ABSENT → PUBLIC +│ │ │ +│ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} +│ │ rule: "index existence precedes index dependents" +│ │ +│ ├── • 2 elements transitioning toward TRANSIENT_ABSENT +│ │ │ +│ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} +│ │ │ ABSENT → DELETE_ONLY +│ │ │ +│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} +│ │ │ ABSENT → PUBLIC +│ │ │ +│ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} +│ │ rule: "temp index existence precedes index dependents" +│ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -33,28 +55,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ rule: "index no longer public before dependents" │ │ -│ ├── • 2 elements transitioning toward PUBLIC -│ │ │ -│ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} -│ │ │ ABSENT → BACKFILL_ONLY -│ │ │ -│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} -│ │ │ ABSENT → PUBLIC -│ │ │ -│ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} -│ │ rule: "index existence precedes index dependents" -│ │ -│ ├── • 2 elements transitioning toward TRANSIENT_ABSENT -│ │ │ -│ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} -│ │ │ ABSENT → DELETE_ONLY -│ │ │ -│ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} -│ │ │ ABSENT → PUBLIC -│ │ │ -│ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} -│ │ rule: "temp index existence precedes index dependents" -│ │ │ └── • 9 Mutation operations │ │ │ ├── • MakeDroppedNonPrimaryIndexDeleteAndWriteOnly @@ -276,6 +276,38 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "primary index swap" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ + │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ ├── • 8 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -335,38 +367,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ VALIDATED → DELETE_ONLY │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "primary index swap" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ - │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ └── • 9 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -417,6 +417,14 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 1 element transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ │ + │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ │ ├── • 2 elements transitioning toward ABSENT │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} @@ -434,14 +442,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ │ rule: "dependents removed before index" │ │ - │ ├── • 1 element transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ │ - │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ │ └── • 8 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_1_of_7 index 6f6b889b7440..9b1401870269 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_1_of_7 @@ -10,35 +10,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase - │ - ├── • 4 elements transitioning toward ABSENT - │ │ - │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ rule: "dependents removed before index" - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ DELETE_ONLY → ABSENT - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ - │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ PUBLIC → ABSENT - │ │ - │ └── • skip PUBLIC → ABSENT operations - │ rule: "skip index-column removal ops on index removal" │ ├── • 4 elements transitioning toward PUBLIC │ │ @@ -76,6 +47,35 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ └── • IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ ABSENT → PUBLIC │ + ├── • 4 elements transitioning toward ABSENT + │ │ + │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ rule: "dependents removed before index" + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ DELETE_ONLY → ABSENT + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ + │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ PUBLIC → ABSENT + │ │ + │ └── • skip PUBLIC → ABSENT operations + │ rule: "skip index-column removal ops on index removal" + │ └── • 11 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_2_of_7 index 82e4260ba635..4deb830f13a3 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_2_of_7 @@ -11,32 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -73,6 +47,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_3_of_7 index 36bb4b14306e..6b6b69e52916 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_3_of_7 @@ -11,32 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -73,6 +47,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_4_of_7 index 6c3b6617fb3c..0888536fa528 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_4_of_7 @@ -11,32 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ DELETE_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -73,6 +47,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ DELETE_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 10 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_5_of_7 index bf419182fc97..e006d5b5a1e0 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_5_of_7 @@ -11,26 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -67,6 +47,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_6_of_7 index c3973d89c23d..96bda0fc1209 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_6_of_7 @@ -11,26 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -67,6 +47,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_7_of_7 index b117b12c35da..b8f616d4a377 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index.rollback_7_of_7 @@ -11,26 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ ├── • 4 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -67,6 +47,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_j_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ └── • 9 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_1_of_7 index 19a74f8b3ddb..800f2b32570c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_1_of_7 @@ -11,35 +11,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; └── • PostCommitNonRevertiblePhase │ └── • Stage 1 of 1 in PostCommitNonRevertiblePhase - │ - ├── • 4 elements transitioning toward ABSENT - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ PUBLIC → ABSENT - │ │ │ - │ │ └── • skip PUBLIC → ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ - │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ - │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ rule: "dependents removed before index" - │ │ - │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ DELETE_ONLY → ABSENT - │ │ - │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ rule: "dependents removed before index" │ ├── • 8 elements transitioning toward PUBLIC │ │ @@ -131,6 +102,35 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ ABSENT → PUBLIC │ + ├── • 4 elements transitioning toward ABSENT + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ PUBLIC → ABSENT + │ │ │ + │ │ └── • skip PUBLIC → ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ + │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ + │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ rule: "dependents removed before index" + │ │ + │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ DELETE_ONLY → ABSENT + │ │ + │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ rule: "dependents removed before index" + │ └── • 17 Mutation operations │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_2_of_7 index 47440d25bde8..edbfc1db5d4b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_2_of_7 @@ -12,32 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -128,6 +102,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 16 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_3_of_7 index 436f63476a4e..346b3959bf6c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_3_of_7 @@ -12,32 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ BACKFILL_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -128,6 +102,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ BACKFILL_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 16 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_4_of_7 index ccccecda5617..1de7929d523d 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_4_of_7 @@ -12,32 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ DELETE_ONLY → ABSENT - │ │ │ │ - │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "dependents removed before index" - │ │ │ │ - │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -128,6 +102,32 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ DELETE_ONLY → ABSENT + │ │ │ │ + │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "dependents removed before index" + │ │ │ │ + │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 16 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_5_of_7 index 59017a11e83e..e7880cba75e0 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_5_of_7 @@ -12,26 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -122,6 +102,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 15 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_6_of_7 index e35e72f2c47f..fe79e3805c63 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_6_of_7 @@ -12,26 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ MERGE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -122,6 +102,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ MERGE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 15 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_7_of_7 index c386157dc870..a0933fcf6761 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.rollback_7_of_7 @@ -12,26 +12,6 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Stage 1 of 2 in PostCommitNonRevertiblePhase │ │ - │ ├── • 4 elements transitioning toward ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → DELETE_ONLY - │ │ │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -122,6 +102,26 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ ABSENT → PUBLIC │ │ + │ ├── • 4 elements transitioning toward ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → DELETE_ONLY + │ │ │ └── • 15 Mutation operations │ │ │ ├── • SetColumnName diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_1_of_2 index f35c6c887d52..2b666c0c5ffa 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_1_of_2 @@ -10,38 +10,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 6 elements transitioning toward ABSENT -│ │ │ -│ │ ├── • Column:{DescID: 104, ColumnID: 2} -│ │ │ PUBLIC → WRITE_ONLY -│ │ │ -│ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} -│ │ │ │ PUBLIC → ABSENT -│ │ │ │ -│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} -│ │ │ rule: "column no longer public before dependents" -│ │ │ -│ │ ├── • Column:{DescID: 104, ColumnID: 4} -│ │ │ │ PUBLIC → WRITE_ONLY -│ │ │ │ -│ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} -│ │ │ rule: "secondary indexes containing column as key reach write-only before column" -│ │ │ -│ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} -│ │ │ │ PUBLIC → ABSENT -│ │ │ │ -│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 4} -│ │ │ rule: "column no longer public before dependents" -│ │ │ -│ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} -│ │ │ PUBLIC → VALIDATED -│ │ │ -│ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} -│ │ │ PUBLIC → ABSENT -│ │ │ -│ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} -│ │ rule: "index no longer public before dependents" -│ │ │ ├── • 3 elements transitioning toward PUBLIC │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} @@ -76,6 +44,38 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • Precedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} │ │ rule: "temp index existence precedes index dependents" │ │ +│ ├── • 6 elements transitioning toward ABSENT +│ │ │ +│ │ ├── • Column:{DescID: 104, ColumnID: 2} +│ │ │ PUBLIC → WRITE_ONLY +│ │ │ +│ │ ├── • ColumnName:{DescID: 104, Name: j, ColumnID: 2} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 2} +│ │ │ rule: "column no longer public before dependents" +│ │ │ +│ │ ├── • Column:{DescID: 104, ColumnID: 4} +│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ +│ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} +│ │ │ rule: "secondary indexes containing column as key reach write-only before column" +│ │ │ +│ │ ├── • ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104, ColumnID: 4} +│ │ │ rule: "column no longer public before dependents" +│ │ │ +│ │ ├── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} +│ │ │ PUBLIC → VALIDATED +│ │ │ +│ │ └── • IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} +│ │ │ PUBLIC → ABSENT +│ │ │ +│ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} +│ │ rule: "index no longer public before dependents" +│ │ │ └── • 14 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteAndWriteOnly @@ -341,6 +341,47 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "primary index swap" + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ rule: "index named right before index becomes public" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 3 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ + │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ rule: "skip index-column removal ops on index removal" + │ │ │ ├── • 11 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 2} @@ -421,47 +462,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0} │ │ VALIDATED → DELETE_ONLY │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "primary index swap" - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ rule: "index named right before index becomes public" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 3} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 3 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ - │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ rule: "skip index-column removal ops on index removal" - │ │ │ └── • 10 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -516,6 +516,17 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 1 element transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ │ + │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 4} @@ -558,17 +569,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ rule: "dependents removed before index" │ │ - │ ├── • 1 element transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ │ - │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ │ └── • 9 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_2_of_2 index 2d856b577e53..965b66031999 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_multiple_columns_separate_statements.statement_2_of_2 @@ -214,6 +214,38 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ ├── • Stage 1 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 2 elements transitioning toward PUBLIC + │ │ │ + │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ │ │ VALIDATED → PUBLIC + │ │ │ │ + │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} + │ │ │ │ rule: "primary index swap" + │ │ │ │ + │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} + │ │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ │ + │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ rule: "index dependents exist before index becomes public" + │ │ │ rule: "index named right before index becomes public" + │ │ │ + │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} + │ │ │ ABSENT → PUBLIC + │ │ │ + │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} + │ │ rule: "index existence precedes index dependents" + │ │ + │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ │ PUBLIC → TRANSIENT_ABSENT + │ │ │ │ + │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations + │ │ │ rule: "skip index-column removal ops on index removal" + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY + │ │ │ ├── • 14 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 3} @@ -318,38 +350,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ └── • skip PUBLIC → ABSENT operations │ │ rule: "skip index-column removal ops on index removal" │ │ - │ ├── • 2 elements transitioning toward PUBLIC - │ │ │ - │ │ ├── • PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ │ │ VALIDATED → PUBLIC - │ │ │ │ - │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1} - │ │ │ │ rule: "primary index swap" - │ │ │ │ - │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3} - │ │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ │ - │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ rule: "index dependents exist before index becomes public" - │ │ │ rule: "index named right before index becomes public" - │ │ │ - │ │ └── • IndexName:{DescID: 104, Name: t_pkey, IndexID: 3} - │ │ │ ABSENT → PUBLIC - │ │ │ - │ │ └── • Precedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1} - │ │ rule: "index existence precedes index dependents" - │ │ - │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ ├── • IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ │ PUBLIC → TRANSIENT_ABSENT - │ │ │ │ - │ │ │ └── • skip PUBLIC → TRANSIENT_ABSENT operations - │ │ │ rule: "skip index-column removal ops on index removal" - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY - │ │ │ └── • 12 Mutation operations │ │ │ ├── • MakeDroppedColumnDeleteOnly @@ -414,6 +414,17 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ ├── • Stage 2 of 3 in PostCommitNonRevertiblePhase │ │ + │ ├── • 1 element transitioning toward TRANSIENT_ABSENT + │ │ │ + │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} + │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT + │ │ │ + │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} + │ │ │ rule: "dependents removed before index" + │ │ │ + │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} + │ │ rule: "dependents removed before index" + │ │ │ ├── • 4 elements transitioning toward ABSENT │ │ │ │ │ ├── • Column:{DescID: 104, ColumnID: 4} @@ -456,17 +467,6 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104, Name: t_expr_k_idx, IndexID: 2} │ │ rule: "dependents removed before index" │ │ - │ ├── • 1 element transitioning toward TRANSIENT_ABSENT - │ │ │ - │ │ └── • TemporaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 3, SourceIndexID: 1} - │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT - │ │ │ - │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4} - │ │ │ rule: "dependents removed before index" - │ │ │ - │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104, ColumnID: 3, IndexID: 4} - │ │ rule: "dependents removed before index" - │ │ │ └── • 9 Mutation operations │ │ │ ├── • MakeDroppedIndexDeleteOnly