|
| 1 | +/* setup */ |
| 2 | +create table t (i int primary key, j int not null); |
| 3 | + |
| 4 | +/* test */ |
| 5 | +alter table t drop column j; |
| 6 | +EXPLAIN (DDL) rollback at post-commit stage 2 of 7; |
| 7 | +---- |
| 8 | +Schema change plan for rolling back ALTER TABLE defaultdb.public.t DROP COLUMN j; |
| 9 | + └── PostCommitNonRevertiblePhase |
| 10 | + ├── Stage 1 of 2 in PostCommitNonRevertiblePhase |
| 11 | + │ ├── 1 element transitioning toward PUBLIC |
| 12 | + │ │ └── VALIDATED → PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j+), IndexID: 0} |
| 13 | + │ ├── 4 elements transitioning toward ABSENT |
| 14 | + │ │ ├── BACKFILL_ONLY → ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} |
| 15 | + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey-)} |
| 16 | + │ │ ├── WRITE_ONLY → DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} |
| 17 | + │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} |
| 18 | + │ └── 7 Mutation operations |
| 19 | + │ ├── MakeValidatedColumnNotNullPublic {"ColumnID":2,"TableID":104} |
| 20 | + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":2,"TableID":104} |
| 21 | + │ ├── MakeWriteOnlyIndexDeleteOnly {"IndexID":3,"TableID":104} |
| 22 | + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":3,"TableID":104} |
| 23 | + │ ├── MakeIndexAbsent {"IndexID":2,"TableID":104} |
| 24 | + │ ├── SetJobStateOnDescriptor {"DescriptorID":104} |
| 25 | + │ └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"PostCommitNonRev..."} |
| 26 | + └── Stage 2 of 2 in PostCommitNonRevertiblePhase |
| 27 | + ├── 3 elements transitioning toward ABSENT |
| 28 | + │ ├── PUBLIC → ABSENT IndexData:{DescID: 104 (t), IndexID: 2 (t_pkey-)} |
| 29 | + │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} |
| 30 | + │ └── PUBLIC → ABSENT IndexData:{DescID: 104 (t), IndexID: 3} |
| 31 | + └── 5 Mutation operations |
| 32 | + ├── CreateGCJobForIndex {"IndexID":2,"TableID":104} |
| 33 | + ├── MakeIndexAbsent {"IndexID":3,"TableID":104} |
| 34 | + ├── CreateGCJobForIndex {"IndexID":3,"TableID":104} |
| 35 | + ├── RemoveJobStateFromDescriptor {"DescriptorID":104} |
| 36 | + └── UpdateSchemaChangerJob {"IsNonCancelable":true,"RunningStatus":"all stages compl..."} |
0 commit comments