From 12afc89f2a1422c70072f943e073ea3b19e6db07 Mon Sep 17 00:00:00 2001 From: Marius Posta Date: Thu, 8 Jun 2023 11:31:06 -0400 Subject: [PATCH] scplan: remove hard-coded 1-op-edge constraint on statement phase Previously, the declarative schema changer had this arbitrary constraint which enforced that each element could transition at most once towards its target during the statement phase(s) in the statement transaction. This commit removes this and relies on the two-version-invariant rules instead. To do so, this commit reintroduces the PreviousTransactionPrecedence dependency edge kind and expresses those rules using that instead of the PreviousStagePrecedence kind, which is now deprecated. Removing this limitation is necessary for the side-effects of CREATE statements to be visible inside the statement transaction. This change does not otherwise significantly alter the plans which are generated. Informs #104351. Informs #104123. Release note: None --- .../drop_database_multiregion_primary_region | 2 +- .../end_to_end/drop_table_multiregion | 2 +- .../drop_table_multiregion_primary_region | 2 +- .../drop_database_multiregion_primary_region | 228 +++--- .../testdata/explain/drop_table_multiregion | 134 ++-- .../drop_table_multiregion_primary_region | 100 ++- .../testdata/explain_verbose/create_index | 28 +- .../create_index.rollback_1_of_7 | 4 +- .../create_index.rollback_2_of_7 | 6 +- .../create_index.rollback_3_of_7 | 6 +- .../create_index.rollback_4_of_7 | 6 +- .../create_index.rollback_5_of_7 | 8 +- .../create_index.rollback_6_of_7 | 8 +- .../create_index.rollback_7_of_7 | 8 +- .../drop_database_multiregion_primary_region | 154 +++- .../explain_verbose/drop_table_multiregion | 218 ++++- .../drop_table_multiregion_primary_region | 142 +++- .../internal/rules/current/dep_drop_object.go | 2 +- .../internal/rules/current/dep_two_version.go | 2 +- .../internal/rules/current/testdata/deprules | 380 ++++----- .../scplan/internal/scgraph/edge.go | 16 +- .../scplan/internal/scgraphviz/graphviz.go | 2 +- .../scplan/internal/scstage/build.go | 69 +- .../scplan/internal/scstage/stage.go | 2 +- .../scplan/testdata/alter_table_add_check | 6 +- .../scplan/testdata/alter_table_add_check_udf | 6 +- .../scplan/testdata/alter_table_add_column | 60 +- .../testdata/alter_table_alter_primary_key | 70 +- .../scplan/testdata/alter_table_drop_column | 232 ++++-- .../scplan/testdata/create_function | 8 +- .../scplan/testdata/create_index | 48 +- .../scplan/testdata/create_schema | 8 +- .../scplan/testdata/drop_database | 406 ++++++++-- .../schemachanger/scplan/testdata/drop_index | 150 +++- .../scplan/testdata/drop_owned_by | 248 +++++- .../schemachanger/scplan/testdata/drop_schema | 310 +++++-- .../scplan/testdata/drop_sequence | 2 +- .../schemachanger/scplan/testdata/drop_table | 755 +++++++++++++++++- .../schemachanger/scplan/testdata/drop_type | 8 +- .../schemachanger/scplan/testdata/drop_view | 246 ++++-- .../testdata/end_to_end/create_function | 3 +- .../end_to_end/create_function_in_txn | 3 +- .../testdata/end_to_end/create_schema | 3 +- .../drop_index_with_materialized_view_dep | 2 +- .../testdata/end_to_end/drop_table | 2 +- .../end_to_end/drop_table_udf_default | 2 +- .../testdata/explain/create_function | 37 +- .../create_function_in_txn.statement_1_of_2 | 33 +- .../create_function_in_txn.statement_2_of_2 | 30 +- .../testdata/explain/create_schema | 33 +- .../drop_index_with_materialized_view_dep | 121 +-- .../schemachanger/testdata/explain/drop_table | 138 ++-- .../testdata/explain/drop_table_udf_default | 117 +-- .../testdata/explain_verbose/add_column | 48 +- .../add_column.rollback_1_of_7 | 6 +- .../add_column.rollback_2_of_7 | 12 +- .../add_column.rollback_3_of_7 | 12 +- .../add_column.rollback_4_of_7 | 12 +- .../add_column.rollback_5_of_7 | 14 +- .../add_column.rollback_6_of_7 | 14 +- .../add_column.rollback_7_of_7 | 14 +- .../explain_verbose/add_column_default_seq | 48 +- .../add_column_default_seq.rollback_1_of_7 | 6 +- .../add_column_default_seq.rollback_2_of_7 | 12 +- .../add_column_default_seq.rollback_3_of_7 | 12 +- .../add_column_default_seq.rollback_4_of_7 | 12 +- .../add_column_default_seq.rollback_5_of_7 | 14 +- .../add_column_default_seq.rollback_6_of_7 | 14 +- .../add_column_default_seq.rollback_7_of_7 | 14 +- .../explain_verbose/add_column_default_unique | 66 +- ...dd_column_default_unique.rollback_10_of_15 | 22 +- ...dd_column_default_unique.rollback_11_of_15 | 22 +- ...dd_column_default_unique.rollback_12_of_15 | 22 +- ...dd_column_default_unique.rollback_13_of_15 | 24 +- ...dd_column_default_unique.rollback_14_of_15 | 24 +- ...dd_column_default_unique.rollback_15_of_15 | 24 +- ...add_column_default_unique.rollback_1_of_15 | 6 +- ...add_column_default_unique.rollback_2_of_15 | 10 +- ...add_column_default_unique.rollback_3_of_15 | 10 +- ...add_column_default_unique.rollback_4_of_15 | 10 +- ...add_column_default_unique.rollback_5_of_15 | 12 +- ...add_column_default_unique.rollback_6_of_15 | 12 +- ...add_column_default_unique.rollback_7_of_15 | 12 +- ...add_column_default_unique.rollback_8_of_15 | 12 +- ...add_column_default_unique.rollback_9_of_15 | 20 +- .../explain_verbose/add_column_no_default | 8 +- .../add_column_no_default.rollback_1_of_1 | 2 +- .../explain_verbose/add_column_with_stored | 48 +- .../add_column_with_stored.rollback_1_of_7 | 6 +- .../add_column_with_stored.rollback_2_of_7 | 12 +- .../add_column_with_stored.rollback_3_of_7 | 12 +- .../add_column_with_stored.rollback_4_of_7 | 12 +- .../add_column_with_stored.rollback_5_of_7 | 14 +- .../add_column_with_stored.rollback_6_of_7 | 14 +- .../add_column_with_stored.rollback_7_of_7 | 14 +- .../add_column_with_stored_family | 48 +- ..._column_with_stored_family.rollback_1_of_7 | 6 +- ..._column_with_stored_family.rollback_2_of_7 | 12 +- ..._column_with_stored_family.rollback_3_of_7 | 12 +- ..._column_with_stored_family.rollback_4_of_7 | 12 +- ..._column_with_stored_family.rollback_5_of_7 | 14 +- ..._column_with_stored_family.rollback_6_of_7 | 14 +- ..._column_with_stored_family.rollback_7_of_7 | 14 +- .../explain_verbose/alter_table_add_check_udf | 8 +- .../alter_table_add_check_udf.rollback_1_of_2 | 2 +- .../alter_table_add_check_udf.rollback_2_of_2 | 2 +- .../alter_table_add_check_vanilla | 8 +- ...er_table_add_check_vanilla.rollback_1_of_2 | 2 +- ...er_table_add_check_vanilla.rollback_2_of_2 | 2 +- .../alter_table_add_check_with_seq_and_udt | 8 +- ...add_check_with_seq_and_udt.rollback_1_of_2 | 2 +- ...add_check_with_seq_and_udt.rollback_2_of_2 | 2 +- .../alter_table_add_foreign_key | 8 +- ...lter_table_add_foreign_key.rollback_1_of_2 | 2 +- ...lter_table_add_foreign_key.rollback_2_of_2 | 2 +- .../alter_table_add_primary_key_drop_rowid | 80 +- ...d_primary_key_drop_rowid.rollback_10_of_15 | 22 +- ...d_primary_key_drop_rowid.rollback_11_of_15 | 22 +- ...d_primary_key_drop_rowid.rollback_12_of_15 | 22 +- ...d_primary_key_drop_rowid.rollback_13_of_15 | 24 +- ...d_primary_key_drop_rowid.rollback_14_of_15 | 24 +- ...d_primary_key_drop_rowid.rollback_15_of_15 | 24 +- ...dd_primary_key_drop_rowid.rollback_1_of_15 | 10 +- ...dd_primary_key_drop_rowid.rollback_2_of_15 | 12 +- ...dd_primary_key_drop_rowid.rollback_3_of_15 | 12 +- ...dd_primary_key_drop_rowid.rollback_4_of_15 | 12 +- ...dd_primary_key_drop_rowid.rollback_5_of_15 | 14 +- ...dd_primary_key_drop_rowid.rollback_6_of_15 | 14 +- ...dd_primary_key_drop_rowid.rollback_7_of_15 | 14 +- ...dd_primary_key_drop_rowid.rollback_8_of_15 | 14 +- ...dd_primary_key_drop_rowid.rollback_9_of_15 | 20 +- .../alter_table_add_unique_without_index | 8 +- ...e_add_unique_without_index.rollback_1_of_2 | 2 +- ...e_add_unique_without_index.rollback_2_of_2 | 2 +- .../alter_table_alter_column_set_not_null | 8 +- ..._alter_column_set_not_null.rollback_1_of_2 | 2 +- ..._alter_column_set_not_null.rollback_2_of_2 | 2 +- .../alter_table_alter_primary_key_drop_rowid | 80 +- ...r_primary_key_drop_rowid.rollback_10_of_15 | 22 +- ...r_primary_key_drop_rowid.rollback_11_of_15 | 22 +- ...r_primary_key_drop_rowid.rollback_12_of_15 | 22 +- ...r_primary_key_drop_rowid.rollback_13_of_15 | 24 +- ...r_primary_key_drop_rowid.rollback_14_of_15 | 24 +- ...r_primary_key_drop_rowid.rollback_15_of_15 | 24 +- ...er_primary_key_drop_rowid.rollback_1_of_15 | 10 +- ...er_primary_key_drop_rowid.rollback_2_of_15 | 12 +- ...er_primary_key_drop_rowid.rollback_3_of_15 | 12 +- ...er_primary_key_drop_rowid.rollback_4_of_15 | 12 +- ...er_primary_key_drop_rowid.rollback_5_of_15 | 14 +- ...er_primary_key_drop_rowid.rollback_6_of_15 | 14 +- ...er_primary_key_drop_rowid.rollback_7_of_15 | 14 +- ...er_primary_key_drop_rowid.rollback_8_of_15 | 14 +- ...er_primary_key_drop_rowid.rollback_9_of_15 | 20 +- .../alter_table_alter_primary_key_using_hash | 84 +- ...ter_primary_key_using_hash.rollback_1_of_7 | 12 +- ...ter_primary_key_using_hash.rollback_2_of_7 | 20 +- ...ter_primary_key_using_hash.rollback_3_of_7 | 20 +- ...ter_primary_key_using_hash.rollback_4_of_7 | 20 +- ...ter_primary_key_using_hash.rollback_5_of_7 | 24 +- ...ter_primary_key_using_hash.rollback_6_of_7 | 24 +- ...ter_primary_key_using_hash.rollback_7_of_7 | 24 +- .../alter_table_alter_primary_key_vanilla | 62 +- ..._alter_primary_key_vanilla.rollback_1_of_7 | 8 +- ..._alter_primary_key_vanilla.rollback_2_of_7 | 12 +- ..._alter_primary_key_vanilla.rollback_3_of_7 | 12 +- ..._alter_primary_key_vanilla.rollback_4_of_7 | 12 +- ..._alter_primary_key_vanilla.rollback_5_of_7 | 16 +- ..._alter_primary_key_vanilla.rollback_6_of_7 | 16 +- ..._alter_primary_key_vanilla.rollback_7_of_7 | 16 +- .../alter_table_drop_constraint_check | 6 +- .../alter_table_drop_constraint_fk | 6 +- .../alter_table_drop_constraint_uwi | 6 +- .../alter_table_validate_constraint | 8 +- ..._table_validate_constraint.rollback_1_of_2 | 2 +- ..._table_validate_constraint.rollback_2_of_2 | 2 +- .../testdata/explain_verbose/create_function | 38 +- .../create_function_in_txn.rollback_1_of_7 | 6 +- .../create_function_in_txn.rollback_2_of_7 | 8 +- .../create_function_in_txn.rollback_3_of_7 | 8 +- .../create_function_in_txn.rollback_4_of_7 | 8 +- .../create_function_in_txn.rollback_5_of_7 | 10 +- .../create_function_in_txn.rollback_6_of_7 | 10 +- .../create_function_in_txn.rollback_7_of_7 | 10 +- .../create_function_in_txn.statement_1_of_2 | 35 +- .../create_function_in_txn.statement_2_of_2 | 30 +- .../testdata/explain_verbose/create_index | 28 +- .../create_index.rollback_1_of_7 | 4 +- .../create_index.rollback_2_of_7 | 6 +- .../create_index.rollback_3_of_7 | 6 +- .../create_index.rollback_4_of_7 | 6 +- .../create_index.rollback_5_of_7 | 8 +- .../create_index.rollback_6_of_7 | 8 +- .../create_index.rollback_7_of_7 | 8 +- .../testdata/explain_verbose/create_schema | 39 +- .../explain_verbose/drop_column_basic | 42 +- .../drop_column_basic.rollback_1_of_7 | 6 +- .../drop_column_basic.rollback_2_of_7 | 8 +- .../drop_column_basic.rollback_3_of_7 | 8 +- .../drop_column_basic.rollback_4_of_7 | 8 +- .../drop_column_basic.rollback_5_of_7 | 10 +- .../drop_column_basic.rollback_6_of_7 | 10 +- .../drop_column_basic.rollback_7_of_7 | 10 +- .../drop_column_computed_index | 58 +- ...drop_column_computed_index.rollback_1_of_7 | 10 +- ...drop_column_computed_index.rollback_2_of_7 | 12 +- ...drop_column_computed_index.rollback_3_of_7 | 12 +- ...drop_column_computed_index.rollback_4_of_7 | 12 +- ...drop_column_computed_index.rollback_5_of_7 | 14 +- ...drop_column_computed_index.rollback_6_of_7 | 14 +- ...drop_column_computed_index.rollback_7_of_7 | 14 +- ...ndex_separate_statements.rollback_10_of_15 | 24 +- ...ndex_separate_statements.rollback_11_of_15 | 24 +- ...ndex_separate_statements.rollback_12_of_15 | 24 +- ...ndex_separate_statements.rollback_13_of_15 | 26 +- ...ndex_separate_statements.rollback_14_of_15 | 26 +- ...ndex_separate_statements.rollback_15_of_15 | 26 +- ...index_separate_statements.rollback_1_of_15 | 10 +- ...index_separate_statements.rollback_2_of_15 | 12 +- ...index_separate_statements.rollback_3_of_15 | 12 +- ...index_separate_statements.rollback_4_of_15 | 12 +- ...index_separate_statements.rollback_5_of_15 | 14 +- ...index_separate_statements.rollback_6_of_15 | 14 +- ...index_separate_statements.rollback_7_of_15 | 14 +- ...index_separate_statements.rollback_8_of_15 | 14 +- ...index_separate_statements.rollback_9_of_15 | 22 +- ...index_separate_statements.statement_1_of_2 | 58 +- ...index_separate_statements.statement_2_of_2 | 72 +- .../explain_verbose/drop_column_unique_index | 42 +- .../drop_column_unique_index.rollback_1_of_7 | 6 +- .../drop_column_unique_index.rollback_2_of_7 | 8 +- .../drop_column_unique_index.rollback_3_of_7 | 8 +- .../drop_column_unique_index.rollback_4_of_7 | 8 +- .../drop_column_unique_index.rollback_5_of_7 | 10 +- .../drop_column_unique_index.rollback_6_of_7 | 10 +- .../drop_column_unique_index.rollback_7_of_7 | 10 +- .../explain_verbose/drop_column_with_index | 50 +- .../drop_column_with_index.rollback_1_of_7 | 8 +- .../drop_column_with_index.rollback_2_of_7 | 10 +- .../drop_column_with_index.rollback_3_of_7 | 10 +- .../drop_column_with_index.rollback_4_of_7 | 10 +- .../drop_column_with_index.rollback_5_of_7 | 12 +- .../drop_column_with_index.rollback_6_of_7 | 12 +- .../drop_column_with_index.rollback_7_of_7 | 12 +- .../drop_column_with_partial_index | 50 +- ..._column_with_partial_index.rollback_1_of_7 | 8 +- ..._column_with_partial_index.rollback_2_of_7 | 10 +- ..._column_with_partial_index.rollback_3_of_7 | 10 +- ..._column_with_partial_index.rollback_4_of_7 | 10 +- ..._column_with_partial_index.rollback_5_of_7 | 12 +- ..._column_with_partial_index.rollback_6_of_7 | 12 +- ..._column_with_partial_index.rollback_7_of_7 | 12 +- .../drop_column_with_udf_default | 42 +- ...op_column_with_udf_default.rollback_1_of_7 | 6 +- ...op_column_with_udf_default.rollback_2_of_7 | 8 +- ...op_column_with_udf_default.rollback_3_of_7 | 8 +- ...op_column_with_udf_default.rollback_4_of_7 | 8 +- ...op_column_with_udf_default.rollback_5_of_7 | 10 +- ...op_column_with_udf_default.rollback_6_of_7 | 10 +- ...op_column_with_udf_default.rollback_7_of_7 | 10 +- .../testdata/explain_verbose/drop_function | 2 +- .../drop_index_hash_sharded_index | 28 +- .../drop_index_partial_expression_index | 16 +- .../explain_verbose/drop_index_vanilla_index | 8 +- .../drop_index_with_materialized_view_dep | 198 ++++- ...olumns_separate_statements.rollback_1_of_7 | 12 +- ...olumns_separate_statements.rollback_2_of_7 | 14 +- ...olumns_separate_statements.rollback_3_of_7 | 14 +- ...olumns_separate_statements.rollback_4_of_7 | 14 +- ...olumns_separate_statements.rollback_5_of_7 | 16 +- ...olumns_separate_statements.rollback_6_of_7 | 16 +- ...olumns_separate_statements.rollback_7_of_7 | 16 +- ...lumns_separate_statements.statement_1_of_2 | 58 +- ...lumns_separate_statements.statement_2_of_2 | 56 +- .../testdata/explain_verbose/drop_schema | 2 +- .../testdata/explain_verbose/drop_table | 244 +++++- .../explain_verbose/drop_table_udf_default | 194 ++++- 276 files changed, 5715 insertions(+), 3199 deletions(-) diff --git a/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_database_multiregion_primary_region b/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_database_multiregion_primary_region index adee6b9b8f6f..2cd6cedce31a 100644 --- a/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_database_multiregion_primary_region +++ b/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_database_multiregion_primary_region @@ -30,7 +30,7 @@ write *eventpb.DropDatabase to event log: statement: DROP DATABASE ‹multi_region_test_db› CASCADE tag: DROP DATABASE user: root -## StatementPhase stage 1 of 1 with 47 MutationType ops +## StatementPhase stage 1 of 1 with 57 MutationType ops delete database namespace entry {0 0 multi_region_test_db} -> 104 delete schema namespace entry {104 0 public} -> 105 delete object namespace entry {104 105 crdb_internal_region} -> 106 diff --git a/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion b/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion index 9cb957b5362f..94c5de630747 100644 --- a/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion +++ b/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion @@ -25,7 +25,7 @@ write *eventpb.DropTable to event log: tag: DROP TABLE user: root tableName: multi_region_test_db.public.table_regional_by_row -## StatementPhase stage 1 of 1 with 24 MutationType ops +## StatementPhase stage 1 of 1 with 38 MutationType ops delete object namespace entry {104 105 table_regional_by_row} -> 108 upsert descriptor #106 ... diff --git a/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion_primary_region b/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion_primary_region index eb05d6e06a21..edf9b58f010c 100644 --- a/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion_primary_region +++ b/pkg/ccl/schemachangerccl/testdata/end_to_end/drop_table_multiregion_primary_region @@ -26,7 +26,7 @@ write *eventpb.DropTable to event log: tag: DROP TABLE user: root tableName: multi_region_test_db.public.table_regional_by_table -## StatementPhase stage 1 of 1 with 17 MutationType ops +## StatementPhase stage 1 of 1 with 27 MutationType ops delete object namespace entry {104 105 table_regional_by_table} -> 108 upsert descriptor #106 ... diff --git a/pkg/ccl/schemachangerccl/testdata/explain/drop_database_multiregion_primary_region b/pkg/ccl/schemachangerccl/testdata/explain/drop_database_multiregion_primary_region index bbf5ceed693f..ff2a48a35bfe 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain/drop_database_multiregion_primary_region +++ b/pkg/ccl/schemachangerccl/testdata/explain/drop_database_multiregion_primary_region @@ -10,60 +10,61 @@ EXPLAIN (ddl) DROP DATABASE multi_region_test_db CASCADE; Schema change plan for DROP DATABASE ‹multi_region_test_db› CASCADE; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 52 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 104 (multi_region_test_db-), Name: "multi_region_test_db"} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 104 (multi_region_test_db-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "public"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "root"} - │ │ ├── PUBLIC → DROPPED Database:{DescID: 104 (multi_region_test_db-)} - │ │ ├── PUBLIC → ABSENT DatabaseRoleSetting:{DescID: 104 (multi_region_test_db-), Name: "__placeholder_role_name__"} - │ │ ├── PUBLIC → ABSENT DatabaseRegionConfig:{DescID: 104 (multi_region_test_db-), ReferencedDescID: 106 (crdb_internal_region-)} - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 105 (public-), Name: "public", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (public-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (public-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (public-), Name: "public"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (public-), Name: "root"} - │ │ ├── PUBLIC → DROPPED Schema:{DescID: 105 (public-)} - │ │ ├── PUBLIC → ABSENT SchemaParent:{DescID: 105 (public-), ReferencedDescID: 104 (multi_region_test_db-)} - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 106 (crdb_internal_region-), Name: "crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 106 (crdb_internal_region-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "public"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "root"} - │ │ ├── PUBLIC → DROPPED EnumType:{DescID: 106 (crdb_internal_region-)} - │ │ ├── PUBLIC → ABSENT EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east1"} - │ │ ├── PUBLIC → ABSENT EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east2"} - │ │ ├── PUBLIC → ABSENT EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east3"} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 106 (crdb_internal_region-), ReferencedDescID: 105 (public-)} - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 107 (_crdb_internal_region-), Name: "_crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 107 (_crdb_internal_region-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "public"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "root"} - │ │ ├── PUBLIC → DROPPED AliasType:{DescID: 107 (_crdb_internal_region-), ReferencedTypeIDs: [106 (crdb_internal_region-), 107 (_crdb_internal_region-)]} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 107 (_crdb_internal_region-), ReferencedDescID: 105 (public-)} - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 108 (table_regional_by_table-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} - │ │ ├── PUBLIC → DROPPED Table:{DescID: 108 (table_regional_by_table-)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public-)} - │ │ ├── PUBLIC → ABSENT TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (crdb_internal_region-)} - │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} - │ │ ├── PUBLIC → VALIDATED ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} - │ └── 47 Mutation operations + │ ├── 53 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 104 (multi_region_test_db-), Name: "multi_region_test_db"} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 104 (multi_region_test_db-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "public"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "root"} + │ │ ├── PUBLIC → DROPPED Database:{DescID: 104 (multi_region_test_db-)} + │ │ ├── PUBLIC → ABSENT DatabaseRoleSetting:{DescID: 104 (multi_region_test_db-), Name: "__placeholder_role_name__"} + │ │ ├── PUBLIC → ABSENT DatabaseRegionConfig:{DescID: 104 (multi_region_test_db-), ReferencedDescID: 106 (crdb_internal_region-)} + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 105 (public-), Name: "public", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (public-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (public-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (public-), Name: "public"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (public-), Name: "root"} + │ │ ├── PUBLIC → DROPPED Schema:{DescID: 105 (public-)} + │ │ ├── PUBLIC → ABSENT SchemaParent:{DescID: 105 (public-), ReferencedDescID: 104 (multi_region_test_db-)} + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 106 (crdb_internal_region-), Name: "crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 106 (crdb_internal_region-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "public"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "root"} + │ │ ├── PUBLIC → DROPPED EnumType:{DescID: 106 (crdb_internal_region-)} + │ │ ├── PUBLIC → ABSENT EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east1"} + │ │ ├── PUBLIC → ABSENT EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east2"} + │ │ ├── PUBLIC → ABSENT EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east3"} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 106 (crdb_internal_region-), ReferencedDescID: 105 (public-)} + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 107 (_crdb_internal_region-), Name: "_crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 107 (_crdb_internal_region-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "public"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "root"} + │ │ ├── PUBLIC → DROPPED AliasType:{DescID: 107 (_crdb_internal_region-), ReferencedTypeIDs: [106 (crdb_internal_region-), 107 (_crdb_internal_region-)]} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 107 (_crdb_internal_region-), ReferencedDescID: 105 (public-)} + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 108 (table_regional_by_table-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} + │ │ ├── PUBLIC → DROPPED Table:{DescID: 108 (table_regional_by_table-)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public-)} + │ │ ├── PUBLIC → ABSENT TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (crdb_internal_region-)} + │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} + │ │ ├── PUBLIC → ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} + │ │ ├── PUBLIC → ABSENT PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} + │ └── 57 Mutation operations │ ├── MarkDescriptorAsDropped {"DescriptorID":106} │ ├── NotImplementedForPublicObjects {"DescID":106,"ElementType":"scpb.EnumTypeVal..."} │ ├── NotImplementedForPublicObjects {"DescID":106,"ElementType":"scpb.EnumTypeVal..."} @@ -97,6 +98,9 @@ Schema change plan for DROP DATABASE ‹multi_region_test_db› CASCADE; │ ├── RemoveUserPrivileges {"DescriptorID":108,"User":"admin"} │ ├── RemoveUserPrivileges {"DescriptorID":108,"User":"root"} │ ├── AssertColumnFamilyIsRemoved {"TableID":108} + │ ├── RemoveColumnNotNull {"ColumnID":1,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967295,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967294,"TableID":108} │ ├── MarkDescriptorAsDropped {"DescriptorID":104} │ ├── DrainDescriptorName {"Namespace":{"DatabaseID":104,"DescriptorID":105,"Name":"public"}} │ ├── NotImplementedForPublicObjects {"DescID":105,"ElementType":"scpb.Owner"} @@ -106,66 +110,74 @@ Schema change plan for DROP DATABASE ‹multi_region_test_db› CASCADE; │ ├── DrainDescriptorName {"Namespace":{"DatabaseID":104,"DescriptorID":106,"Name":"crdb_internal_re...","SchemaID":105}} │ ├── DrainDescriptorName {"Namespace":{"DatabaseID":104,"DescriptorID":107,"Name":"_crdb_internal_r...","SchemaID":105}} │ ├── DrainDescriptorName {"Namespace":{"DatabaseID":104,"DescriptorID":108,"Name":"table_regional_b...","SchemaID":105}} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":1,"TableID":108} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967295,"TableID":108} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967294,"TableID":108} + │ ├── MakeWriteOnlyIndexDeleteOnly {"IndexID":1,"TableID":108} │ ├── DrainDescriptorName {"Namespace":{"DescriptorID":104,"Name":"multi_region_tes..."}} │ ├── NotImplementedForPublicObjects {"DescID":104,"ElementType":"scpb.Owner"} │ ├── RemoveUserPrivileges {"DescriptorID":104,"User":"admin"} │ ├── RemoveUserPrivileges {"DescriptorID":104,"User":"public"} - │ └── RemoveUserPrivileges {"DescriptorID":104,"User":"root"} + │ ├── RemoveUserPrivileges {"DescriptorID":104,"User":"root"} + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":1,"TableID":108} + │ ├── MakeIndexAbsent {"IndexID":1,"TableID":108} + │ └── MakeDeleteOnlyColumnAbsent {"ColumnID":1,"TableID":108} ├── PreCommitPhase │ ├── Stage 1 of 2 in PreCommitPhase - │ │ ├── 52 elements transitioning toward ABSENT - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 104 (multi_region_test_db-), Name: "multi_region_test_db"} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 104 (multi_region_test_db-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "public"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC Database:{DescID: 104 (multi_region_test_db-)} - │ │ │ ├── ABSENT → PUBLIC DatabaseRoleSetting:{DescID: 104 (multi_region_test_db-), Name: "__placeholder_role_name__"} - │ │ │ ├── ABSENT → PUBLIC DatabaseRegionConfig:{DescID: 104 (multi_region_test_db-), ReferencedDescID: 106 (crdb_internal_region-)} - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 105 (public-), Name: "public", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 105 (public-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (public-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (public-), Name: "public"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (public-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC Schema:{DescID: 105 (public-)} - │ │ │ ├── ABSENT → PUBLIC SchemaParent:{DescID: 105 (public-), ReferencedDescID: 104 (multi_region_test_db-)} - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 106 (crdb_internal_region-), Name: "crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 106 (crdb_internal_region-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "public"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC EnumType:{DescID: 106 (crdb_internal_region-)} - │ │ │ ├── ABSENT → PUBLIC EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east1"} - │ │ │ ├── ABSENT → PUBLIC EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east2"} - │ │ │ ├── ABSENT → PUBLIC EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east3"} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 106 (crdb_internal_region-), ReferencedDescID: 105 (public-)} - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 107 (_crdb_internal_region-), Name: "_crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 107 (_crdb_internal_region-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "public"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC AliasType:{DescID: 107 (_crdb_internal_region-), ReferencedTypeIDs: [106 (crdb_internal_region-), 107 (_crdb_internal_region-)]} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 107 (_crdb_internal_region-), ReferencedDescID: 105 (public-)} - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db-)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 108 (table_regional_by_table-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 108 (table_regional_by_table-)} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public-)} - │ │ │ ├── ABSENT → PUBLIC TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (crdb_internal_region-)} - │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} - │ │ │ ├── VALIDATED → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} - │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} + │ │ ├── 53 elements transitioning toward ABSENT + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 104 (multi_region_test_db-), Name: "multi_region_test_db"} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 104 (multi_region_test_db-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "public"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC Database:{DescID: 104 (multi_region_test_db-)} + │ │ │ ├── ABSENT → PUBLIC DatabaseRoleSetting:{DescID: 104 (multi_region_test_db-), Name: "__placeholder_role_name__"} + │ │ │ ├── ABSENT → PUBLIC DatabaseRegionConfig:{DescID: 104 (multi_region_test_db-), ReferencedDescID: 106 (crdb_internal_region-)} + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 105 (public-), Name: "public", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 105 (public-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (public-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (public-), Name: "public"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (public-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC Schema:{DescID: 105 (public-)} + │ │ │ ├── ABSENT → PUBLIC SchemaParent:{DescID: 105 (public-), ReferencedDescID: 104 (multi_region_test_db-)} + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 106 (crdb_internal_region-), Name: "crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 106 (crdb_internal_region-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "public"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC EnumType:{DescID: 106 (crdb_internal_region-)} + │ │ │ ├── ABSENT → PUBLIC EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east1"} + │ │ │ ├── ABSENT → PUBLIC EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east2"} + │ │ │ ├── ABSENT → PUBLIC EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east3"} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 106 (crdb_internal_region-), ReferencedDescID: 105 (public-)} + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 107 (_crdb_internal_region-), Name: "_crdb_internal_region", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 107 (_crdb_internal_region-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "public"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC AliasType:{DescID: 107 (_crdb_internal_region-), ReferencedTypeIDs: [106 (crdb_internal_region-), 107 (_crdb_internal_region-)]} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 107 (_crdb_internal_region-), ReferencedDescID: 105 (public-)} + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db-)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 108 (table_regional_by_table-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 108 (table_regional_by_table-)} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public-)} + │ │ │ ├── ABSENT → PUBLIC TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (crdb_internal_region-)} + │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} + │ │ │ ├── ABSENT → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} + │ │ │ ├── ABSENT → PUBLIC PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} + │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} │ │ └── 1 Mutation operation │ │ └── UndoAllInTxnImmediateMutationOpSideEffects │ └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion b/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion index 2fe4841cea2f..2044acf55644 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion +++ b/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion @@ -10,35 +10,37 @@ EXPLAIN (ddl) DROP TABLE multi_region_test_db.public.table_regional_by_row; Schema change plan for DROP TABLE ‹multi_region_test_db›.‹public›.‹table_regional_by_row›; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 27 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row", ReferencedDescID: 104 (multi_region_test_db)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 108 (table_regional_by_row-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "root"} - │ │ ├── PUBLIC → DROPPED Table:{DescID: 108 (table_regional_by_row-)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 108 (table_regional_by_row-), ReferencedDescID: 105 (public)} - │ │ ├── PUBLIC → ABSENT TablePartitioning:{DescID: 108 (table_regional_by_row-)} - │ │ ├── PUBLIC → ABSENT TableLocalityRegionalByRow:{DescID: 108 (table_regional_by_row-)} - │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 108 (table_regional_by_row-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "k", ColumnID: 1 (k-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} - │ │ ├── PUBLIC → VALIDATED ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_region", ColumnID: 2 (crdb_region-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnFamilyID: 0 (primary-), ColumnID: 2 (crdb_region-)} - │ │ ├── PUBLIC → VALIDATED ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} - │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnID: 2 (crdb_region-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} - │ │ ├── PUBLIC → ABSENT IndexPartitioning:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-)} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row_pkey", IndexID: 1 (table_regional_by_row_pkey-)} - │ └── 24 Mutation operations + │ ├── 29 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row", ReferencedDescID: 104 (multi_region_test_db)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 108 (table_regional_by_row-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "root"} + │ │ ├── PUBLIC → DROPPED Table:{DescID: 108 (table_regional_by_row-)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 108 (table_regional_by_row-), ReferencedDescID: 105 (public)} + │ │ ├── PUBLIC → ABSENT TablePartitioning:{DescID: 108 (table_regional_by_row-)} + │ │ ├── PUBLIC → ABSENT TableLocalityRegionalByRow:{DescID: 108 (table_regional_by_row-)} + │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 108 (table_regional_by_row-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "k", ColumnID: 1 (k-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} + │ │ ├── PUBLIC → ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_region", ColumnID: 2 (crdb_region-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnFamilyID: 0 (primary-), ColumnID: 2 (crdb_region-)} + │ │ ├── PUBLIC → ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} + │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnID: 2 (crdb_region-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 1 (table_regional_by_row_pkey-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 1 (table_regional_by_row_pkey-)} + │ │ ├── PUBLIC → ABSENT PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} + │ │ ├── PUBLIC → ABSENT IndexPartitioning:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-)} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row_pkey", IndexID: 1 (table_regional_by_row_pkey-)} + │ └── 38 Mutation operations │ ├── MarkDescriptorAsDropped {"DescriptorID":108} │ ├── RemoveObjectParent {"ObjectID":108,"ParentSchemaID":105} │ ├── NotImplementedForPublicObjects {"DescID":108,"ElementType":"scpb.TablePartit..."} @@ -60,39 +62,55 @@ Schema change plan for DROP TABLE ‹multi_region_test_db›.‹public›.‹tab │ ├── NotImplementedForPublicObjects {"DescID":108,"ElementType":"scpb.Owner"} │ ├── RemoveUserPrivileges {"DescriptorID":108,"User":"admin"} │ ├── RemoveUserPrivileges {"DescriptorID":108,"User":"root"} + │ ├── RemoveColumnNotNull {"ColumnID":1,"TableID":108} │ ├── RemoveDroppedColumnType {"ColumnID":2,"TableID":108} │ ├── UpdateTableBackReferencesInTypes {"BackReferencedTableID":108} - │ └── AssertColumnFamilyIsRemoved {"TableID":108} + │ ├── RemoveColumnNotNull {"ColumnID":2,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967295,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967294,"TableID":108} + │ ├── AssertColumnFamilyIsRemoved {"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":1,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":2,"TableID":108} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967295,"TableID":108} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967294,"TableID":108} + │ ├── MakeWriteOnlyIndexDeleteOnly {"IndexID":1,"TableID":108} + │ ├── RemoveColumnFromIndex {"ColumnID":2,"IndexID":1,"TableID":108} + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":1,"Ordinal":1,"TableID":108} + │ ├── MakeIndexAbsent {"IndexID":1,"TableID":108} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":1,"TableID":108} + │ └── MakeDeleteOnlyColumnAbsent {"ColumnID":2,"TableID":108} ├── PreCommitPhase │ ├── Stage 1 of 2 in PreCommitPhase - │ │ ├── 27 elements transitioning toward ABSENT - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row", ReferencedDescID: 104 (multi_region_test_db)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 108 (table_regional_by_row-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 108 (table_regional_by_row-)} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 108 (table_regional_by_row-), ReferencedDescID: 105 (public)} - │ │ │ ├── ABSENT → PUBLIC TablePartitioning:{DescID: 108 (table_regional_by_row-)} - │ │ │ ├── ABSENT → PUBLIC TableLocalityRegionalByRow:{DescID: 108 (table_regional_by_row-)} - │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 108 (table_regional_by_row-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "k", ColumnID: 1 (k-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} - │ │ │ ├── VALIDATED → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_region", ColumnID: 2 (crdb_region-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnFamilyID: 0 (primary-), ColumnID: 2 (crdb_region-)} - │ │ │ ├── VALIDATED → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} - │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnID: 2 (crdb_region-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} - │ │ │ ├── ABSENT → PUBLIC IndexPartitioning:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-)} - │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row_pkey", IndexID: 1 (table_regional_by_row_pkey-)} + │ │ ├── 29 elements transitioning toward ABSENT + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row", ReferencedDescID: 104 (multi_region_test_db)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 108 (table_regional_by_row-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 108 (table_regional_by_row-)} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 108 (table_regional_by_row-), ReferencedDescID: 105 (public)} + │ │ │ ├── ABSENT → PUBLIC TablePartitioning:{DescID: 108 (table_regional_by_row-)} + │ │ │ ├── ABSENT → PUBLIC TableLocalityRegionalByRow:{DescID: 108 (table_regional_by_row-)} + │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 108 (table_regional_by_row-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "k", ColumnID: 1 (k-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} + │ │ │ ├── ABSENT → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_region", ColumnID: 2 (crdb_region-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnFamilyID: 0 (primary-), ColumnID: 2 (crdb_region-)} + │ │ │ ├── ABSENT → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} + │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnID: 2 (crdb_region-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_row-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 1 (table_regional_by_row_pkey-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 1 (table_regional_by_row_pkey-)} + │ │ │ ├── ABSENT → PUBLIC PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} + │ │ │ ├── ABSENT → PUBLIC IndexPartitioning:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-)} + │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row_pkey", IndexID: 1 (table_regional_by_row_pkey-)} │ │ └── 1 Mutation operation │ │ └── UndoAllInTxnImmediateMutationOpSideEffects │ └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion_primary_region b/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion_primary_region index 5befe80d867d..d0cfe123014c 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion_primary_region +++ b/pkg/ccl/schemachangerccl/testdata/explain/drop_table_multiregion_primary_region @@ -10,28 +10,29 @@ EXPLAIN (ddl) DROP TABLE multi_region_test_db.public.table_regional_by_table CAS Schema change plan for DROP TABLE ‹multi_region_test_db›.‹public›.‹table_regional_by_table› CASCADE; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 20 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 108 (table_regional_by_table-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} - │ │ ├── PUBLIC → DROPPED Table:{DescID: 108 (table_regional_by_table-)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public)} - │ │ ├── PUBLIC → ABSENT TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (#106)} - │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} - │ │ ├── PUBLIC → VALIDATED ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} - │ └── 17 Mutation operations + │ ├── 21 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 108 (table_regional_by_table-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} + │ │ ├── PUBLIC → DROPPED Table:{DescID: 108 (table_regional_by_table-)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public)} + │ │ ├── PUBLIC → ABSENT TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (#106)} + │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} + │ │ ├── PUBLIC → ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} + │ │ ├── PUBLIC → ABSENT PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} + │ └── 27 Mutation operations │ ├── MarkDescriptorAsDropped {"DescriptorID":108} │ ├── RemoveObjectParent {"ObjectID":108,"ParentSchemaID":105} │ ├── RemoveBackReferenceInTypes {"BackReferencedDescriptorID":108} @@ -48,30 +49,41 @@ Schema change plan for DROP TABLE ‹multi_region_test_db›.‹public›.‹tab │ ├── NotImplementedForPublicObjects {"DescID":108,"ElementType":"scpb.Owner"} │ ├── RemoveUserPrivileges {"DescriptorID":108,"User":"admin"} │ ├── RemoveUserPrivileges {"DescriptorID":108,"User":"root"} - │ └── AssertColumnFamilyIsRemoved {"TableID":108} + │ ├── AssertColumnFamilyIsRemoved {"TableID":108} + │ ├── RemoveColumnNotNull {"ColumnID":1,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967295,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967294,"TableID":108} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":1,"TableID":108} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967295,"TableID":108} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967294,"TableID":108} + │ ├── MakeWriteOnlyIndexDeleteOnly {"IndexID":1,"TableID":108} + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":1,"TableID":108} + │ ├── MakeIndexAbsent {"IndexID":1,"TableID":108} + │ └── MakeDeleteOnlyColumnAbsent {"ColumnID":1,"TableID":108} ├── PreCommitPhase │ ├── Stage 1 of 2 in PreCommitPhase - │ │ ├── 20 elements transitioning toward ABSENT - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 108 (table_regional_by_table-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 108 (table_regional_by_table-)} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public)} - │ │ │ ├── ABSENT → PUBLIC TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (#106)} - │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} - │ │ │ ├── VALIDATED → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} - │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} + │ │ ├── 21 elements transitioning toward ABSENT + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 108 (table_regional_by_table-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 108 (table_regional_by_table-)} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public)} + │ │ │ ├── ABSENT → PUBLIC TableLocalitySecondaryRegion:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 106 (#106)} + │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 108 (table_regional_by_table-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} + │ │ │ ├── ABSENT → PUBLIC ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} + │ │ │ ├── ABSENT → PUBLIC PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} + │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} │ │ └── 1 Mutation operation │ │ └── UndoAllInTxnImmediateMutationOpSideEffects │ └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index index a0a881f569f7..3b5fd1d4731d 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1+)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -236,7 +236,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1+)} @@ -280,7 +280,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -433,7 +433,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t1), ColumnID: 1 (id), IndexID: 3} @@ -471,7 +471,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ │ └── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t1), ColumnID: 1 (id), IndexID: 2 (id1+)} @@ -500,7 +500,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ │ └── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -523,7 +523,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ │ └── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -546,7 +546,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ │ └── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -563,7 +563,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ │ └── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -586,7 +586,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ └── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} +│ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t1), Name: "id1", IndexID: 2 (id1+)} @@ -607,7 +607,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ └── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1+), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1+)} @@ -630,7 +630,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t1), ColumnID: 1 (id), IndexID: 3} @@ -696,7 +696,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX id1 │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_1_of_7 b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_1_of_7 index 5951859eec07..83728e2c840c 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_1_of_7 +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_1_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_2_of_7 b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_2_of_7 index 61536190920c..e5af98ff423f 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_2_of_7 +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_2_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -67,7 +67,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -161,7 +161,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_3_of_7 b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_3_of_7 index cc0556ff835a..a2f0a70fb618 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_3_of_7 +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_3_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -67,7 +67,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -161,7 +161,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_4_of_7 b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_4_of_7 index a480c9a3277c..c99bdc4d6e8a 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_4_of_7 +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_4_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -67,7 +67,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -161,7 +161,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_5_of_7 b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_5_of_7 index bbfe20f2b8e9..29d80183696a 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_5_of_7 +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_5_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -140,7 +140,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -167,7 +167,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_6_of_7 b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_6_of_7 index 4d787c8e03fa..c94c5889306d 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_6_of_7 +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_6_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -140,7 +140,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -167,7 +167,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_7_of_7 b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_7_of_7 index f72a248f6ba0..8b57687007d0 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_7_of_7 +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/create_index.rollback_7_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 104 (t1), IndexID: 3} @@ -140,7 +140,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t1), IndexID: 2 (id1-), TemporaryIndexID: 3, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 2 (id1-)} @@ -167,7 +167,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t1), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t1_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 104 (t1), IndexID: 3} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_database_multiregion_primary_region b/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_database_multiregion_primary_region index 8c9652aae122..fad87b4bb38f 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_database_multiregion_primary_region +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_database_multiregion_primary_region @@ -13,7 +13,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 52 elements transitioning toward ABSENT +│ ├── • 53 elements transitioning toward ABSENT │ │ │ │ │ ├── • Namespace:{DescID: 104 (multi_region_test_db-), Name: "multi_region_test_db"} │ │ │ │ PUBLIC → ABSENT @@ -284,10 +284,25 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ rule: "column type removed before column family" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} +│ │ │ │ rule: "column constraint removed right before column reaches delete only" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} │ │ │ │ PUBLIC → ABSENT @@ -308,16 +323,25 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent constraint" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent constraint" +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} +│ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ PUBLIC → ABSENT @@ -338,10 +362,16 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ PUBLIC → ABSENT @@ -361,11 +391,29 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} │ │ │ rule: "column no longer public before dependents" │ │ │ +│ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ │ │ ├── • PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent index" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ rule: "dependents removed before index" │ │ │ │ │ └── • IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} │ │ │ PUBLIC → ABSENT @@ -376,7 +424,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} │ │ rule: "index no longer public before dependents, excluding columns" │ │ -│ └── • 47 Mutation operations +│ └── • 57 Mutation operations │ │ │ ├── • MarkDescriptorAsDropped │ │ DescriptorID: 106 @@ -511,6 +559,18 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ ├── • AssertColumnFamilyIsRemoved │ │ TableID: 108 │ │ +│ ├── • RemoveColumnNotNull +│ │ ColumnID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967295 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967294 +│ │ TableID: 108 +│ │ │ ├── • MarkDescriptorAsDropped │ │ DescriptorID: 104 │ │ @@ -557,6 +617,22 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ Name: table_regional_by_table │ │ SchemaID: 105 │ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967295 +│ │ TableID: 108 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967294 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyIndexDeleteOnly +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ │ ├── • DrainDescriptorName │ │ Namespace: │ │ DescriptorID: 104 @@ -574,15 +650,28 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ DescriptorID: 104 │ │ User: public │ │ -│ └── • RemoveUserPrivileges -│ DescriptorID: 104 -│ User: root +│ ├── • RemoveUserPrivileges +│ │ DescriptorID: 104 +│ │ User: root +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 1 +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeIndexAbsent +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ └── • MakeDeleteOnlyColumnAbsent +│ ColumnID: 1 +│ TableID: 108 │ ├── • PreCommitPhase │ │ │ ├── • Stage 1 of 2 in PreCommitPhase │ │ │ -│ │ ├── • 52 elements transitioning toward ABSENT +│ │ ├── • 53 elements transitioning toward ABSENT │ │ │ │ │ │ │ ├── • Namespace:{DescID: 104 (multi_region_test_db-), Name: "multi_region_test_db"} │ │ │ │ ABSENT → PUBLIC @@ -705,7 +794,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} │ │ │ │ ABSENT → PUBLIC @@ -714,10 +803,10 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ ABSENT → PUBLIC @@ -726,7 +815,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC @@ -734,8 +823,11 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ │ ├── • ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ └── • IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} │ │ │ ABSENT → PUBLIC @@ -1465,7 +1557,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 104 (multi_region_test_db-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Database:{DescID: 104 (multi_region_test_db-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Database:{DescID: 104 (multi_region_test_db-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT DatabaseRoleSetting:{DescID: 104 (multi_region_test_db-), Name: "__placeholder_role_name__"} @@ -1498,7 +1590,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (public-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Schema:{DescID: 105 (public-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Schema:{DescID: 105 (public-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ └── • Precedence dependency from ABSENT SchemaParent:{DescID: 105 (public-), ReferencedDescID: 104 (multi_region_test_db-)} @@ -1522,7 +1614,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 106 (crdb_internal_region-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED EnumType:{DescID: 106 (crdb_internal_region-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED EnumType:{DescID: 106 (crdb_internal_region-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT EnumTypeValue:{DescID: 106 (crdb_internal_region-), Name: "us-east1"} @@ -1555,7 +1647,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 107 (_crdb_internal_region-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED AliasType:{DescID: 107 (_crdb_internal_region-), ReferencedTypeIDs: [106 (crdb_internal_region-), 107 (_crdb_internal_region-)]} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED AliasType:{DescID: 107 (_crdb_internal_region-), ReferencedTypeIDs: [106 (crdb_internal_region-), 107 (_crdb_internal_region-)]} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ └── • Precedence dependency from ABSENT SchemaChild:{DescID: 107 (_crdb_internal_region-), ReferencedDescID: 105 (public-)} @@ -1576,7 +1668,7 @@ EXPLAIN (ddl, verbose) DROP DATABASE multi_region_test_db CASCADE; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public-)} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion b/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion index f7ef82f253d1..b523049ef087 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion @@ -13,7 +13,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 27 elements transitioning toward ABSENT +│ ├── • 29 elements transitioning toward ABSENT │ │ │ │ │ ├── • Namespace:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row", ReferencedDescID: 104 (multi_region_test_db)} │ │ │ │ PUBLIC → ABSENT @@ -80,10 +80,25 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column type removed before column family" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} +│ │ │ │ rule: "column constraint removed right before column reaches delete only" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "k", ColumnID: 1 (k-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "k", ColumnID: 1 (k-)} │ │ │ │ PUBLIC → ABSENT @@ -104,16 +119,37 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} -│ │ │ rule: "relation dropped before dependent constraint" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "relation dropped before dependent constraint" +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} +│ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} +│ │ │ │ rule: "column constraint removed right before column reaches delete only" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_region", ColumnID: 2 (crdb_region-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnFamilyID: 0 (primary-), ColumnID: 2 (crdb_region-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnDefaultExpression:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnID: 2 (crdb_region-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_region", ColumnID: 2 (crdb_region-)} │ │ │ │ PUBLIC → ABSENT @@ -137,10 +173,13 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column type dependents removed right before column type" │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} -│ │ │ rule: "relation dropped before dependent constraint" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "relation dropped before dependent constraint" +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} +│ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • ColumnDefaultExpression:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnID: 2 (crdb_region-)} │ │ │ │ PUBLIC → ABSENT @@ -152,10 +191,16 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ PUBLIC → ABSENT @@ -176,10 +221,16 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_row-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ PUBLIC → ABSENT @@ -199,11 +250,47 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967294 (tableoid-)} │ │ │ rule: "column no longer public before dependents" │ │ │ +│ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ +│ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ │ │ ├── • PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} -│ │ │ rule: "relation dropped before dependent index" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} +│ │ │ │ rule: "relation dropped before dependent index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexPartitioning:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row_pkey", IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ rule: "dependents removed before index" │ │ │ │ │ ├── • IndexPartitioning:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-)} │ │ │ │ PUBLIC → ABSENT @@ -223,7 +310,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} │ │ rule: "index no longer public before dependents, excluding columns" │ │ -│ └── • 24 Mutation operations +│ └── • 38 Mutation operations │ │ │ ├── • MarkDescriptorAsDropped │ │ DescriptorID: 108 @@ -318,6 +405,10 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ DescriptorID: 108 │ │ User: root │ │ +│ ├── • RemoveColumnNotNull +│ │ ColumnID: 1 +│ │ TableID: 108 +│ │ │ ├── • RemoveDroppedColumnType │ │ ColumnID: 2 │ │ TableID: 108 @@ -328,14 +419,69 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ - 106 │ │ - 107 │ │ -│ └── • AssertColumnFamilyIsRemoved +│ ├── • RemoveColumnNotNull +│ │ ColumnID: 2 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967295 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967294 +│ │ TableID: 108 +│ │ +│ ├── • AssertColumnFamilyIsRemoved +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 2 +│ │ TableID: 108 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967295 +│ │ TableID: 108 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967294 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyIndexDeleteOnly +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 2 +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 1 +│ │ IndexID: 1 +│ │ Ordinal: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeIndexAbsent +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 1 +│ │ TableID: 108 +│ │ +│ └── • MakeDeleteOnlyColumnAbsent +│ ColumnID: 2 │ TableID: 108 │ ├── • PreCommitPhase │ │ │ ├── • Stage 1 of 2 in PreCommitPhase │ │ │ -│ │ ├── • 27 elements transitioning toward ABSENT +│ │ ├── • 29 elements transitioning toward ABSENT │ │ │ │ │ │ │ ├── • Namespace:{DescID: 108 (table_regional_by_row-), Name: "table_regional_by_row", ReferencedDescID: 104 (multi_region_test_db)} │ │ │ │ ABSENT → PUBLIC @@ -365,7 +511,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "k", ColumnID: 1 (k-)} │ │ │ │ ABSENT → PUBLIC @@ -374,10 +520,10 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 0} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_region", ColumnID: 2 (crdb_region-)} │ │ │ │ ABSENT → PUBLIC @@ -386,13 +532,13 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 0} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnDefaultExpression:{DescID: 108 (table_regional_by_row-), ReferencedTypeIDs: [106 (#106), 107 (#107)], ColumnID: 2 (crdb_region-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ ABSENT → PUBLIC @@ -401,7 +547,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_row-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_row-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC @@ -409,8 +555,14 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ ├── • ColumnType:{DescID: 108 (table_regional_by_row-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 2 (crdb_region-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_row-), ColumnID: 1 (k-), IndexID: 1 (table_regional_by_row_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-), ConstraintID: 1} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • IndexPartitioning:{DescID: 108 (table_regional_by_row-), IndexID: 1 (table_regional_by_row_pkey-)} │ │ │ │ ABSENT → PUBLIC @@ -937,7 +1089,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 108 (table_regional_by_row-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_row-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 108 (table_regional_by_row-), ReferencedDescID: 105 (public)} diff --git a/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion_primary_region b/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion_primary_region index 23ea3234a106..2bf159c9e66a 100644 --- a/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion_primary_region +++ b/pkg/ccl/schemachangerccl/testdata/explain_verbose/drop_table_multiregion_primary_region @@ -13,7 +13,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 20 elements transitioning toward ABSENT +│ ├── • 21 elements transitioning toward ABSENT │ │ │ │ │ ├── • Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db)} │ │ │ │ PUBLIC → ABSENT @@ -71,10 +71,25 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column type removed before column family" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} +│ │ │ │ rule: "column constraint removed right before column reaches delete only" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (a-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} │ │ │ │ PUBLIC → ABSENT @@ -95,16 +110,25 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent constraint" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent constraint" +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} +│ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ PUBLIC → ABSENT @@ -125,10 +149,16 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ PUBLIC → ABSENT @@ -148,11 +178,29 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} │ │ │ rule: "column no longer public before dependents" │ │ │ +│ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ │ │ ├── • PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} -│ │ │ rule: "relation dropped before dependent index" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} +│ │ │ │ rule: "relation dropped before dependent index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ rule: "dependents removed before index" │ │ │ │ │ └── • IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} │ │ │ PUBLIC → ABSENT @@ -163,7 +211,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} │ │ rule: "index no longer public before dependents, excluding columns" │ │ -│ └── • 17 Mutation operations +│ └── • 27 Mutation operations │ │ │ ├── • MarkDescriptorAsDropped │ │ DescriptorID: 108 @@ -236,14 +284,55 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ DescriptorID: 108 │ │ User: root │ │ -│ └── • AssertColumnFamilyIsRemoved +│ ├── • AssertColumnFamilyIsRemoved +│ │ TableID: 108 +│ │ +│ ├── • RemoveColumnNotNull +│ │ ColumnID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967295 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967294 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967295 +│ │ TableID: 108 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967294 +│ │ TableID: 108 +│ │ +│ ├── • MakeWriteOnlyIndexDeleteOnly +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 1 +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ ├── • MakeIndexAbsent +│ │ IndexID: 1 +│ │ TableID: 108 +│ │ +│ └── • MakeDeleteOnlyColumnAbsent +│ ColumnID: 1 │ TableID: 108 │ ├── • PreCommitPhase │ │ │ ├── • Stage 1 of 2 in PreCommitPhase │ │ │ -│ │ ├── • 20 elements transitioning toward ABSENT +│ │ ├── • 21 elements transitioning toward ABSENT │ │ │ │ │ │ │ ├── • Namespace:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table", ReferencedDescID: 104 (multi_region_test_db)} │ │ │ │ ABSENT → PUBLIC @@ -270,7 +359,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "a", ColumnID: 1 (a-)} │ │ │ │ ABSENT → PUBLIC @@ -279,10 +368,10 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnNotNull:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 0} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ ABSENT → PUBLIC @@ -291,7 +380,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 108 (table_regional_by_table-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 108 (table_regional_by_table-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC @@ -299,8 +388,11 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ │ ├── • ColumnType:{DescID: 108 (table_regional_by_table-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 108 (table_regional_by_table-), ColumnID: 1 (a-), IndexID: 1 (table_regional_by_table_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 108 (table_regional_by_table-), IndexID: 1 (table_regional_by_table_pkey-), ConstraintID: 1} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ └── • IndexName:{DescID: 108 (table_regional_by_table-), Name: "table_regional_by_table_pkey", IndexID: 1 (table_regional_by_table_pkey-)} │ │ │ ABSENT → PUBLIC @@ -671,7 +763,7 @@ EXPLAIN (ddl, verbose) DROP TABLE multi_region_test_db.public.table_regional_by_ │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 108 (table_regional_by_table-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Table:{DescID: 108 (table_regional_by_table-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 108 (table_regional_by_table-), ReferencedDescID: 105 (public)} diff --git a/pkg/sql/schemachanger/scplan/internal/rules/current/dep_drop_object.go b/pkg/sql/schemachanger/scplan/internal/rules/current/dep_drop_object.go index 9531cf369a10..51bf851364f6 100644 --- a/pkg/sql/schemachanger/scplan/internal/rules/current/dep_drop_object.go +++ b/pkg/sql/schemachanger/scplan/internal/rules/current/dep_drop_object.go @@ -30,7 +30,7 @@ func init() { registerDepRule( "descriptor dropped in transaction before removal", - scgraph.PreviousStagePrecedence, + scgraph.PreviousTransactionPrecedence, "dropped", "absent", func(from, to NodeVars) rel.Clauses { return rel.Clauses{ diff --git a/pkg/sql/schemachanger/scplan/internal/rules/current/dep_two_version.go b/pkg/sql/schemachanger/scplan/internal/rules/current/dep_two_version.go index 0a804dbe1b07..693da917385d 100644 --- a/pkg/sql/schemachanger/scplan/internal/rules/current/dep_two_version.go +++ b/pkg/sql/schemachanger/scplan/internal/rules/current/dep_two_version.go @@ -90,7 +90,7 @@ func init() { )) registerDepRule( ruleName, - scgraph.PreviousStagePrecedence, + scgraph.PreviousTransactionPrecedence, "prev", "next", func(from, to NodeVars) rel.Clauses { return clausesForTwoVersionEdge( diff --git a/pkg/sql/schemachanger/scplan/internal/rules/current/testdata/deprules b/pkg/sql/schemachanger/scplan/internal/rules/current/testdata/deprules index 66d3c19efbdb..4df153084d41 100644 --- a/pkg/sql/schemachanger/scplan/internal/rules/current/testdata/deprules +++ b/pkg/sql/schemachanger/scplan/internal/rules/current/testdata/deprules @@ -2,7 +2,7 @@ deprules ---- - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -18,7 +18,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -35,7 +35,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -51,7 +51,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -67,7 +67,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -83,7 +83,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -99,7 +99,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -115,7 +115,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -131,7 +131,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -147,7 +147,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -163,7 +163,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -179,7 +179,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -195,7 +195,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -211,7 +211,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -228,7 +228,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -244,7 +244,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -260,7 +260,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -276,7 +276,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -413,7 +413,7 @@ deprules - joinTargetNode($column, $column-Target, $column-Node) - name: 'ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -429,7 +429,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -446,7 +446,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -462,7 +462,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -478,7 +478,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -494,7 +494,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -510,7 +510,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -526,7 +526,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -542,7 +542,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -559,7 +559,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -575,7 +575,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -591,7 +591,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -607,7 +607,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_ABSENT->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -623,7 +623,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -639,7 +639,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_BACKFILL_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -655,7 +655,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -671,7 +671,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -687,7 +687,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_MERGE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -703,7 +703,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_VALIDATED->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -719,7 +719,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_WRITE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -735,7 +735,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -752,7 +752,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -769,7 +769,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -785,7 +785,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -801,7 +801,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -817,7 +817,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -833,7 +833,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -849,7 +849,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -865,7 +865,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -881,7 +881,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -897,7 +897,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->BACKFILL_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -913,7 +913,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -929,7 +929,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -945,7 +945,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -961,7 +961,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -977,7 +977,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGE_ONLY->MERGED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -993,7 +993,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: PUBLIC->TRANSIENT_VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1009,7 +1009,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_BACKFILLED->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1025,7 +1025,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_BACKFILL_ONLY->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1041,7 +1041,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1058,7 +1058,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_MERGED->TRANSIENT_WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1074,7 +1074,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_MERGE_ONLY->TRANSIENT_WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1090,7 +1090,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_VALIDATED->TRANSIENT_WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1106,7 +1106,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_WRITE_ONLY->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1123,7 +1123,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1139,7 +1139,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -1155,7 +1155,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1171,7 +1171,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1187,7 +1187,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1204,7 +1204,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1220,7 +1220,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1236,7 +1236,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1252,7 +1252,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1268,7 +1268,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1285,7 +1285,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1301,7 +1301,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1317,7 +1317,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1333,7 +1333,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1349,7 +1349,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1365,7 +1365,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1381,7 +1381,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1397,7 +1397,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -1413,7 +1413,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1430,7 +1430,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_ABSENT->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1446,7 +1446,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1462,7 +1462,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1478,7 +1478,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1494,7 +1494,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1510,7 +1510,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1526,7 +1526,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -1542,7 +1542,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -1558,7 +1558,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -1575,7 +1575,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -1591,7 +1591,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -1607,7 +1607,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -1623,7 +1623,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -2407,7 +2407,7 @@ deprules - joinTargetNode($dependent, $dependent-Target, $dependent-Node) - name: descriptor dropped in transaction before removal from: dropped-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: absent-Node query: - $dropped[Type] IN ['*scpb.AliasType', '*scpb.CompositeType', '*scpb.Database', '*scpb.EnumType', '*scpb.Function', '*scpb.Schema', '*scpb.Sequence', '*scpb.Table', '*scpb.View'] @@ -3484,7 +3484,7 @@ deprules ---- - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -3500,7 +3500,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -3517,7 +3517,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -3533,7 +3533,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -3549,7 +3549,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -3565,7 +3565,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.CheckConstraint' @@ -3581,7 +3581,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -3597,7 +3597,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -3613,7 +3613,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -3629,7 +3629,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -3645,7 +3645,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -3661,7 +3661,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.Column' @@ -3677,7 +3677,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -3693,7 +3693,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -3710,7 +3710,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -3726,7 +3726,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -3742,7 +3742,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -3758,7 +3758,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ColumnNotNull' @@ -3895,7 +3895,7 @@ deprules - joinTargetNode($column, $column-Target, $column-Node) - name: 'ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -3911,7 +3911,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -3928,7 +3928,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -3944,7 +3944,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -3960,7 +3960,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -3976,7 +3976,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.ForeignKeyConstraint' @@ -3992,7 +3992,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4008,7 +4008,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4024,7 +4024,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4041,7 +4041,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4057,7 +4057,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4073,7 +4073,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4089,7 +4089,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_ABSENT->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4105,7 +4105,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4121,7 +4121,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_BACKFILL_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4137,7 +4137,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4153,7 +4153,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4169,7 +4169,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_MERGE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4185,7 +4185,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_VALIDATED->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4201,7 +4201,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_WRITE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4217,7 +4217,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4234,7 +4234,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4251,7 +4251,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4267,7 +4267,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4283,7 +4283,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4299,7 +4299,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4315,7 +4315,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4331,7 +4331,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4347,7 +4347,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4363,7 +4363,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4379,7 +4379,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->BACKFILL_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4395,7 +4395,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4411,7 +4411,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4427,7 +4427,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4443,7 +4443,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4459,7 +4459,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGE_ONLY->MERGED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4475,7 +4475,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: PUBLIC->TRANSIENT_VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4491,7 +4491,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_BACKFILLED->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4507,7 +4507,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_BACKFILL_ONLY->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4523,7 +4523,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4540,7 +4540,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_MERGED->TRANSIENT_WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4556,7 +4556,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_MERGE_ONLY->TRANSIENT_WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4572,7 +4572,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_VALIDATED->TRANSIENT_WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4588,7 +4588,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_WRITE_ONLY->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4605,7 +4605,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4621,7 +4621,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.PrimaryIndex' @@ -4637,7 +4637,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4653,7 +4653,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4669,7 +4669,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4686,7 +4686,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4702,7 +4702,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4718,7 +4718,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4734,7 +4734,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4750,7 +4750,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4767,7 +4767,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4783,7 +4783,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4799,7 +4799,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4815,7 +4815,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4831,7 +4831,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4847,7 +4847,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4863,7 +4863,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4879,7 +4879,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.SecondaryIndex' @@ -4895,7 +4895,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -4912,7 +4912,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_ABSENT->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -4928,7 +4928,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -4944,7 +4944,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -4960,7 +4960,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -4976,7 +4976,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -4992,7 +4992,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -5008,7 +5008,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.TemporaryIndex' @@ -5024,7 +5024,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -5040,7 +5040,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -5057,7 +5057,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -5073,7 +5073,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -5089,7 +5089,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -5105,7 +5105,7 @@ deprules - joinTargetNode($next, $next-Target, $next-Node) - name: 'UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED' from: prev-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: next-Node query: - $prev[Type] = '*scpb.UniqueWithoutIndexConstraint' @@ -5889,7 +5889,7 @@ deprules - joinTargetNode($dependent, $dependent-Target, $dependent-Node) - name: descriptor dropped in transaction before removal from: dropped-Node - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence to: absent-Node query: - $dropped[Type] IN ['*scpb.AliasType', '*scpb.CompositeType', '*scpb.Database', '*scpb.EnumType', '*scpb.Function', '*scpb.Schema', '*scpb.Sequence', '*scpb.Table', '*scpb.View'] diff --git a/pkg/sql/schemachanger/scplan/internal/scgraph/edge.go b/pkg/sql/schemachanger/scplan/internal/scgraph/edge.go index 5afa03994699..e6428eec1244 100644 --- a/pkg/sql/schemachanger/scplan/internal/scgraph/edge.go +++ b/pkg/sql/schemachanger/scplan/internal/scgraph/edge.go @@ -94,16 +94,18 @@ const ( // PreviousStagePrecedence indicates that the source (from) of the edge must // be reached before the destination (to), and _must_ do so in a previous // stage. + // + // This edge kind is only maintained for compatibility with the 23.1 and 22.2 + // releases via the release_22_2 and release_23_1 rulesets and should not be + // used elsewhere. + // Deprecated PreviousStagePrecedence - // PreviousTransactionPrecedence is like PreviousStagePrecedence but does - // not allow the transition to occur unless the current phase is at least - // PostCommitPhase, because StatementPhase and PreCommitPhase are special - // in that they take place in the same transaction. + // PreviousTransactionPrecedence indicates that the source (from) of the edge + // must be reached before the destination (to), and _must_ do so in a previous + // transaction. // - // This edge kind is only maintained for compatibility with the 22.2 - // release via the release_22_2 ruleset and should not be used elsewhere. - // Deprecated. + // This edge kind is used to enforce the two-version invariant. PreviousTransactionPrecedence ) diff --git a/pkg/sql/schemachanger/scplan/internal/scgraphviz/graphviz.go b/pkg/sql/schemachanger/scplan/internal/scgraphviz/graphviz.go index 0db53674b94f..a978f1cf3967 100644 --- a/pkg/sql/schemachanger/scplan/internal/scgraphviz/graphviz.go +++ b/pkg/sql/schemachanger/scplan/internal/scgraphviz/graphviz.go @@ -228,7 +228,7 @@ func drawDeps(cs scpb.CurrentState, g *scgraph.Graph) (*dot.Graph, error) { ge.Attr("color", "red") ge.Attr("label", e.RuleNames()) switch e.Kind() { - case scgraph.PreviousStagePrecedence: + case scgraph.PreviousStagePrecedence, scgraph.PreviousTransactionPrecedence: ge.Attr("arrowhead", "inv") case scgraph.SameStagePrecedence: ge.Attr("arrowhead", "diamond") diff --git a/pkg/sql/schemachanger/scplan/internal/scstage/build.go b/pkg/sql/schemachanger/scplan/internal/scstage/build.go index 477e9c9b48ac..73ec656ed4a3 100644 --- a/pkg/sql/schemachanger/scplan/internal/scstage/build.go +++ b/pkg/sql/schemachanger/scplan/internal/scstage/build.go @@ -53,9 +53,16 @@ func BuildStages( return scJobID } }(), - targetState: init.TargetState, - initial: init.Initial, - current: init.Current, + targetState: init.TargetState, + initial: init.Initial, + current: init.Current, + targetToIdx: func() map[*scpb.Target]int { + m := make(map[*scpb.Target]int, len(init.Targets)) + for i := range init.Targets { + m[&init.Targets[i]] = i + } + return m + }(), startingPhase: phase, descIDs: screl.AllTargetDescIDs(init.TargetState), withSanityChecks: withSanityChecks, @@ -98,6 +105,7 @@ type buildContext struct { targetState scpb.TargetState initial []scpb.Status current []scpb.Status + targetToIdx map[*scpb.Target]int startingPhase scop.Phase descIDs catalog.DescriptorIDSet withSanityChecks bool @@ -435,19 +443,7 @@ func (sb stageBuilder) isOutgoingOpEdgeAllowed(e *scgraph.OpEdge) bool { // to the transaction. For example, dropping a table in an explicit // transaction should make it impossible to query that table later // in the transaction. - // - // That being said, we can't simply allow any op-edge, or the targets from - // previous statements in the same transaction will make progress, which is - // undesirable: in the statement phase we only allow up to one transition - // per target in the whole transaction. This is somewhat arbitrary but it's - // usually enough to ensure the desired in-transaction side effects. - // - // We enforce this at-most-one-transition constraint by checking whether - // the op-edge's origin node status is a potential target status: iff so - // then that node is the source node of the target transition path. - // Otherwise, it means that at least one transition has already occurred - // therefore no further transitions are allowed. - return scpb.AsTargetStatus(e.From().CurrentStatus) != scpb.InvalidTarget + return true case scop.PreCommitPhase, scop.PostCommitPhase: // We allow non-revertible ops to be included in stages in these phases // only if none of the remaining schema change operations can fail. @@ -503,7 +499,32 @@ func (sb stageBuilder) isUnmetInboundDep(de *scgraph.DepEdge) bool { _, fromIsCandidate := sb.fulfilling[de.From()] switch de.Kind() { - case scgraph.PreviousStagePrecedence, scgraph.PreviousTransactionPrecedence: + case scgraph.PreviousTransactionPrecedence: + if !fromIsFulfilled { + // If the source node has not already been fulfilled in an earlier + // stage, then we can't consider scheduling the destination node + // in the current stage. + return true + } + // At this point, the source node has been fulfilled before the current + // stage. + if sb.bs.currentPhase > scop.PreCommitPhase { + // Post-commit, transactions cannot have multiple stages, therefore + // the source node was fulfilled in an earlier transaction and this + // inbound dependency is met. + return false + } + // At this point, the current stage is in the statement transaction. + // The only way this inbound dependency can be met is if the source node + // status is the initial status before the schema change even began, + // in which case the node was fulfilled before the statement transaction. + idx, ok := sb.bc.targetToIdx[de.From().Target] + if !ok { + panic(errors.AssertionFailedf("unknown target %q", de.From().Target)) + } + return de.From().CurrentStatus != sb.bc.initial[idx] + + case scgraph.PreviousStagePrecedence: // True iff the source node has not been fulfilled in an earlier stage. return !fromIsFulfilled @@ -800,21 +821,17 @@ func (bc buildContext) removeJobReferenceOp(descID descpb.ID) scop.Op { } func (bc buildContext) nodes(current []scpb.Status) []*screl.Node { - return nodes(bc.g, bc.targetState.Targets, current) -} - -func nodes(g *scgraph.Graph, targets []scpb.Target, current []scpb.Status) []*screl.Node { - nodes := make([]*screl.Node, len(targets)) + ret := make([]*screl.Node, len(bc.targetState.Targets)) for i, status := range current { - t := &targets[i] - n, ok := g.GetNode(t, status) + t := &bc.targetState.Targets[i] + n, ok := bc.g.GetNode(t, status) if !ok { panic(errors.AssertionFailedf("could not find node for element %s, target status %s, current status %s", screl.ElementString(t.Element()), t.TargetStatus, status)) } - nodes[i] = n + ret[i] = n } - return nodes + return ret } // makeDescriptorStates builds the state of the schema change job broken down diff --git a/pkg/sql/schemachanger/scplan/internal/scstage/stage.go b/pkg/sql/schemachanger/scplan/internal/scstage/stage.go index d37c257283bd..2f85cbfbced3 100644 --- a/pkg/sql/schemachanger/scplan/internal/scstage/stage.go +++ b/pkg/sql/schemachanger/scplan/internal/scstage/stage.go @@ -264,7 +264,7 @@ func validateStageSubgraph(ts scpb.TargetState, stage Stage, g *scgraph.Graph) e de.From(), oe.To(), de.RuleNames()) } case during: - if de.Kind() == scgraph.PreviousStagePrecedence { + if de.Kind() == scgraph.PreviousStagePrecedence || de.Kind() == scgraph.PreviousTransactionPrecedence { return errors.Errorf("%s reached in same stage as %s, violates rule in %s", de.From(), oe.To(), de.RuleNames()) } diff --git a/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check b/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check index fe3a62689323..dea571b99e63 100644 --- a/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check +++ b/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check @@ -87,15 +87,15 @@ ALTER TABLE t ADD CHECK (i > 0) ---- - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, ABSENT] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, VALIDATED] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, WRITE_ONLY] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, WRITE_ONLY] to: [ConstraintWithoutIndexName:{DescID: 104, Name: check_i, ConstraintID: 2}, PUBLIC] diff --git a/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check_udf b/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check_udf index 10947c750cd4..adbe4bef7123 100644 --- a/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check_udf +++ b/pkg/sql/schemachanger/scplan/testdata/alter_table_add_check_udf @@ -107,15 +107,15 @@ ALTER TABLE t ADD CONSTRAINT check_b CHECK (f(b) > 1); ---- - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, ABSENT] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, VALIDATED] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, WRITE_ONLY] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, WRITE_ONLY] to: [ConstraintWithoutIndexName:{DescID: 104, Name: check_b, ConstraintID: 2}, PUBLIC] diff --git a/pkg/sql/schemachanger/scplan/testdata/alter_table_add_column b/pkg/sql/schemachanger/scplan/testdata/alter_table_add_column index 6ab9ba7453e2..c4dd22619a69 100644 --- a/pkg/sql/schemachanger/scplan/testdata/alter_table_add_column +++ b/pkg/sql/schemachanger/scplan/testdata/alter_table_add_column @@ -2508,11 +2508,11 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 ---- - from: [Column:{DescID: 109, ColumnID: 2}, ABSENT] to: [Column:{DescID: 109, ColumnID: 2}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [Column:{DescID: 109, ColumnID: 2}, DELETE_ONLY] to: [Column:{DescID: 109, ColumnID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [Column:{DescID: 109, ColumnID: 2}, DELETE_ONLY] to: [ColumnDefaultExpression:{DescID: 109, ColumnID: 2}, PUBLIC] @@ -2560,7 +2560,7 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: column existence precedes temp index existence - from: [Column:{DescID: 109, ColumnID: 2}, WRITE_ONLY] to: [Column:{DescID: 109, ColumnID: 2}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC - from: [Column:{DescID: 109, ColumnID: 2}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, WRITE_ONLY] @@ -2692,11 +2692,11 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: index drop mutation visible before cleaning up index columns - from: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, PUBLIC] to: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, VALIDATED] to: [IndexName:{DescID: 109, Name: baz_pkey, IndexID: 1}, ABSENT] @@ -2704,7 +2704,7 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: index no longer public before dependents, excluding columns - from: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] @@ -2712,11 +2712,11 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: primary index swap - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, ABSENT] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 2}, PUBLIC] @@ -2736,19 +2736,19 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: index existence precedes index dependents - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] to: [Column:{DescID: 109, ColumnID: 2}, PUBLIC] @@ -2764,19 +2764,19 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: primary index with new columns should exist before temp indexes - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [PrimaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, ABSENT] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILLED] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 4}, PUBLIC] @@ -2796,31 +2796,31 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: index existence precedes index dependents - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILL_ONLY] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGED] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGE_ONLY] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, VALIDATED] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, WRITE_ONLY] to: [SecondaryIndex:{DescID: 109, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, ABSENT] to: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 3}, PUBLIC] @@ -2832,7 +2832,7 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 109, IndexID: 3}, TRANSIENT_DROPPED] @@ -2848,7 +2848,7 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [IndexData:{DescID: 109, IndexID: 3}, PUBLIC] @@ -2860,11 +2860,11 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 109, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY - from: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, ABSENT] to: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, DELETE_ONLY] to: [IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 5}, PUBLIC] @@ -2876,7 +2876,7 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 109, IndexID: 5}, TRANSIENT_DROPPED] @@ -2884,7 +2884,7 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: index removed before garbage collection - from: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, WRITE_ONLY] to: [IndexData:{DescID: 109, IndexID: 5}, PUBLIC] @@ -2896,5 +2896,5 @@ ALTER TABLE defaultdb.baz ADD g INT UNIQUE DEFAULT 1 rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 109, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY diff --git a/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_primary_key b/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_primary_key index b971037e0592..687d0eaa4cf5 100644 --- a/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_primary_key +++ b/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_primary_key @@ -613,15 +613,15 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); ---- - from: [Column:{DescID: 104, ColumnID: 3}, DELETE_ONLY] to: [Column:{DescID: 104, ColumnID: 3}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [Column:{DescID: 104, ColumnID: 3}, PUBLIC] to: [Column:{DescID: 104, ColumnID: 3}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY - from: [Column:{DescID: 104, ColumnID: 3}, WRITE_ONLY] to: [Column:{DescID: 104, ColumnID: 3}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY - from: [Column:{DescID: 104, ColumnID: 3}, WRITE_ONLY] to: [ColumnDefaultExpression:{DescID: 104, ColumnID: 3}, ABSENT] @@ -673,11 +673,11 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: column constraint removed right before column reaches delete only - from: [ColumnNotNull:{DescID: 104, ColumnID: 3, IndexID: 0}, PUBLIC] to: [ColumnNotNull:{DescID: 104, ColumnID: 3, IndexID: 0}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [ColumnNotNull:{DescID: 104, ColumnID: 3, IndexID: 0}, VALIDATED] to: [ColumnNotNull:{DescID: 104, ColumnID: 3, IndexID: 0}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT - from: [ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 3}, ABSENT] to: [Column:{DescID: 104, ColumnID: 3}, ABSENT] @@ -865,11 +865,11 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index drop mutation visible before cleaning up index columns - from: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, PUBLIC] to: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, VALIDATED] to: [IndexName:{DescID: 104, Name: t_pkey, IndexID: 1}, ABSENT] @@ -877,7 +877,7 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index no longer public before dependents, excluding columns - from: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 1, ConstraintID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] @@ -885,11 +885,11 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: primary index swap - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, ABSENT] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2}, PUBLIC] @@ -913,23 +913,23 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index existence precedes index dependents - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGE_ONLY->MERGED - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, TRANSIENT_VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: PUBLIC->TRANSIENT_VALIDATED - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] to: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, DELETE_ONLY] @@ -957,7 +957,7 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index drop mutation visible before cleaning up index columns - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, TRANSIENT_VALIDATED] to: [IndexName:{DescID: 104, Name: t_pkey, IndexID: 2}, TRANSIENT_ABSENT] @@ -965,7 +965,7 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index no longer public before dependents, excluding columns - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, TRANSIENT_VALIDATED] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, TRANSIENT_WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_VALIDATED->TRANSIENT_WRITE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, TRANSIENT_VALIDATED] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, PUBLIC] @@ -973,19 +973,19 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: primary index swap - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: VALIDATED->PUBLIC - from: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, ABSENT] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILLED] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 4}, PUBLIC] @@ -1005,31 +1005,31 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index existence precedes index dependents - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILL_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGED] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, VALIDATED] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, WRITE_ONLY] to: [PrimaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, ABSENT] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3}, PUBLIC] @@ -1045,7 +1045,7 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 104, IndexID: 3}, TRANSIENT_DROPPED] @@ -1065,7 +1065,7 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [IndexData:{DescID: 104, IndexID: 3}, PUBLIC] @@ -1077,11 +1077,11 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 3, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, ABSENT] to: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, DELETE_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 5}, PUBLIC] @@ -1093,7 +1093,7 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 104, IndexID: 5}, TRANSIENT_DROPPED] @@ -1109,7 +1109,7 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, WRITE_ONLY] to: [IndexData:{DescID: 104, IndexID: 5}, PUBLIC] @@ -1121,5 +1121,5 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (k); rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 5, ConstraintID: 5, SourceIndexID: 2}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY diff --git a/pkg/sql/schemachanger/scplan/testdata/alter_table_drop_column b/pkg/sql/schemachanger/scplan/testdata/alter_table_drop_column index e117781e6989..58568173d7c0 100644 --- a/pkg/sql/schemachanger/scplan/testdata/alter_table_drop_column +++ b/pkg/sql/schemachanger/scplan/testdata/alter_table_drop_column @@ -17,7 +17,7 @@ SET sql_safe_updates = false; ops ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; ---- -StatementPhase stage 1 of 1 with 31 MutationType ops +StatementPhase stage 1 of 1 with 41 MutationType ops transitions: [[Column:{DescID: 107, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY [[ColumnName:{DescID: 107, Name: v1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT @@ -28,19 +28,19 @@ StatementPhase stage 1 of 1 with 31 MutationType ops [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 108}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: k, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: v1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ReferencedTypeIDs: [104 105], ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: v2, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC], ABSENT] -> BACKFILL_ONLY @@ -179,6 +179,36 @@ StatementPhase stage 1 of 1 with 31 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 108 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 108 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[Column:{DescID: 107, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC @@ -190,19 +220,19 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 108}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: k, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: v1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ReferencedTypeIDs: [104 105], ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: v2, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC], BACKFILL_ONLY] -> ABSENT @@ -732,15 +762,15 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; ---- - from: [Column:{DescID: 107, ColumnID: 2}, DELETE_ONLY] to: [Column:{DescID: 107, ColumnID: 2}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [Column:{DescID: 107, ColumnID: 2}, PUBLIC] to: [Column:{DescID: 107, ColumnID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY - from: [Column:{DescID: 107, ColumnID: 2}, WRITE_ONLY] to: [Column:{DescID: 107, ColumnID: 2}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY - from: [Column:{DescID: 107, ColumnID: 2}, WRITE_ONLY] to: [ColumnName:{DescID: 107, Name: v1, ColumnID: 2}, ABSENT] @@ -1048,11 +1078,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: index drop mutation visible before cleaning up index columns - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, PUBLIC] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [IndexName:{DescID: 107, Name: foo_pkey, IndexID: 1}, ABSENT] @@ -1060,7 +1090,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: index no longer public before dependents, excluding columns - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC] @@ -1068,11 +1098,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: primary index swap - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, ABSENT] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILLED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 3}, PUBLIC] @@ -1096,27 +1126,27 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: index existence precedes index dependents - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT] to: [View:{DescID: 108}, ABSENT] @@ -1148,11 +1178,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: index no longer public before index name - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, PUBLIC] to: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, VALIDATED] to: [IndexName:{DescID: 107, Name: foo_v2_key, IndexID: 2}, ABSENT] @@ -1160,11 +1190,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: index no longer public before dependents, excluding columns - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, VALIDATED] to: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, ABSENT] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 4}, PUBLIC] @@ -1180,7 +1210,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 107, IndexID: 4}, TRANSIENT_DROPPED] @@ -1200,7 +1230,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [IndexData:{DescID: 107, IndexID: 4}, PUBLIC] @@ -1212,7 +1242,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY - from: [UserPrivileges:{DescID: 108, Name: admin}, ABSENT] to: [View:{DescID: 108}, ABSENT] @@ -1304,13 +1334,13 @@ ALTER TABLE defaultdb.foo DROP COLUMN v1 CASCADE; rule: descriptor dropped before dependent element removal - from: [View:{DescID: 108}, DROPPED] to: [View:{DescID: 108}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal ops ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; ---- -StatementPhase stage 1 of 1 with 32 MutationType ops +StatementPhase stage 1 of 1 with 42 MutationType ops transitions: [[Column:{DescID: 107, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY [[ColumnName:{DescID: 107, Name: v2, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT @@ -1322,19 +1352,19 @@ StatementPhase stage 1 of 1 with 32 MutationType ops [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 108}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: k, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: v1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ReferencedTypeIDs: [104 105], ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: v2, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC], ABSENT] -> BACKFILL_ONLY @@ -1476,6 +1506,36 @@ StatementPhase stage 1 of 1 with 32 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 108 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 108 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[Column:{DescID: 107, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC @@ -1488,19 +1548,19 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 108}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: k, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: v1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ReferencedTypeIDs: [104 105], ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: v2, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC], BACKFILL_ONLY] -> ABSENT @@ -2059,15 +2119,15 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; ---- - from: [Column:{DescID: 107, ColumnID: 3}, DELETE_ONLY] to: [Column:{DescID: 107, ColumnID: 3}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [Column:{DescID: 107, ColumnID: 3}, PUBLIC] to: [Column:{DescID: 107, ColumnID: 3}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY - from: [Column:{DescID: 107, ColumnID: 3}, WRITE_ONLY] to: [Column:{DescID: 107, ColumnID: 3}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY - from: [Column:{DescID: 107, ColumnID: 3}, WRITE_ONLY] to: [ColumnDefaultExpression:{DescID: 107, ColumnID: 3, ReferencedSequenceIDs: [106]}, ABSENT] @@ -2215,11 +2275,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: column constraint removed right before column reaches delete only - from: [ColumnNotNull:{DescID: 107, ColumnID: 3, IndexID: 0}, PUBLIC] to: [ColumnNotNull:{DescID: 107, ColumnID: 3, IndexID: 0}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [ColumnNotNull:{DescID: 107, ColumnID: 3, IndexID: 0}, VALIDATED] to: [ColumnNotNull:{DescID: 107, ColumnID: 3, IndexID: 0}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT - from: [ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 3}, ABSENT] to: [Column:{DescID: 107, ColumnID: 3}, ABSENT] @@ -2407,11 +2467,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: index drop mutation visible before cleaning up index columns - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, PUBLIC] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [IndexName:{DescID: 107, Name: foo_pkey, IndexID: 1}, ABSENT] @@ -2419,7 +2479,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: index no longer public before dependents, excluding columns - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC] @@ -2427,11 +2487,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: primary index swap - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, ABSENT] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILLED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 3}, PUBLIC] @@ -2455,27 +2515,27 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: index existence precedes index dependents - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT] to: [View:{DescID: 108}, ABSENT] @@ -2507,11 +2567,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: index no longer public before index name - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, PUBLIC] to: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, VALIDATED] to: [Column:{DescID: 107, ColumnID: 3}, WRITE_ONLY] @@ -2523,11 +2583,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: index no longer public before dependents, excluding columns - from: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, VALIDATED] to: [SecondaryIndex:{DescID: 107, IndexID: 2, ConstraintID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, ABSENT] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 4}, PUBLIC] @@ -2543,7 +2603,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 107, IndexID: 4}, TRANSIENT_DROPPED] @@ -2563,7 +2623,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [IndexData:{DescID: 107, IndexID: 4}, PUBLIC] @@ -2575,7 +2635,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY - from: [UserPrivileges:{DescID: 108, Name: admin}, ABSENT] to: [View:{DescID: 108}, ABSENT] @@ -2667,7 +2727,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN v2 CASCADE; rule: descriptor dropped before dependent element removal - from: [View:{DescID: 108}, DROPPED] to: [View:{DescID: 108}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal ops @@ -3070,15 +3130,15 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; ---- - from: [Column:{DescID: 107, ColumnID: 4}, DELETE_ONLY] to: [Column:{DescID: 107, ColumnID: 4}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [Column:{DescID: 107, ColumnID: 4}, PUBLIC] to: [Column:{DescID: 107, ColumnID: 4}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY - from: [Column:{DescID: 107, ColumnID: 4}, WRITE_ONLY] to: [Column:{DescID: 107, ColumnID: 4}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY - from: [Column:{DescID: 107, ColumnID: 4}, WRITE_ONLY] to: [ColumnDefaultExpression:{DescID: 107, ColumnID: 4, ReferencedFunctionIDs: [109]}, ABSENT] @@ -3218,11 +3278,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; rule: index drop mutation visible before cleaning up index columns - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, PUBLIC] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [IndexName:{DescID: 107, Name: foo_pkey, IndexID: 1}, ABSENT] @@ -3230,7 +3290,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; rule: index no longer public before dependents, excluding columns - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 2}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC] @@ -3238,11 +3298,11 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; rule: primary index swap - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, ABSENT] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILLED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 3}, PUBLIC] @@ -3266,31 +3326,31 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; rule: index existence precedes index dependents - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILL_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, VALIDATED] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [PrimaryIndex:{DescID: 107, IndexID: 3, ConstraintID: 3, TemporaryIndexID: 4, SourceIndexID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, ABSENT] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 4}, PUBLIC] @@ -3306,7 +3366,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 107, IndexID: 4}, TRANSIENT_DROPPED] @@ -3326,7 +3386,7 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [IndexData:{DescID: 107, IndexID: 4}, PUBLIC] @@ -3338,5 +3398,5 @@ ALTER TABLE defaultdb.foo DROP COLUMN udfcol; rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 107, IndexID: 4, ConstraintID: 4, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY diff --git a/pkg/sql/schemachanger/scplan/testdata/create_function b/pkg/sql/schemachanger/scplan/testdata/create_function index 57b3129ee873..037e78d4c8db 100644 --- a/pkg/sql/schemachanger/scplan/testdata/create_function +++ b/pkg/sql/schemachanger/scplan/testdata/create_function @@ -20,9 +20,9 @@ CREATE FUNCTION f(a notmyworkday) RETURNS INT VOLATILE LANGUAGE SQL AS $$ SELECT nextval('sq1'); $$; ---- -StatementPhase stage 1 of 1 with 10 MutationType ops +StatementPhase stage 1 of 1 with 11 MutationType ops transitions: - [[Function:{DescID: 109}, PUBLIC], ABSENT] -> DESCRIPTOR_ADDED + [[Function:{DescID: 109}, PUBLIC], ABSENT] -> PUBLIC [[SchemaChild:{DescID: 109, ReferencedDescID: 101}, PUBLIC], ABSENT] -> PUBLIC [[FunctionName:{DescID: 109}, PUBLIC], ABSENT] -> PUBLIC [[FunctionVolatility:{DescID: 109}, PUBLIC], ABSENT] -> PUBLIC @@ -143,9 +143,11 @@ StatementPhase stage 1 of 1 with 10 MutationType ops ObjParent: ChildObjectID: 109 SchemaID: 101 + *scop.MarkDescriptorAsPublic + DescriptorID: 109 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: - [[Function:{DescID: 109}, PUBLIC], DESCRIPTOR_ADDED] -> ABSENT + [[Function:{DescID: 109}, PUBLIC], PUBLIC] -> ABSENT [[SchemaChild:{DescID: 109, ReferencedDescID: 101}, PUBLIC], PUBLIC] -> ABSENT [[FunctionName:{DescID: 109}, PUBLIC], PUBLIC] -> ABSENT [[FunctionVolatility:{DescID: 109}, PUBLIC], PUBLIC] -> ABSENT diff --git a/pkg/sql/schemachanger/scplan/testdata/create_index b/pkg/sql/schemachanger/scplan/testdata/create_index index 4c048dffceff..a184826d9121 100644 --- a/pkg/sql/schemachanger/scplan/testdata/create_index +++ b/pkg/sql/schemachanger/scplan/testdata/create_index @@ -346,11 +346,11 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: secondary index named before validation - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, ABSENT] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2}, PUBLIC] @@ -374,31 +374,31 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: index existence precedes index dependents - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, ABSENT] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, DELETE_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3}, PUBLIC] @@ -414,7 +414,7 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 104, IndexID: 3}, TRANSIENT_DROPPED] @@ -434,7 +434,7 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, WRITE_ONLY] to: [IndexData:{DescID: 104, IndexID: 3}, PUBLIC] @@ -446,7 +446,7 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY ops @@ -770,11 +770,11 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: secondary index named before validation - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, ABSENT] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 2}, PUBLIC] @@ -798,31 +798,31 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: index existence precedes index dependents - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILL_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, BACKFILLED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, MERGED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, PUBLIC] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, WRITE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0, TemporaryIndexID: 3, SourceIndexID: 1}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, ABSENT] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, DELETE_ONLY] to: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 3}, PUBLIC] @@ -838,7 +838,7 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: temp index existence precedes index dependents - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_ABSENT] to: [IndexData:{DescID: 104, IndexID: 3}, TRANSIENT_DROPPED] @@ -858,7 +858,7 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: index drop mutation visible before cleaning up index columns - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, WRITE_ONLY] to: [IndexData:{DescID: 104, IndexID: 3}, PUBLIC] @@ -870,5 +870,5 @@ CREATE INDEX id1 ON defaultdb.t1 (id, name) STORING (money) rule: temp index is WRITE_ONLY before backfill - from: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, WRITE_ONLY] to: [TemporaryIndex:{DescID: 104, IndexID: 3, ConstraintID: 1, SourceIndexID: 1}, TRANSIENT_DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY diff --git a/pkg/sql/schemachanger/scplan/testdata/create_schema b/pkg/sql/schemachanger/scplan/testdata/create_schema index 906bf7406dea..d89ab27f2c69 100644 --- a/pkg/sql/schemachanger/scplan/testdata/create_schema +++ b/pkg/sql/schemachanger/scplan/testdata/create_schema @@ -1,9 +1,9 @@ ops CREATE SCHEMA sc; ---- -StatementPhase stage 1 of 1 with 7 MutationType ops +StatementPhase stage 1 of 1 with 8 MutationType ops transitions: - [[Schema:{DescID: 104}, PUBLIC], ABSENT] -> DESCRIPTOR_ADDED + [[Schema:{DescID: 104}, PUBLIC], ABSENT] -> PUBLIC [[SchemaName:{DescID: 104}, PUBLIC], ABSENT] -> PUBLIC [[Namespace:{DescID: 104, Name: sc, ReferencedDescID: 100}, PUBLIC], ABSENT] -> PUBLIC [[SchemaParent:{DescID: 104, ReferencedDescID: 100}, PUBLIC], ABSENT] -> PUBLIC @@ -41,9 +41,11 @@ StatementPhase stage 1 of 1 with 7 MutationType ops Privileges: 2 UserName: root WithGrantOption: 2 + *scop.MarkDescriptorAsPublic + DescriptorID: 104 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: - [[Schema:{DescID: 104}, PUBLIC], DESCRIPTOR_ADDED] -> ABSENT + [[Schema:{DescID: 104}, PUBLIC], PUBLIC] -> ABSENT [[SchemaName:{DescID: 104}, PUBLIC], PUBLIC] -> ABSENT [[Namespace:{DescID: 104, Name: sc, ReferencedDescID: 100}, PUBLIC], PUBLIC] -> ABSENT [[SchemaParent:{DescID: 104, ReferencedDescID: 100}, PUBLIC], PUBLIC] -> ABSENT diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_database b/pkg/sql/schemachanger/scplan/testdata/drop_database index dd66bdf4ba62..6f00658f5282 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_database +++ b/pkg/sql/schemachanger/scplan/testdata/drop_database @@ -19,7 +19,7 @@ COMMENT ON TABLE db1.sc1.t1 IS 't1 is good'; ops DROP DATABASE db1 CASCADE ---- -StatementPhase stage 1 of 1 with 169 MutationType ops +StatementPhase stage 1 of 1 with 241 MutationType ops transitions: [[Namespace:{DescID: 104, Name: db1, ReferencedDescID: 0}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 104}, ABSENT], PUBLIC] -> ABSENT @@ -56,24 +56,27 @@ StatementPhase stage 1 of 1 with 169 MutationType ops [[Table:{DescID: 110}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 110, ReferencedDescID: 105}, ABSENT], PUBLIC] -> ABSENT [[ColumnFamily:{DescID: 110, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: id, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[ColumnNotNull:{DescID: 110, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> VALIDATED - [[Column:{DescID: 110, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[ColumnNotNull:{DescID: 110, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 110, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: name, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: val, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnDefaultExpression:{DescID: 110, ColumnID: 3, ReferencedSequenceIDs: [107]}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT - [[PrimaryIndex:{DescID: 110, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> VALIDATED + [[IndexColumn:{DescID: 110, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 110, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 110, ColumnID: 3, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 110, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT [[IndexName:{DescID: 110, Name: t1_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 108, Name: sq1, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 108}, ABSENT], PUBLIC] -> ABSENT @@ -89,24 +92,27 @@ StatementPhase stage 1 of 1 with 169 MutationType ops [[SchemaChild:{DescID: 109, ReferencedDescID: 106}, ABSENT], PUBLIC] -> ABSENT [[TableComment:{DescID: 109, Comment: t1 is good}, ABSENT], PUBLIC] -> ABSENT [[ColumnFamily:{DescID: 109, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: id, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> VALIDATED - [[Column:{DescID: 109, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: name, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: val, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnDefaultExpression:{DescID: 109, ColumnID: 3, ReferencedSequenceIDs: [108]}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT - [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> VALIDATED + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT [[IndexName:{DescID: 109, Name: t1_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 111, Name: v1, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 111}, ABSENT], PUBLIC] -> ABSENT @@ -114,13 +120,13 @@ StatementPhase stage 1 of 1 with 169 MutationType ops [[UserPrivileges:{DescID: 111, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 111}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 111, ReferencedDescID: 106}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 112, Name: v2, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT @@ -129,16 +135,16 @@ StatementPhase stage 1 of 1 with 169 MutationType ops [[UserPrivileges:{DescID: 112, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 112}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 112, ReferencedDescID: 106}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 112, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 112, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 112, Name: n1, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 112, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 112, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 112, Name: n2, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 112, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 112, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 112, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 112, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 112, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 112, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 113, Name: v3, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT @@ -147,16 +153,16 @@ StatementPhase stage 1 of 1 with 169 MutationType ops [[UserPrivileges:{DescID: 113, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 113}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 113, ReferencedDescID: 106}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: n1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 114, Name: v4, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT @@ -165,16 +171,16 @@ StatementPhase stage 1 of 1 with 169 MutationType ops [[UserPrivileges:{DescID: 114, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 114}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 114, ReferencedDescID: 106}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 114, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 114, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 114, Name: n2, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 114, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 114, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 114, Name: n1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 114, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 114, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 114, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 114, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 114, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 114, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 115, Name: typ, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT @@ -198,19 +204,19 @@ StatementPhase stage 1 of 1 with 169 MutationType ops [[UserPrivileges:{DescID: 117, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 117}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 117, ReferencedDescID: 106}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 117, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 117, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 117, Name: k, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 117, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 117, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 117, Name: n2, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 117, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 117, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 117, Name: n1, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 117, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 117, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 117, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 117, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 117, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 117, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT ops: @@ -578,6 +584,21 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 110 User: root + *scop.RemoveColumnNotNull + ColumnID: 1 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 110 *scop.NotImplementedForPublicObjects DescID: 108 ElementType: scpb.Owner @@ -596,6 +617,21 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 109 User: root + *scop.RemoveColumnNotNull + ColumnID: 1 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 109 *scop.NotImplementedForPublicObjects DescID: 111 ElementType: scpb.Owner @@ -605,6 +641,15 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 111 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 111 *scop.NotImplementedForPublicObjects DescID: 112 ElementType: scpb.Owner @@ -614,6 +659,18 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 112 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 112 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 112 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 112 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 112 *scop.NotImplementedForPublicObjects DescID: 113 ElementType: scpb.Owner @@ -623,6 +680,18 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 113 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 113 *scop.NotImplementedForPublicObjects DescID: 114 ElementType: scpb.Owner @@ -632,6 +701,18 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 114 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 114 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 114 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 114 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 114 *scop.NotImplementedForPublicObjects DescID: 115 ElementType: scpb.Owner @@ -665,6 +746,21 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 117 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 117 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 117 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 117 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 117 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 117 *scop.MarkDescriptorAsDropped DescriptorID: 104 *scop.RemoveDatabaseComment @@ -714,6 +810,18 @@ StatementPhase stage 1 of 1 with 169 MutationType ops SchemaID: 105 *scop.AssertColumnFamilyIsRemoved TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 110 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 110 *scop.DrainDescriptorName Namespace: DatabaseID: 104 @@ -728,30 +836,87 @@ StatementPhase stage 1 of 1 with 169 MutationType ops SchemaID: 106 *scop.AssertColumnFamilyIsRemoved TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 109 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 109 *scop.DrainDescriptorName Namespace: DatabaseID: 104 DescriptorID: 111 Name: v1 SchemaID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 111 *scop.DrainDescriptorName Namespace: DatabaseID: 104 DescriptorID: 112 Name: v2 SchemaID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 112 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 112 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 112 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 112 *scop.DrainDescriptorName Namespace: DatabaseID: 104 DescriptorID: 113 Name: v3 SchemaID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 113 *scop.DrainDescriptorName Namespace: DatabaseID: 104 DescriptorID: 114 Name: v4 SchemaID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 114 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 114 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 114 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 114 *scop.DrainDescriptorName Namespace: DatabaseID: 104 @@ -770,6 +935,21 @@ StatementPhase stage 1 of 1 with 169 MutationType ops DescriptorID: 117 Name: v5 SchemaID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 117 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 117 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 117 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 117 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 117 *scop.DrainDescriptorName Namespace: DescriptorID: 104 @@ -786,6 +966,60 @@ StatementPhase stage 1 of 1 with 169 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 104 User: root + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + TableID: 110 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + Kind: 2 + TableID: 110 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 1 + Kind: 2 + Ordinal: 1 + TableID: 110 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 110 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + Kind: 2 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 1 + Kind: 2 + Ordinal: 1 + TableID: 109 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 109 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[Namespace:{DescID: 104, Name: db1, ReferencedDescID: 0}, ABSENT], ABSENT] -> PUBLIC @@ -823,24 +1057,27 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[Table:{DescID: 110}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 110, ReferencedDescID: 105}, ABSENT], ABSENT] -> PUBLIC [[ColumnFamily:{DescID: 110, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: id, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[ColumnNotNull:{DescID: 110, ColumnID: 1, IndexID: 0}, ABSENT], VALIDATED] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[ColumnNotNull:{DescID: 110, ColumnID: 1, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: name, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: val, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnDefaultExpression:{DescID: 110, ColumnID: 3, ReferencedSequenceIDs: [107]}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC - [[PrimaryIndex:{DescID: 110, IndexID: 1, ConstraintID: 1}, ABSENT], VALIDATED] -> PUBLIC + [[IndexColumn:{DescID: 110, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 110, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 110, ColumnID: 3, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 110, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC [[IndexName:{DescID: 110, Name: t1_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 108, Name: sq1, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC [[Owner:{DescID: 108}, ABSENT], ABSENT] -> PUBLIC @@ -856,24 +1093,27 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[SchemaChild:{DescID: 109, ReferencedDescID: 106}, ABSENT], ABSENT] -> PUBLIC [[TableComment:{DescID: 109, Comment: t1 is good}, ABSENT], ABSENT] -> PUBLIC [[ColumnFamily:{DescID: 109, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: id, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], VALIDATED] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: name, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: val, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnDefaultExpression:{DescID: 109, ColumnID: 3, ReferencedSequenceIDs: [108]}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC - [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], VALIDATED] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC [[IndexName:{DescID: 109, Name: t1_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 111, Name: v1, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC [[Owner:{DescID: 111}, ABSENT], ABSENT] -> PUBLIC @@ -881,13 +1121,13 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 111, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 111}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 111, ReferencedDescID: 106}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 112, Name: v2, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC @@ -896,16 +1136,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 112, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 112}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 112, ReferencedDescID: 106}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 112, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 112, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 112, Name: n1, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 112, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 112, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 112, Name: n2, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 112, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 112, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 112, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 112, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 112, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 112, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 112, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 113, Name: v3, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC @@ -914,16 +1154,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 113, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 113}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 113, ReferencedDescID: 106}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: n1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 114, Name: v4, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC @@ -932,16 +1172,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 114, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 114}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 114, ReferencedDescID: 106}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 114, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 114, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 114, Name: n2, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 114, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 114, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 114, Name: n1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 114, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 114, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 114, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 114, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 114, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 114, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 114, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 115, Name: typ, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC @@ -965,19 +1205,19 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 117, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 117}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 117, ReferencedDescID: 106}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 117, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 117, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 117, Name: k, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 117, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 117, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 117, Name: n2, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 117, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 117, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 117, Name: n1, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 117, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 117, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 117, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 117, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 117, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 117, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 117, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC ops: @@ -2199,7 +2439,7 @@ DROP DATABASE db1 CASCADE ---- - from: [AliasType:{DescID: 116, ReferencedTypeIDs: [115 116]}, DROPPED] to: [AliasType:{DescID: 116, ReferencedTypeIDs: [115 116]}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [AliasType:{DescID: 116, ReferencedTypeIDs: [115 116]}, DROPPED] to: [Namespace:{DescID: 116, Name: _typ, ReferencedDescID: 104}, ABSENT] @@ -3207,7 +3447,7 @@ DROP DATABASE db1 CASCADE rule: descriptor removed right before garbage collection - from: [Database:{DescID: 104}, DROPPED] to: [Database:{DescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Database:{DescID: 104}, DROPPED] to: [DatabaseComment:{DescID: 104, Comment: db1 is good}, ABSENT] @@ -3299,7 +3539,7 @@ DROP DATABASE db1 CASCADE rule: non-data dependents removed before descriptor - from: [EnumType:{DescID: 115}, DROPPED] to: [EnumType:{DescID: 115}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [EnumType:{DescID: 115}, DROPPED] to: [EnumTypeValue:{DescID: 115, Name: a}, ABSENT] @@ -3591,7 +3831,7 @@ DROP DATABASE db1 CASCADE rule: descriptor dropped before dependent element removal - from: [Schema:{DescID: 105}, DROPPED] to: [Schema:{DescID: 105}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Schema:{DescID: 105}, DROPPED] to: [SchemaParent:{DescID: 105, ReferencedDescID: 104}, ABSENT] @@ -3619,7 +3859,7 @@ DROP DATABASE db1 CASCADE rule: descriptor dropped before dependent element removal - from: [Schema:{DescID: 106}, DROPPED] to: [Schema:{DescID: 106}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Schema:{DescID: 106}, DROPPED] to: [SchemaComment:{DescID: 106, Comment: sc1 is good}, ABSENT] @@ -3767,7 +4007,7 @@ DROP DATABASE db1 CASCADE rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Sequence:{DescID: 107}, DROPPED] to: [Sequence:{DescID: 107}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Sequence:{DescID: 107}, DROPPED] to: [UserPrivileges:{DescID: 107, Name: admin}, ABSENT] @@ -3799,7 +4039,7 @@ DROP DATABASE db1 CASCADE rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Sequence:{DescID: 108}, DROPPED] to: [Sequence:{DescID: 108}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Sequence:{DescID: 108}, DROPPED] to: [UserPrivileges:{DescID: 108, Name: admin}, ABSENT] @@ -3919,7 +4159,7 @@ DROP DATABASE db1 CASCADE rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Table:{DescID: 109}, DROPPED] to: [Table:{DescID: 109}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Table:{DescID: 109}, DROPPED] to: [TableComment:{DescID: 109, Comment: t1 is good}, ABSENT] @@ -4043,7 +4283,7 @@ DROP DATABASE db1 CASCADE rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Table:{DescID: 110}, DROPPED] to: [Table:{DescID: 110}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Table:{DescID: 110}, DROPPED] to: [UserPrivileges:{DescID: 110, Name: admin}, ABSENT] @@ -4251,7 +4491,7 @@ DROP DATABASE db1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 111}, DROPPED] to: [View:{DescID: 111}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 112}, DROPPED] to: [Column:{DescID: 112, ColumnID: 1}, WRITE_ONLY] @@ -4323,7 +4563,7 @@ DROP DATABASE db1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 112}, DROPPED] to: [View:{DescID: 112}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 113}, DROPPED] to: [Column:{DescID: 113, ColumnID: 1}, WRITE_ONLY] @@ -4395,7 +4635,7 @@ DROP DATABASE db1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 113}, DROPPED] to: [View:{DescID: 113}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 114}, DROPPED] to: [Column:{DescID: 114, ColumnID: 1}, WRITE_ONLY] @@ -4467,7 +4707,7 @@ DROP DATABASE db1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 114}, DROPPED] to: [View:{DescID: 114}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 117}, DROPPED] to: [Column:{DescID: 117, ColumnID: 1}, WRITE_ONLY] @@ -4551,5 +4791,5 @@ DROP DATABASE db1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 117}, DROPPED] to: [View:{DescID: 117}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_index b/pkg/sql/schemachanger/scplan/testdata/drop_index index 08b64a69d208..b0e2ba83c56c 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_index +++ b/pkg/sql/schemachanger/scplan/testdata/drop_index @@ -137,11 +137,11 @@ DROP INDEX idx1 CASCADE rule: index no longer public before index name - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0}, PUBLIC] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0}, VALIDATED] to: [IndexName:{DescID: 104, Name: idx1, IndexID: 2}, ABSENT] @@ -149,7 +149,7 @@ DROP INDEX idx1 CASCADE rule: index no longer public before dependents, excluding columns - from: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0}, VALIDATED] to: [SecondaryIndex:{DescID: 104, IndexID: 2, ConstraintID: 0}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY ops @@ -278,15 +278,15 @@ DROP INDEX idx2 CASCADE ---- - from: [Column:{DescID: 104, ColumnID: 4}, DELETE_ONLY] to: [Column:{DescID: 104, ColumnID: 4}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [Column:{DescID: 104, ColumnID: 4}, PUBLIC] to: [Column:{DescID: 104, ColumnID: 4}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY - from: [Column:{DescID: 104, ColumnID: 4}, WRITE_ONLY] to: [Column:{DescID: 104, ColumnID: 4}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY - from: [Column:{DescID: 104, ColumnID: 4}, WRITE_ONLY] to: [ColumnName:{DescID: 104, Name: crdb_internal_idx_expr, ColumnID: 4}, ABSENT] @@ -346,11 +346,11 @@ DROP INDEX idx2 CASCADE rule: index no longer public before index name - from: [SecondaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 0}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 0}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [SecondaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 0}, PUBLIC] to: [SecondaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 0}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [SecondaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 0}, VALIDATED] to: [Column:{DescID: 104, ColumnID: 4}, WRITE_ONLY] @@ -362,7 +362,7 @@ DROP INDEX idx2 CASCADE rule: index no longer public before dependents, excluding columns - from: [SecondaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 0}, VALIDATED] to: [SecondaryIndex:{DescID: 104, IndexID: 4, ConstraintID: 0}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY ops @@ -531,11 +531,11 @@ DROP INDEX idx3 CASCADE ---- - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, PUBLIC] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, VALIDATED] to: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: CheckConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT - from: [CheckConstraint:{DescID: 104, IndexID: 0, ConstraintID: 2}, VALIDATED] to: [ConstraintWithoutIndexName:{DescID: 104, Name: check_crdb_internal_i_shard_16, ConstraintID: 2}, ABSENT] @@ -543,15 +543,15 @@ DROP INDEX idx3 CASCADE rule: Constraint should be hidden before name - from: [Column:{DescID: 104, ColumnID: 5}, DELETE_ONLY] to: [Column:{DescID: 104, ColumnID: 5}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [Column:{DescID: 104, ColumnID: 5}, PUBLIC] to: [Column:{DescID: 104, ColumnID: 5}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY - from: [Column:{DescID: 104, ColumnID: 5}, WRITE_ONLY] to: [Column:{DescID: 104, ColumnID: 5}, DELETE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY - from: [Column:{DescID: 104, ColumnID: 5}, WRITE_ONLY] to: [ColumnName:{DescID: 104, Name: crdb_internal_i_shard_16, ColumnID: 5}, ABSENT] @@ -583,11 +583,11 @@ DROP INDEX idx3 CASCADE rule: column constraint removed right before column reaches delete only - from: [ColumnNotNull:{DescID: 104, ColumnID: 5, IndexID: 0}, PUBLIC] to: [ColumnNotNull:{DescID: 104, ColumnID: 5, IndexID: 0}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [ColumnNotNull:{DescID: 104, ColumnID: 5, IndexID: 0}, VALIDATED] to: [ColumnNotNull:{DescID: 104, ColumnID: 5, IndexID: 0}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT - from: [ColumnType:{DescID: 104, ColumnFamilyID: 0, ColumnID: 5}, ABSENT] to: [Column:{DescID: 104, ColumnID: 5}, ABSENT] @@ -643,11 +643,11 @@ DROP INDEX idx3 CASCADE rule: index no longer public before index name - from: [SecondaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 0}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 0}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [SecondaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 0}, PUBLIC] to: [SecondaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 0}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [SecondaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 0}, VALIDATED] to: [Column:{DescID: 104, ColumnID: 5}, WRITE_ONLY] @@ -659,13 +659,13 @@ DROP INDEX idx3 CASCADE rule: index no longer public before dependents, excluding columns - from: [SecondaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 0}, VALIDATED] to: [SecondaryIndex:{DescID: 104, IndexID: 6, ConstraintID: 0}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY ops DROP INDEX idx4 CASCADE ---- -StatementPhase stage 1 of 1 with 14 MutationType ops +StatementPhase stage 1 of 1 with 20 MutationType ops transitions: [[SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, ABSENT], PUBLIC] -> VALIDATED [[Namespace:{DescID: 105, Name: v, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -674,13 +674,13 @@ StatementPhase stage 1 of 1 with 14 MutationType ops [[UserPrivileges:{DescID: 105, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 105}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 105, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: count, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT ops: @@ -732,6 +732,24 @@ StatementPhase stage 1 of 1 with 14 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 105 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 105 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 105 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 105 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, ABSENT], VALIDATED] -> PUBLIC @@ -741,13 +759,13 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 105, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 105}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 105, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: count, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC ops: @@ -1042,11 +1060,11 @@ DROP INDEX idx4 CASCADE rule: index no longer public before index name - from: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, DELETE_ONLY] to: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT - from: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, PUBLIC] to: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, VALIDATED] to: [IndexName:{DescID: 104, Name: idx4, IndexID: 8}, ABSENT] @@ -1054,7 +1072,7 @@ DROP INDEX idx4 CASCADE rule: index no longer public before dependents, excluding columns - from: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, VALIDATED] to: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, WRITE_ONLY] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY - from: [SecondaryIndex:{DescID: 104, IndexID: 8, ConstraintID: 5}, VALIDATED] to: [View:{DescID: 105}, ABSENT] @@ -1134,13 +1152,13 @@ DROP INDEX idx4 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 105}, DROPPED] to: [View:{DescID: 105}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal ops DROP INDEX v2@idx CASCADE; ---- -StatementPhase stage 1 of 1 with 21 MutationType ops +StatementPhase stage 1 of 1 with 34 MutationType ops transitions: [[SecondaryIndex:{DescID: 106, IndexID: 2, ConstraintID: 0}, ABSENT], PUBLIC] -> VALIDATED [[Namespace:{DescID: 107, Name: v3, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -1150,21 +1168,23 @@ StatementPhase stage 1 of 1 with 21 MutationType ops [[View:{DescID: 107}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 107, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT [[ColumnFamily:{DescID: 107, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: j, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: rowid, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[ColumnNotNull:{DescID: 107, ColumnID: 2, IndexID: 0}, ABSENT], PUBLIC] -> VALIDATED + [[ColumnNotNull:{DescID: 107, ColumnID: 2, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT [[ColumnDefaultExpression:{DescID: 107, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT - [[PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> VALIDATED + [[IndexColumn:{DescID: 107, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT [[IndexName:{DescID: 107, Name: v3_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT ops: *scop.MarkDescriptorAsDropped @@ -1235,8 +1255,50 @@ StatementPhase stage 1 of 1 with 21 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 107 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 107 + *scop.RemoveColumnNotNull + ColumnID: 2 + TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 107 *scop.AssertColumnFamilyIsRemoved TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 107 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 107 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + TableID: 107 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + Kind: 2 + TableID: 107 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 107 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[SecondaryIndex:{DescID: 106, IndexID: 2, ConstraintID: 0}, ABSENT], VALIDATED] -> PUBLIC @@ -1247,21 +1309,23 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[View:{DescID: 107}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 107, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC [[ColumnFamily:{DescID: 107, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: j, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: rowid, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[ColumnNotNull:{DescID: 107, ColumnID: 2, IndexID: 0}, ABSENT], VALIDATED] -> PUBLIC + [[ColumnNotNull:{DescID: 107, ColumnID: 2, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC [[ColumnDefaultExpression:{DescID: 107, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC - [[PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 1}, ABSENT], VALIDATED] -> PUBLIC + [[IndexColumn:{DescID: 107, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 107, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 107, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC [[IndexName:{DescID: 107, Name: v3_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC ops: *scop.UndoAllInTxnImmediateMutationOpSideEffects diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_owned_by b/pkg/sql/schemachanger/scplan/testdata/drop_owned_by index f6502ec8038a..db1d8de6dbdf 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_owned_by +++ b/pkg/sql/schemachanger/scplan/testdata/drop_owned_by @@ -17,7 +17,7 @@ CREATE VIEW s.v2 AS (SELECT 'a'::s.typ::string AS k, name FROM s.v1); ops DROP OWNED BY r ---- -StatementPhase stage 1 of 1 with 108 MutationType ops +StatementPhase stage 1 of 1 with 154 MutationType ops transitions: [[UserPrivileges:{DescID: 100, Name: r}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 105, Name: s, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -40,24 +40,27 @@ StatementPhase stage 1 of 1 with 108 MutationType ops [[Table:{DescID: 109}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 109, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT [[ColumnFamily:{DescID: 109, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: id, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> VALIDATED - [[Column:{DescID: 109, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: name, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: val, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnDefaultExpression:{DescID: 109, ColumnID: 3, ReferencedSequenceIDs: [106]}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT - [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> VALIDATED + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT [[IndexName:{DescID: 109, Name: t_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 107, Name: sq, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 107}, ABSENT], PUBLIC] -> ABSENT @@ -72,24 +75,27 @@ StatementPhase stage 1 of 1 with 108 MutationType ops [[Table:{DescID: 108}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 108, ReferencedDescID: 105}, ABSENT], PUBLIC] -> ABSENT [[ColumnFamily:{DescID: 108, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: id, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[ColumnNotNull:{DescID: 108, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> VALIDATED - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[ColumnNotNull:{DescID: 108, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: name, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: val, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnDefaultExpression:{DescID: 108, ColumnID: 3, ReferencedSequenceIDs: [107]}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT - [[PrimaryIndex:{DescID: 108, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> VALIDATED + [[IndexColumn:{DescID: 108, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 108, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 108, ColumnID: 3, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 108, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT [[IndexName:{DescID: 108, Name: t_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 110, Name: v1, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 110}, ABSENT], PUBLIC] -> ABSENT @@ -97,13 +103,13 @@ StatementPhase stage 1 of 1 with 108 MutationType ops [[UserPrivileges:{DescID: 110, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 110}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 110, ReferencedDescID: 105}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 111, Name: typ, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -127,16 +133,16 @@ StatementPhase stage 1 of 1 with 108 MutationType ops [[UserPrivileges:{DescID: 113, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 113}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 113, ReferencedDescID: 105}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: k, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: name, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT ops: @@ -393,6 +399,21 @@ StatementPhase stage 1 of 1 with 108 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 109 User: root + *scop.RemoveColumnNotNull + ColumnID: 1 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 109 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -423,6 +444,21 @@ StatementPhase stage 1 of 1 with 108 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 108 User: root + *scop.RemoveColumnNotNull + ColumnID: 1 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 108 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -438,6 +474,15 @@ StatementPhase stage 1 of 1 with 108 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 110 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 110 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -489,6 +534,18 @@ StatementPhase stage 1 of 1 with 108 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 113 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 113 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -505,8 +562,107 @@ StatementPhase stage 1 of 1 with 108 MutationType ops User: root *scop.AssertColumnFamilyIsRemoved TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 109 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 109 *scop.AssertColumnFamilyIsRemoved TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 108 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 113 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + Kind: 2 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 1 + Kind: 2 + Ordinal: 1 + TableID: 109 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + TableID: 108 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + Kind: 2 + TableID: 108 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 1 + Kind: 2 + Ordinal: 1 + TableID: 108 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 108 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[UserPrivileges:{DescID: 100, Name: r}, ABSENT], ABSENT] -> PUBLIC @@ -530,24 +686,27 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[Table:{DescID: 109}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 109, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC [[ColumnFamily:{DescID: 109, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: id, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], VALIDATED] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: name, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: val, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnDefaultExpression:{DescID: 109, ColumnID: 3, ReferencedSequenceIDs: [106]}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC - [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], VALIDATED] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC [[IndexName:{DescID: 109, Name: t_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 107, Name: sq, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC [[Owner:{DescID: 107}, ABSENT], ABSENT] -> PUBLIC @@ -562,24 +721,27 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[Table:{DescID: 108}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 108, ReferencedDescID: 105}, ABSENT], ABSENT] -> PUBLIC [[ColumnFamily:{DescID: 108, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: id, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[ColumnNotNull:{DescID: 108, ColumnID: 1, IndexID: 0}, ABSENT], VALIDATED] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[ColumnNotNull:{DescID: 108, ColumnID: 1, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: name, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: val, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnDefaultExpression:{DescID: 108, ColumnID: 3, ReferencedSequenceIDs: [107]}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC - [[PrimaryIndex:{DescID: 108, IndexID: 1, ConstraintID: 1}, ABSENT], VALIDATED] -> PUBLIC + [[IndexColumn:{DescID: 108, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 108, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 108, ColumnID: 3, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 108, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC [[IndexName:{DescID: 108, Name: t_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 110, Name: v1, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC [[Owner:{DescID: 110}, ABSENT], ABSENT] -> PUBLIC @@ -587,13 +749,13 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 110, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 110}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 110, ReferencedDescID: 105}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 111, Name: typ, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -617,16 +779,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 113, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 113}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 113, ReferencedDescID: 105}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: k, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: name, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC ops: diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_schema b/pkg/sql/schemachanger/scplan/testdata/drop_schema index 4ad137b5baa1..0c6affc864a3 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_schema +++ b/pkg/sql/schemachanger/scplan/testdata/drop_schema @@ -17,7 +17,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE ---- - from: [AliasType:{DescID: 112, ReferencedTypeIDs: [111 112]}, DROPPED] to: [AliasType:{DescID: 112, ReferencedTypeIDs: [111 112]}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [AliasType:{DescID: 112, ReferencedTypeIDs: [111 112]}, DROPPED] to: [Namespace:{DescID: 112, Name: _typ, ReferencedDescID: 100}, ABSENT] @@ -813,7 +813,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rule: non-data dependents removed before descriptor - from: [EnumType:{DescID: 111}, DROPPED] to: [EnumType:{DescID: 111}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [EnumType:{DescID: 111}, DROPPED] to: [EnumTypeValue:{DescID: 111, Name: a}, ABSENT] @@ -1005,7 +1005,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rule: descriptor dropped before dependent element removal - from: [Schema:{DescID: 104}, DROPPED] to: [Schema:{DescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Schema:{DescID: 104}, DROPPED] to: [SchemaComment:{DescID: 104, Comment: sc1 is good schema}, ABSENT] @@ -1125,7 +1125,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Sequence:{DescID: 105}, DROPPED] to: [Sequence:{DescID: 105}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Sequence:{DescID: 105}, DROPPED] to: [UserPrivileges:{DescID: 105, Name: admin}, ABSENT] @@ -1245,7 +1245,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Table:{DescID: 106}, DROPPED] to: [Table:{DescID: 106}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Table:{DescID: 106}, DROPPED] to: [TableComment:{DescID: 106, Comment: t1 is good table}, ABSENT] @@ -1413,7 +1413,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 107}, DROPPED] to: [View:{DescID: 107}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 108}, DROPPED] to: [Column:{DescID: 108, ColumnID: 1}, WRITE_ONLY] @@ -1485,7 +1485,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 108}, DROPPED] to: [View:{DescID: 108}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 109}, DROPPED] to: [Column:{DescID: 109, ColumnID: 1}, WRITE_ONLY] @@ -1557,7 +1557,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 109}, DROPPED] to: [View:{DescID: 109}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 110}, DROPPED] to: [Column:{DescID: 110, ColumnID: 1}, WRITE_ONLY] @@ -1629,7 +1629,7 @@ DROP SCHEMA defaultdb.SC1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 110}, DROPPED] to: [View:{DescID: 110}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 113}, DROPPED] to: [Column:{DescID: 113, ColumnID: 1}, WRITE_ONLY] @@ -1713,13 +1713,13 @@ DROP SCHEMA defaultdb.SC1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 113}, DROPPED] to: [View:{DescID: 113}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal ops DROP SCHEMA defaultdb.SC1 CASCADE ---- -StatementPhase stage 1 of 1 with 127 MutationType ops +StatementPhase stage 1 of 1 with 183 MutationType ops transitions: [[Namespace:{DescID: 104, Name: sc1, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 104}, ABSENT], PUBLIC] -> ABSENT @@ -1742,24 +1742,27 @@ StatementPhase stage 1 of 1 with 127 MutationType ops [[SchemaChild:{DescID: 106, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT [[TableComment:{DescID: 106, Comment: t1 is good table}, ABSENT], PUBLIC] -> ABSENT [[ColumnFamily:{DescID: 106, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: id, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[ColumnNotNull:{DescID: 106, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> VALIDATED - [[Column:{DescID: 106, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[ColumnNotNull:{DescID: 106, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 106, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: name, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: val, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnDefaultExpression:{DescID: 106, ColumnID: 3, ReferencedSequenceIDs: [105]}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT - [[PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> VALIDATED + [[IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT [[IndexName:{DescID: 106, Name: t1_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 107, Name: v1, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 107}, ABSENT], PUBLIC] -> ABSENT @@ -1767,13 +1770,13 @@ StatementPhase stage 1 of 1 with 127 MutationType ops [[UserPrivileges:{DescID: 107, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 107}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 107, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 108, Name: v2, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -1782,16 +1785,16 @@ StatementPhase stage 1 of 1 with 127 MutationType ops [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 108}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 108, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: n1, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: n2, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 109, Name: v3, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -1800,16 +1803,16 @@ StatementPhase stage 1 of 1 with 127 MutationType ops [[UserPrivileges:{DescID: 109, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 109}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 109, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: n1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 110, Name: v4, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -1818,16 +1821,16 @@ StatementPhase stage 1 of 1 with 127 MutationType ops [[UserPrivileges:{DescID: 110, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 110}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 110, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: n2, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: n1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 110, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 111, Name: typ, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -1851,19 +1854,19 @@ StatementPhase stage 1 of 1 with 127 MutationType ops [[UserPrivileges:{DescID: 113, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 113}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 113, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: k, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: n2, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: n1, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 113, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT ops: @@ -2174,6 +2177,21 @@ StatementPhase stage 1 of 1 with 127 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 106 User: root + *scop.RemoveColumnNotNull + ColumnID: 1 + TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 106 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -2189,6 +2207,15 @@ StatementPhase stage 1 of 1 with 127 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 107 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 107 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -2204,6 +2231,18 @@ StatementPhase stage 1 of 1 with 127 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 108 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 108 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -2219,6 +2258,18 @@ StatementPhase stage 1 of 1 with 127 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 109 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 109 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -2234,6 +2285,18 @@ StatementPhase stage 1 of 1 with 127 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 110 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 110 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 110 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -2285,6 +2348,21 @@ StatementPhase stage 1 of 1 with 127 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 113 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 113 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 113 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -2301,6 +2379,105 @@ StatementPhase stage 1 of 1 with 127 MutationType ops User: root *scop.AssertColumnFamilyIsRemoved TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 106 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 110 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 113 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 113 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + TableID: 106 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + Kind: 2 + TableID: 106 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 1 + Kind: 2 + Ordinal: 1 + TableID: 106 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 106 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[Namespace:{DescID: 104, Name: sc1, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -2324,24 +2501,27 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[SchemaChild:{DescID: 106, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC [[TableComment:{DescID: 106, Comment: t1 is good table}, ABSENT], ABSENT] -> PUBLIC [[ColumnFamily:{DescID: 106, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: id, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[ColumnNotNull:{DescID: 106, ColumnID: 1, IndexID: 0}, ABSENT], VALIDATED] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[ColumnNotNull:{DescID: 106, ColumnID: 1, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: name, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: val, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnDefaultExpression:{DescID: 106, ColumnID: 3, ReferencedSequenceIDs: [105]}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC - [[PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1}, ABSENT], VALIDATED] -> PUBLIC + [[IndexColumn:{DescID: 106, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 106, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 106, ColumnID: 3, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 106, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC [[IndexName:{DescID: 106, Name: t1_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 107, Name: v1, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC [[Owner:{DescID: 107}, ABSENT], ABSENT] -> PUBLIC @@ -2349,13 +2529,13 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 107, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 107}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 107, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 108, Name: v2, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -2364,16 +2544,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 108}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 108, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: n1, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: n2, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 109, Name: v3, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -2382,16 +2562,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 109, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 109}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 109, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: n1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 110, Name: v4, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -2400,16 +2580,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 110, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 110}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 110, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: n2, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: n1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 110, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 110, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 110, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 111, Name: typ, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -2433,19 +2613,19 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 113, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 113}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 113, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: k, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: n2, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: n1, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 113, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 113, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 113, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC ops: diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_sequence b/pkg/sql/schemachanger/scplan/testdata/drop_sequence index dc170774a3c4..962f0c9e12a9 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_sequence +++ b/pkg/sql/schemachanger/scplan/testdata/drop_sequence @@ -317,7 +317,7 @@ DROP SEQUENCE defaultdb.SQ1 CASCADE rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Sequence:{DescID: 104}, DROPPED] to: [Sequence:{DescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Sequence:{DescID: 104}, DROPPED] to: [UserPrivileges:{DescID: 104, Name: admin}, ABSENT] diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_table b/pkg/sql/schemachanger/scplan/testdata/drop_table index 9a72e25fe84e..c19e173c0a0b 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_table +++ b/pkg/sql/schemachanger/scplan/testdata/drop_table @@ -35,32 +35,91 @@ ALTER TABLE shipments ALTER COLUMN udfcol SET DEFAULT f1(); ops DROP TABLE defaultdb.shipments CASCADE; ---- -StatementPhase stage 1 of 1 with 23 MutationType ops +StatementPhase stage 1 of 1 with 117 MutationType ops transitions: + [[Namespace:{DescID: 109, Name: shipments, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT + [[Owner:{DescID: 109}, ABSENT], PUBLIC] -> ABSENT + [[UserPrivileges:{DescID: 109, Name: admin}, ABSENT], PUBLIC] -> ABSENT + [[UserPrivileges:{DescID: 109, Name: root}, ABSENT], PUBLIC] -> ABSENT + [[Table:{DescID: 109}, ABSENT], PUBLIC] -> DROPPED + [[SchemaChild:{DescID: 109, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT + [[TableComment:{DescID: 109, Comment: shipment is important}, ABSENT], PUBLIC] -> ABSENT + [[ColumnFamily:{DescID: 109, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: tracking_number, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[ColumnDefaultExpression:{DescID: 109, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[ColumnComment:{DescID: 109, ColumnID: 1, Comment: tracking_number is a must}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: carrier, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT + [[SequenceOwner:{DescID: 109, ColumnID: 2, ReferencedDescID: 110}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: status, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ReferencedTypeIDs: [107 108], ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 4}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: customer_id, ColumnID: 4}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 5}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: randcol, ColumnID: 5}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 5}, ABSENT], PUBLIC] -> ABSENT + [[ColumnDefaultExpression:{DescID: 109, ColumnID: 5, ReferencedSequenceIDs: [106]}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 6}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: udfcol, ColumnID: 6}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 6}, ABSENT], PUBLIC] -> ABSENT + [[ColumnDefaultExpression:{DescID: 109, ColumnID: 6, ReferencedFunctionIDs: [112]}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 4, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 5, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 6, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexName:{DescID: 109, Name: shipments_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexComment:{DescID: 109, IndexID: 1, Comment: pkey is good}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 2}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 4, IndexID: 2}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 2}, ABSENT], PUBLIC] -> ABSENT + [[SecondaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 0}, ABSENT], PUBLIC] -> ABSENT + [[IndexName:{DescID: 109, Name: partialidx, IndexID: 2}, ABSENT], PUBLIC] -> ABSENT + [[CheckConstraintUnvalidated:{DescID: 109, ConstraintID: 5, ReferencedSequenceIDs: [106]}, ABSENT], PUBLIC] -> ABSENT [[ConstraintWithoutIndexName:{DescID: 109, Name: check, ConstraintID: 5}, ABSENT], PUBLIC] -> ABSENT - [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, ABSENT], PUBLIC] -> VALIDATED + [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT [[ConstraintWithoutIndexName:{DescID: 109, Name: fk_customers, ConstraintID: 2}, ABSENT], PUBLIC] -> ABSENT [[ConstraintComment:{DescID: 109, ConstraintID: 2, Comment: customer is not god}, ABSENT], PUBLIC] -> ABSENT - [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 3, ReferencedDescID: 105}, ABSENT], PUBLIC] -> VALIDATED + [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 3, ReferencedDescID: 105}, ABSENT], PUBLIC] -> ABSENT [[ConstraintWithoutIndexName:{DescID: 109, Name: fk_orders, ConstraintID: 3}, ABSENT], PUBLIC] -> ABSENT - [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, ABSENT], PUBLIC] -> VALIDATED + [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, ABSENT], PUBLIC] -> ABSENT [[ConstraintWithoutIndexName:{DescID: 109, Name: fk_customers2, ConstraintID: 4}, ABSENT], PUBLIC] -> ABSENT + [[Namespace:{DescID: 110, Name: sq1, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT + [[Owner:{DescID: 110}, ABSENT], PUBLIC] -> ABSENT + [[UserPrivileges:{DescID: 110, Name: admin}, ABSENT], PUBLIC] -> ABSENT + [[UserPrivileges:{DescID: 110, Name: root}, ABSENT], PUBLIC] -> ABSENT + [[Sequence:{DescID: 110}, ABSENT], PUBLIC] -> DROPPED + [[SchemaChild:{DescID: 110, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 111, Name: v1, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 111}, ABSENT], PUBLIC] -> ABSENT [[UserPrivileges:{DescID: 111, Name: admin}, ABSENT], PUBLIC] -> ABSENT [[UserPrivileges:{DescID: 111, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 111}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 111, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: customer_id, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: carrier, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT ops: @@ -92,6 +151,11 @@ StatementPhase stage 1 of 1 with 23 MutationType ops ConstraintID: 4 Name: crdb_internal_constraint_4_name_placeholder TableID: 109 + *scop.MarkDescriptorAsDropped + DescriptorID: 110 + *scop.RemoveObjectParent + ObjectID: 110 + ParentSchemaID: 101 *scop.MarkDescriptorAsDropped DescriptorID: 111 *scop.RemoveBackReferencesInRelations @@ -129,6 +193,42 @@ StatementPhase stage 1 of 1 with 23 MutationType ops ColumnID: 4294967294 Name: crdb_internal_column_4294967294_name_placeholder TableID: 111 + *scop.RemoveForeignKeyBackReference + OriginConstraintID: 2 + OriginTableID: 109 + ReferencedTableID: 104 + *scop.RemoveForeignKeyConstraint + ConstraintID: 2 + TableID: 109 + *scop.RemoveForeignKeyBackReference + OriginConstraintID: 3 + OriginTableID: 109 + ReferencedTableID: 105 + *scop.RemoveForeignKeyConstraint + ConstraintID: 3 + TableID: 109 + *scop.RemoveForeignKeyBackReference + OriginConstraintID: 4 + OriginTableID: 109 + ReferencedTableID: 104 + *scop.RemoveForeignKeyConstraint + ConstraintID: 4 + TableID: 109 + *scop.DrainDescriptorName + Namespace: + DatabaseID: 100 + DescriptorID: 110 + Name: sq1 + SchemaID: 101 + *scop.NotImplementedForPublicObjects + DescID: 110 + ElementType: scpb.Owner + *scop.RemoveUserPrivileges + DescriptorID: 110 + User: admin + *scop.RemoveUserPrivileges + DescriptorID: 110 + User: root *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -144,32 +244,377 @@ StatementPhase stage 1 of 1 with 23 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 111 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 111 + *scop.MarkDescriptorAsDropped + DescriptorID: 109 + *scop.RemoveObjectParent + ObjectID: 109 + ParentSchemaID: 101 + *scop.RemoveTableComment + TableID: 109 + *scop.MakePublicColumnWriteOnly + ColumnID: 1 + TableID: 109 + *scop.SetColumnName + ColumnID: 1 + Name: crdb_internal_column_1_name_placeholder + TableID: 109 + *scop.MakePublicColumnNotNullValidated + ColumnID: 1 + TableID: 109 + *scop.RemoveColumnDefaultExpression + ColumnID: 1 + TableID: 109 + *scop.RemoveColumnComment + ColumnID: 1 + PgAttributeNum: 1 + TableID: 109 + *scop.MakePublicColumnWriteOnly + ColumnID: 2 + TableID: 109 + *scop.SetColumnName + ColumnID: 2 + Name: crdb_internal_column_2_name_placeholder + TableID: 109 + *scop.RemoveSequenceOwner + ColumnID: 2 + OwnedSequenceID: 110 + TableID: 109 + *scop.RemoveOwnerBackReferenceInSequence + SequenceID: 110 + *scop.MakePublicColumnWriteOnly + ColumnID: 3 + TableID: 109 + *scop.SetColumnName + ColumnID: 3 + Name: crdb_internal_column_3_name_placeholder + TableID: 109 + *scop.RemoveDroppedColumnType + ColumnID: 3 + TableID: 109 + *scop.UpdateTableBackReferencesInTypes + BackReferencedTableID: 109 + TypeIDs: + - 107 + - 108 + *scop.MakePublicColumnWriteOnly + ColumnID: 4 + TableID: 109 + *scop.SetColumnName + ColumnID: 4 + Name: crdb_internal_column_4_name_placeholder + TableID: 109 + *scop.MakePublicColumnWriteOnly + ColumnID: 5 + TableID: 109 + *scop.SetColumnName + ColumnID: 5 + Name: crdb_internal_column_5_name_placeholder + TableID: 109 + *scop.RemoveColumnDefaultExpression + ColumnID: 5 + TableID: 109 + *scop.UpdateTableBackReferencesInSequences + BackReferencedColumnID: 5 + BackReferencedTableID: 109 + SequenceIDs: + - 106 + *scop.MakePublicColumnWriteOnly + ColumnID: 6 + TableID: 109 + *scop.SetColumnName + ColumnID: 6 + Name: crdb_internal_column_6_name_placeholder + TableID: 109 + *scop.RemoveColumnDefaultExpression + ColumnID: 6 + TableID: 109 + *scop.RemoveTableColumnBackReferencesInFunctions + BackReferencedColumnID: 6 + BackReferencedTableID: 109 + FunctionIDs: + - 112 + *scop.MakePublicColumnWriteOnly + ColumnID: 4294967295 + TableID: 109 + *scop.SetColumnName + ColumnID: 4294967295 + Name: crdb_internal_column_4294967295_name_placeholder + TableID: 109 + *scop.MakePublicColumnWriteOnly + ColumnID: 4294967294 + TableID: 109 + *scop.SetColumnName + ColumnID: 4294967294 + Name: crdb_internal_column_4294967294_name_placeholder + TableID: 109 + *scop.MakePublicPrimaryIndexWriteOnly + IndexID: 1 + TableID: 109 + *scop.SetIndexName + IndexID: 1 + Name: crdb_internal_index_1_name_placeholder + TableID: 109 + *scop.RemoveIndexComment + IndexID: 1 + TableID: 109 + *scop.MakePublicSecondaryIndexWriteOnly + IndexID: 2 + TableID: 109 + *scop.RemoveCheckConstraint + ConstraintID: 5 + TableID: 109 + *scop.UpdateTableBackReferencesInSequences + BackReferencedTableID: 109 + SequenceIDs: + - 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 111 + *scop.DrainDescriptorName + Namespace: + DatabaseID: 100 + DescriptorID: 109 + Name: shipments + SchemaID: 101 + *scop.NotImplementedForPublicObjects + DescID: 109 + ElementType: scpb.Owner + *scop.RemoveUserPrivileges + DescriptorID: 109 + User: admin + *scop.RemoveUserPrivileges + DescriptorID: 109 + User: root + *scop.RemoveColumnNotNull + ColumnID: 1 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 5 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 6 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 109 + *scop.AssertColumnFamilyIsRemoved + TableID: 109 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 109 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 109 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 2 + TableID: 109 + *scop.RemoveDroppedIndexPartialPredicate + IndexID: 2 + TableID: 109 + *scop.UpdateTableBackReferencesInTypes + BackReferencedTableID: 109 + TypeIDs: + - 107 + - 108 + *scop.SetIndexName + IndexID: 2 + Name: crdb_internal_index_2_name_placeholder + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + Kind: 2 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 1 + Kind: 2 + Ordinal: 1 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 4 + IndexID: 1 + Kind: 2 + Ordinal: 2 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 5 + IndexID: 1 + Kind: 2 + Ordinal: 3 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 6 + IndexID: 1 + Kind: 2 + Ordinal: 4 + TableID: 109 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 2 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 4 + IndexID: 2 + Ordinal: 1 + TableID: 109 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 2 + Kind: 1 + TableID: 109 + *scop.MakeIndexAbsent + IndexID: 2 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 5 + TableID: 109 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 6 + TableID: 109 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: + [[Namespace:{DescID: 109, Name: shipments, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC + [[Owner:{DescID: 109}, ABSENT], ABSENT] -> PUBLIC + [[UserPrivileges:{DescID: 109, Name: admin}, ABSENT], ABSENT] -> PUBLIC + [[UserPrivileges:{DescID: 109, Name: root}, ABSENT], ABSENT] -> PUBLIC + [[Table:{DescID: 109}, ABSENT], DROPPED] -> PUBLIC + [[SchemaChild:{DescID: 109, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC + [[TableComment:{DescID: 109, Comment: shipment is important}, ABSENT], ABSENT] -> PUBLIC + [[ColumnFamily:{DescID: 109, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: tracking_number, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[ColumnNotNull:{DescID: 109, ColumnID: 1, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[ColumnDefaultExpression:{DescID: 109, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[ColumnComment:{DescID: 109, ColumnID: 1, Comment: tracking_number is a must}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: carrier, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC + [[SequenceOwner:{DescID: 109, ColumnID: 2, ReferencedDescID: 110}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: status, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ReferencedTypeIDs: [107 108], ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: customer_id, ColumnID: 4}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 5}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: randcol, ColumnID: 5}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 5}, ABSENT], ABSENT] -> PUBLIC + [[ColumnDefaultExpression:{DescID: 109, ColumnID: 5, ReferencedSequenceIDs: [106]}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 6}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: udfcol, ColumnID: 6}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 6}, ABSENT], ABSENT] -> PUBLIC + [[ColumnDefaultExpression:{DescID: 109, ColumnID: 6, ReferencedFunctionIDs: [112]}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 109, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 109, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 109, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 4, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 5, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 6, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 109, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexName:{DescID: 109, Name: shipments_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexComment:{DescID: 109, IndexID: 1, Comment: pkey is good}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 3, IndexID: 2}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 4, IndexID: 2}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 109, ColumnID: 1, IndexID: 2}, ABSENT], ABSENT] -> PUBLIC + [[SecondaryIndex:{DescID: 109, IndexID: 2, ConstraintID: 0}, ABSENT], ABSENT] -> PUBLIC + [[IndexName:{DescID: 109, Name: partialidx, IndexID: 2}, ABSENT], ABSENT] -> PUBLIC + [[CheckConstraintUnvalidated:{DescID: 109, ConstraintID: 5, ReferencedSequenceIDs: [106]}, ABSENT], ABSENT] -> PUBLIC [[ConstraintWithoutIndexName:{DescID: 109, Name: check, ConstraintID: 5}, ABSENT], ABSENT] -> PUBLIC - [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, ABSENT], VALIDATED] -> PUBLIC + [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC [[ConstraintWithoutIndexName:{DescID: 109, Name: fk_customers, ConstraintID: 2}, ABSENT], ABSENT] -> PUBLIC [[ConstraintComment:{DescID: 109, ConstraintID: 2, Comment: customer is not god}, ABSENT], ABSENT] -> PUBLIC - [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 3, ReferencedDescID: 105}, ABSENT], VALIDATED] -> PUBLIC + [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 3, ReferencedDescID: 105}, ABSENT], ABSENT] -> PUBLIC [[ConstraintWithoutIndexName:{DescID: 109, Name: fk_orders, ConstraintID: 3}, ABSENT], ABSENT] -> PUBLIC - [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, ABSENT], VALIDATED] -> PUBLIC + [[ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, ABSENT], ABSENT] -> PUBLIC [[ConstraintWithoutIndexName:{DescID: 109, Name: fk_customers2, ConstraintID: 4}, ABSENT], ABSENT] -> PUBLIC + [[Namespace:{DescID: 110, Name: sq1, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC + [[Owner:{DescID: 110}, ABSENT], ABSENT] -> PUBLIC + [[UserPrivileges:{DescID: 110, Name: admin}, ABSENT], ABSENT] -> PUBLIC + [[UserPrivileges:{DescID: 110, Name: root}, ABSENT], ABSENT] -> PUBLIC + [[Sequence:{DescID: 110}, ABSENT], DROPPED] -> PUBLIC + [[SchemaChild:{DescID: 110, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 111, Name: v1, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC [[Owner:{DescID: 111}, ABSENT], ABSENT] -> PUBLIC [[UserPrivileges:{DescID: 111, Name: admin}, ABSENT], ABSENT] -> PUBLIC [[UserPrivileges:{DescID: 111, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 111}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 111, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: customer_id, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: carrier, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC ops: @@ -1624,7 +2069,7 @@ DROP TABLE defaultdb.shipments CASCADE; rules: [descriptor dropped before dependent element removal; descriptor dropped right before removing back-reference in its parent descriptor] - from: [Sequence:{DescID: 110}, DROPPED] to: [Sequence:{DescID: 110}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Sequence:{DescID: 110}, DROPPED] to: [SequenceOwner:{DescID: 109, ColumnID: 2, ReferencedDescID: 110}, ABSENT] @@ -1852,7 +2297,7 @@ DROP TABLE defaultdb.shipments CASCADE; rule: descriptor dropped before dependent element removal - from: [Table:{DescID: 109}, DROPPED] to: [Table:{DescID: 109}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Table:{DescID: 109}, DROPPED] to: [TableComment:{DescID: 109, Comment: shipment is important}, ABSENT] @@ -1972,7 +2417,7 @@ DROP TABLE defaultdb.shipments CASCADE; rule: descriptor dropped before dependent element removal - from: [View:{DescID: 111}, DROPPED] to: [View:{DescID: 111}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal ops @@ -2441,11 +2886,11 @@ DROP TABLE defaultdb.customers CASCADE; rule: cross-descriptor constraint is absent before referenced descriptor is dropped - from: [ForeignKeyConstraint:{DescID: 105, IndexID: 0, ConstraintID: 3, ReferencedDescID: 104}, PUBLIC] to: [ForeignKeyConstraint:{DescID: 105, IndexID: 0, ConstraintID: 3, ReferencedDescID: 104}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [ForeignKeyConstraint:{DescID: 105, IndexID: 0, ConstraintID: 3, ReferencedDescID: 104}, VALIDATED] to: [ForeignKeyConstraint:{DescID: 105, IndexID: 0, ConstraintID: 3, ReferencedDescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT - from: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, ABSENT] to: [Table:{DescID: 104}, DROPPED] @@ -2453,11 +2898,11 @@ DROP TABLE defaultdb.customers CASCADE; rule: cross-descriptor constraint is absent before referenced descriptor is dropped - from: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, PUBLIC] to: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, VALIDATED] to: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 2, ReferencedDescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT - from: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, ABSENT] to: [Table:{DescID: 104}, DROPPED] @@ -2465,11 +2910,11 @@ DROP TABLE defaultdb.customers CASCADE; rule: cross-descriptor constraint is absent before referenced descriptor is dropped - from: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, PUBLIC] to: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, VALIDATED] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED - from: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, VALIDATED] to: [ForeignKeyConstraint:{DescID: 109, IndexID: 0, ConstraintID: 4, ReferencedDescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT - from: [IndexColumn:{DescID: 104, ColumnID: 1, IndexID: 1}, ABSENT] to: [Column:{DescID: 104, ColumnID: 1}, ABSENT] @@ -2701,7 +3146,7 @@ DROP TABLE defaultdb.customers CASCADE; rule: relation dropped before dependent index - from: [Table:{DescID: 104}, DROPPED] to: [Table:{DescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [Table:{DescID: 104}, DROPPED] to: [UserPrivileges:{DescID: 104, Name: admin}, ABSENT] @@ -2741,9 +3186,44 @@ CREATE TABLE defaultdb.greeter ( ops DROP TABLE defaultdb.greeter ---- -StatementPhase stage 1 of 1 with 2 MutationType ops +StatementPhase stage 1 of 1 with 55 MutationType ops transitions: - [[CheckConstraint:{DescID: 115, ReferencedTypeIDs: [113 114], IndexID: 0, ConstraintID: 2}, ABSENT], PUBLIC] -> VALIDATED + [[Namespace:{DescID: 115, Name: greeter, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT + [[Owner:{DescID: 115}, ABSENT], PUBLIC] -> ABSENT + [[UserPrivileges:{DescID: 115, Name: admin}, ABSENT], PUBLIC] -> ABSENT + [[UserPrivileges:{DescID: 115, Name: root}, ABSENT], PUBLIC] -> ABSENT + [[Table:{DescID: 115}, ABSENT], PUBLIC] -> DROPPED + [[SchemaChild:{DescID: 115, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT + [[ColumnFamily:{DescID: 115, Name: primary, ColumnFamilyID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 115, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 115, Name: x, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[ColumnDefaultExpression:{DescID: 115, ReferencedTypeIDs: [113 114], ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 115, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 115, Name: y, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 115, ReferencedTypeIDs: [113 114], ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT + [[ColumnNotNull:{DescID: 115, ColumnID: 2, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 115, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 115, Name: rowid, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT + [[ColumnNotNull:{DescID: 115, ColumnID: 3, IndexID: 0}, ABSENT], PUBLIC] -> ABSENT + [[ColumnDefaultExpression:{DescID: 115, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 115, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 115, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT + [[Column:{DescID: 115, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT + [[ColumnName:{DescID: 115, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 115, ColumnID: 3, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 115, ColumnID: 1, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 115, ColumnID: 2, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[PrimaryIndex:{DescID: 115, IndexID: 1, ConstraintID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexName:{DescID: 115, Name: greeter_pkey, IndexID: 1}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 115, ColumnID: 2, IndexID: 2}, ABSENT], PUBLIC] -> ABSENT + [[IndexColumn:{DescID: 115, ColumnID: 3, IndexID: 2}, ABSENT], PUBLIC] -> ABSENT + [[SecondaryIndex:{DescID: 115, IndexID: 2, ConstraintID: 0}, ABSENT], PUBLIC] -> ABSENT + [[IndexName:{DescID: 115, Name: i, IndexID: 2}, ABSENT], PUBLIC] -> ABSENT + [[CheckConstraint:{DescID: 115, ReferencedTypeIDs: [113 114], IndexID: 0, ConstraintID: 2}, ABSENT], PUBLIC] -> ABSENT [[ConstraintWithoutIndexName:{DescID: 115, Name: check, ConstraintID: 2}, ABSENT], PUBLIC] -> ABSENT ops: *scop.MakePublicCheckConstraintValidated @@ -2753,9 +3233,228 @@ StatementPhase stage 1 of 1 with 2 MutationType ops ConstraintID: 2 Name: crdb_internal_constraint_2_name_placeholder TableID: 115 + *scop.RemoveCheckConstraint + ConstraintID: 2 + TableID: 115 + *scop.UpdateTableBackReferencesInTypes + BackReferencedTableID: 115 + TypeIDs: + - 113 + - 114 + *scop.MarkDescriptorAsDropped + DescriptorID: 115 + *scop.RemoveObjectParent + ObjectID: 115 + ParentSchemaID: 101 + *scop.MakePublicColumnWriteOnly + ColumnID: 1 + TableID: 115 + *scop.SetColumnName + ColumnID: 1 + Name: crdb_internal_column_1_name_placeholder + TableID: 115 + *scop.RemoveColumnDefaultExpression + ColumnID: 1 + TableID: 115 + *scop.UpdateTableBackReferencesInTypes + BackReferencedTableID: 115 + TypeIDs: + - 113 + - 114 + *scop.MakePublicColumnWriteOnly + ColumnID: 2 + TableID: 115 + *scop.SetColumnName + ColumnID: 2 + Name: crdb_internal_column_2_name_placeholder + TableID: 115 + *scop.RemoveDroppedColumnType + ColumnID: 2 + TableID: 115 + *scop.UpdateTableBackReferencesInTypes + BackReferencedTableID: 115 + TypeIDs: + - 113 + - 114 + *scop.MakePublicColumnNotNullValidated + ColumnID: 2 + TableID: 115 + *scop.MakePublicColumnWriteOnly + ColumnID: 3 + TableID: 115 + *scop.SetColumnName + ColumnID: 3 + Name: crdb_internal_column_3_name_placeholder + TableID: 115 + *scop.MakePublicColumnNotNullValidated + ColumnID: 3 + TableID: 115 + *scop.RemoveColumnDefaultExpression + ColumnID: 3 + TableID: 115 + *scop.MakePublicColumnWriteOnly + ColumnID: 4294967295 + TableID: 115 + *scop.SetColumnName + ColumnID: 4294967295 + Name: crdb_internal_column_4294967295_name_placeholder + TableID: 115 + *scop.MakePublicColumnWriteOnly + ColumnID: 4294967294 + TableID: 115 + *scop.SetColumnName + ColumnID: 4294967294 + Name: crdb_internal_column_4294967294_name_placeholder + TableID: 115 + *scop.MakePublicPrimaryIndexWriteOnly + IndexID: 1 + TableID: 115 + *scop.SetIndexName + IndexID: 1 + Name: crdb_internal_index_1_name_placeholder + TableID: 115 + *scop.MakePublicSecondaryIndexWriteOnly + IndexID: 2 + TableID: 115 + *scop.DrainDescriptorName + Namespace: + DatabaseID: 100 + DescriptorID: 115 + Name: greeter + SchemaID: 101 + *scop.NotImplementedForPublicObjects + DescID: 115 + ElementType: scpb.Owner + *scop.RemoveUserPrivileges + DescriptorID: 115 + User: admin + *scop.RemoveUserPrivileges + DescriptorID: 115 + User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 115 + *scop.RemoveColumnNotNull + ColumnID: 2 + TableID: 115 + *scop.RemoveColumnNotNull + ColumnID: 3 + TableID: 115 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 115 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 115 + *scop.AssertColumnFamilyIsRemoved + TableID: 115 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 115 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 115 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 115 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 115 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 1 + TableID: 115 + *scop.MakeWriteOnlyIndexDeleteOnly + IndexID: 2 + TableID: 115 + *scop.RemoveDroppedIndexPartialPredicate + IndexID: 2 + TableID: 115 + *scop.UpdateTableBackReferencesInTypes + BackReferencedTableID: 115 + TypeIDs: + - 113 + - 114 + *scop.SetIndexName + IndexID: 2 + Name: crdb_internal_index_2_name_placeholder + TableID: 115 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 1 + TableID: 115 + *scop.RemoveColumnFromIndex + ColumnID: 1 + IndexID: 1 + Kind: 2 + TableID: 115 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 1 + Kind: 2 + Ordinal: 1 + TableID: 115 + *scop.MakeIndexAbsent + IndexID: 1 + TableID: 115 + *scop.RemoveColumnFromIndex + ColumnID: 2 + IndexID: 2 + TableID: 115 + *scop.RemoveColumnFromIndex + ColumnID: 3 + IndexID: 2 + Kind: 1 + TableID: 115 + *scop.MakeIndexAbsent + IndexID: 2 + TableID: 115 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 115 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 115 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 115 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: - [[CheckConstraint:{DescID: 115, ReferencedTypeIDs: [113 114], IndexID: 0, ConstraintID: 2}, ABSENT], VALIDATED] -> PUBLIC + [[Namespace:{DescID: 115, Name: greeter, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC + [[Owner:{DescID: 115}, ABSENT], ABSENT] -> PUBLIC + [[UserPrivileges:{DescID: 115, Name: admin}, ABSENT], ABSENT] -> PUBLIC + [[UserPrivileges:{DescID: 115, Name: root}, ABSENT], ABSENT] -> PUBLIC + [[Table:{DescID: 115}, ABSENT], DROPPED] -> PUBLIC + [[SchemaChild:{DescID: 115, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC + [[ColumnFamily:{DescID: 115, Name: primary, ColumnFamilyID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 115, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 115, Name: x, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[ColumnDefaultExpression:{DescID: 115, ReferencedTypeIDs: [113 114], ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 115, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 115, Name: y, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 115, ReferencedTypeIDs: [113 114], ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC + [[ColumnNotNull:{DescID: 115, ColumnID: 2, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 115, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 115, Name: rowid, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC + [[ColumnNotNull:{DescID: 115, ColumnID: 3, IndexID: 0}, ABSENT], ABSENT] -> PUBLIC + [[ColumnDefaultExpression:{DescID: 115, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 115, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 115, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC + [[Column:{DescID: 115, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC + [[ColumnName:{DescID: 115, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC + [[ColumnType:{DescID: 115, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 115, ColumnID: 3, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 115, ColumnID: 1, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 115, ColumnID: 2, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[PrimaryIndex:{DescID: 115, IndexID: 1, ConstraintID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexName:{DescID: 115, Name: greeter_pkey, IndexID: 1}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 115, ColumnID: 2, IndexID: 2}, ABSENT], ABSENT] -> PUBLIC + [[IndexColumn:{DescID: 115, ColumnID: 3, IndexID: 2}, ABSENT], ABSENT] -> PUBLIC + [[SecondaryIndex:{DescID: 115, IndexID: 2, ConstraintID: 0}, ABSENT], ABSENT] -> PUBLIC + [[IndexName:{DescID: 115, Name: i, IndexID: 2}, ABSENT], ABSENT] -> PUBLIC + [[CheckConstraint:{DescID: 115, ReferencedTypeIDs: [113 114], IndexID: 0, ConstraintID: 2}, ABSENT], ABSENT] -> PUBLIC [[ConstraintWithoutIndexName:{DescID: 115, Name: check, ConstraintID: 2}, ABSENT], ABSENT] -> PUBLIC ops: *scop.UndoAllInTxnImmediateMutationOpSideEffects diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_type b/pkg/sql/schemachanger/scplan/testdata/drop_type index c7d47f805ebe..8deccbc90389 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_type +++ b/pkg/sql/schemachanger/scplan/testdata/drop_type @@ -207,7 +207,7 @@ DROP TYPE defaultdb.typ ---- - from: [AliasType:{DescID: 105, ReferencedTypeIDs: [104 105]}, DROPPED] to: [AliasType:{DescID: 105, ReferencedTypeIDs: [104 105]}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [AliasType:{DescID: 105, ReferencedTypeIDs: [104 105]}, DROPPED] to: [Namespace:{DescID: 105, Name: _typ, ReferencedDescID: 100}, ABSENT] @@ -235,7 +235,7 @@ DROP TYPE defaultdb.typ rule: descriptor dropped before dependent element removal - from: [EnumType:{DescID: 104}, DROPPED] to: [EnumType:{DescID: 104}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [EnumType:{DescID: 104}, DROPPED] to: [EnumTypeValue:{DescID: 104, Name: a}, ABSENT] @@ -534,7 +534,7 @@ DROP TYPE defaultdb.ctyp ---- - from: [AliasType:{DescID: 107, ReferencedTypeIDs: [106 107]}, DROPPED] to: [AliasType:{DescID: 107, ReferencedTypeIDs: [106 107]}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [AliasType:{DescID: 107, ReferencedTypeIDs: [106 107]}, DROPPED] to: [Namespace:{DescID: 107, Name: _ctyp, ReferencedDescID: 100}, ABSENT] @@ -562,7 +562,7 @@ DROP TYPE defaultdb.ctyp rule: descriptor dropped before dependent element removal - from: [CompositeType:{DescID: 106}, DROPPED] to: [CompositeType:{DescID: 106}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [CompositeType:{DescID: 106}, DROPPED] to: [CompositeTypeAttrName:{DescID: 106, Name: a}, ABSENT] diff --git a/pkg/sql/schemachanger/scplan/testdata/drop_view b/pkg/sql/schemachanger/scplan/testdata/drop_view index 6f1dcf5414e6..75bf80b9bef6 100644 --- a/pkg/sql/schemachanger/scplan/testdata/drop_view +++ b/pkg/sql/schemachanger/scplan/testdata/drop_view @@ -6,7 +6,7 @@ CREATE VIEW defaultdb.v1 AS (SELECT name FROM defaultdb.t1); ops DROP VIEW defaultdb.v1 ---- -StatementPhase stage 1 of 1 with 13 MutationType ops +StatementPhase stage 1 of 1 with 19 MutationType ops transitions: [[Namespace:{DescID: 105, Name: v1, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 105}, ABSENT], PUBLIC] -> ABSENT @@ -14,13 +14,13 @@ StatementPhase stage 1 of 1 with 13 MutationType ops [[UserPrivileges:{DescID: 105, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 105}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 105, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT ops: @@ -69,6 +69,24 @@ StatementPhase stage 1 of 1 with 13 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 105 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 105 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 105 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 105 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[Namespace:{DescID: 105, Name: v1, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -77,13 +95,13 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 105, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 105}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 105, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC ops: @@ -374,7 +392,7 @@ DROP VIEW defaultdb.v1 rule: descriptor dropped before dependent element removal - from: [View:{DescID: 105}, DROPPED] to: [View:{DescID: 105}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal setup @@ -388,7 +406,7 @@ CREATE VIEW v5 AS (SELECT 'a'::defaultdb.typ::string AS k, n2, n1 from defaultdb ops DROP VIEW defaultdb.v1 CASCADE ---- -StatementPhase stage 1 of 1 with 76 MutationType ops +StatementPhase stage 1 of 1 with 116 MutationType ops transitions: [[Namespace:{DescID: 105, Name: v1, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT [[Owner:{DescID: 105}, ABSENT], PUBLIC] -> ABSENT @@ -396,13 +414,13 @@ StatementPhase stage 1 of 1 with 76 MutationType ops [[UserPrivileges:{DescID: 105, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 105}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 105, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 105, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 106, Name: v2, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -411,16 +429,16 @@ StatementPhase stage 1 of 1 with 76 MutationType ops [[UserPrivileges:{DescID: 106, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 106}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 106, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: n1, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: n2, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 106, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 107, Name: v3, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -429,16 +447,16 @@ StatementPhase stage 1 of 1 with 76 MutationType ops [[UserPrivileges:{DescID: 107, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 107}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 107, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: name, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: n1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 107, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 108, Name: v4, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -447,16 +465,16 @@ StatementPhase stage 1 of 1 with 76 MutationType ops [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 108}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: n2, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: n1, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[Namespace:{DescID: 111, Name: v5, ReferencedDescID: 100}, ABSENT], PUBLIC] -> ABSENT @@ -465,19 +483,19 @@ StatementPhase stage 1 of 1 with 76 MutationType ops [[UserPrivileges:{DescID: 111, Name: root}, ABSENT], PUBLIC] -> ABSENT [[View:{DescID: 111}, ABSENT], PUBLIC] -> DROPPED [[SchemaChild:{DescID: 111, ReferencedDescID: 101}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 1}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: k, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 2}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: n2, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 3}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: n1, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], PUBLIC] -> ABSENT - [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], PUBLIC] -> WRITE_ONLY + [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnName:{DescID: 111, Name: tableoid, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], PUBLIC] -> ABSENT ops: @@ -687,6 +705,15 @@ StatementPhase stage 1 of 1 with 76 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 105 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 105 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 105 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 105 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -702,6 +729,18 @@ StatementPhase stage 1 of 1 with 76 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 106 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 106 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 106 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -717,6 +756,18 @@ StatementPhase stage 1 of 1 with 76 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 107 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 107 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 107 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -732,6 +783,18 @@ StatementPhase stage 1 of 1 with 76 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 108 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 108 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 108 *scop.DrainDescriptorName Namespace: DatabaseID: 100 @@ -747,6 +810,81 @@ StatementPhase stage 1 of 1 with 76 MutationType ops *scop.RemoveUserPrivileges DescriptorID: 111 User: root + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 1 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 2 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 3 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967295 + TableID: 111 + *scop.MakeWriteOnlyColumnDeleteOnly + ColumnID: 4294967294 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 105 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 106 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 107 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 108 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 1 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 2 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 3 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967295 + TableID: 111 + *scop.MakeDeleteOnlyColumnAbsent + ColumnID: 4294967294 + TableID: 111 PreCommitPhase stage 1 of 2 with 1 MutationType op transitions: [[Namespace:{DescID: 105, Name: v1, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -755,13 +893,13 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 105, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 105}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 105, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 105, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 105, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 105, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 106, Name: v2, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -770,16 +908,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 106, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 106}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 106, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: n1, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: n2, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 106, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 106, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 106, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 107, Name: v3, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -788,16 +926,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 107, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 107}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 107, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: name, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: n1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 107, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 107, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 107, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 108, Name: v4, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -806,16 +944,16 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 108, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 108}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 108, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: n2, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: n1, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 108, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 108, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 108, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[Namespace:{DescID: 111, Name: v5, ReferencedDescID: 100}, ABSENT], ABSENT] -> PUBLIC @@ -824,19 +962,19 @@ PreCommitPhase stage 1 of 2 with 1 MutationType op [[UserPrivileges:{DescID: 111, Name: root}, ABSENT], ABSENT] -> PUBLIC [[View:{DescID: 111}, ABSENT], DROPPED] -> PUBLIC [[SchemaChild:{DescID: 111, ReferencedDescID: 101}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 1}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: k, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 1}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 2}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: n2, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 2}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 3}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: n1, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 3}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: crdb_internal_mvcc_timestamp, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967295}, ABSENT], ABSENT] -> PUBLIC - [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], WRITE_ONLY] -> PUBLIC + [[Column:{DescID: 111, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnName:{DescID: 111, Name: tableoid, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC [[ColumnType:{DescID: 111, ColumnFamilyID: 0, ColumnID: 4294967294}, ABSENT], ABSENT] -> PUBLIC ops: @@ -2141,7 +2279,7 @@ DROP VIEW defaultdb.v1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 105}, DROPPED] to: [View:{DescID: 105}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 106}, DROPPED] to: [Column:{DescID: 106, ColumnID: 1}, WRITE_ONLY] @@ -2213,7 +2351,7 @@ DROP VIEW defaultdb.v1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 106}, DROPPED] to: [View:{DescID: 106}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 107}, DROPPED] to: [Column:{DescID: 107, ColumnID: 1}, WRITE_ONLY] @@ -2285,7 +2423,7 @@ DROP VIEW defaultdb.v1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 107}, DROPPED] to: [View:{DescID: 107}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 108}, DROPPED] to: [Column:{DescID: 108, ColumnID: 1}, WRITE_ONLY] @@ -2357,7 +2495,7 @@ DROP VIEW defaultdb.v1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 108}, DROPPED] to: [View:{DescID: 108}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal - from: [View:{DescID: 111}, DROPPED] to: [Column:{DescID: 111, ColumnID: 1}, WRITE_ONLY] @@ -2441,5 +2579,5 @@ DROP VIEW defaultdb.v1 CASCADE rule: descriptor dropped before dependent element removal - from: [View:{DescID: 111}, DROPPED] to: [View:{DescID: 111}, ABSENT] - kind: PreviousStagePrecedence + kind: PreviousTransactionPrecedence rule: descriptor dropped in transaction before removal diff --git a/pkg/sql/schemachanger/testdata/end_to_end/create_function b/pkg/sql/schemachanger/testdata/end_to_end/create_function index 10c8b27b73a4..ec114ca46789 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/create_function +++ b/pkg/sql/schemachanger/testdata/end_to_end/create_function @@ -41,7 +41,7 @@ write *eventpb.CreateFunction to event log: SELECT ‹a› FROM ‹defaultdb›.‹public›.‹v›; SELECT nextval(‹'sq1'›);$$" tag: CREATE FUNCTION user: root -## StatementPhase stage 1 of 1 with 10 MutationType ops +## StatementPhase stage 1 of 1 with 11 MutationType ops upsert descriptor #110 - +function: @@ -88,7 +88,6 @@ upsert descriptor #110 + family: IntFamily + oid: 20 + width: 64 - + state: ADD + version: "1" + volatility: VOLATILE upsert descriptor #101 diff --git a/pkg/sql/schemachanger/testdata/end_to_end/create_function_in_txn b/pkg/sql/schemachanger/testdata/end_to_end/create_function_in_txn index b649f9c8c91e..3c73ccf895d1 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/create_function_in_txn +++ b/pkg/sql/schemachanger/testdata/end_to_end/create_function_in_txn @@ -19,7 +19,7 @@ write *eventpb.CreateFunction to event log: SQL\n\tAS $$SELECT ‹1›;$$" tag: CREATE FUNCTION user: root -## StatementPhase stage 1 of 1 with 9 MutationType ops +## StatementPhase stage 1 of 1 with 10 MutationType ops upsert descriptor #105 - +function: @@ -47,7 +47,6 @@ upsert descriptor #105 + family: IntFamily + oid: 20 + width: 64 - + state: ADD + version: "1" + volatility: VOLATILE upsert descriptor #101 diff --git a/pkg/sql/schemachanger/testdata/end_to_end/create_schema b/pkg/sql/schemachanger/testdata/end_to_end/create_schema index bf296163b5d6..b7061ff5f835 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/create_schema +++ b/pkg/sql/schemachanger/testdata/end_to_end/create_schema @@ -12,7 +12,7 @@ write *eventpb.CreateSchema to event log: statement: CREATE SCHEMA ‹defaultdb›.‹sc› tag: CREATE SCHEMA user: root -## StatementPhase stage 1 of 1 with 7 MutationType ops +## StatementPhase stage 1 of 1 with 8 MutationType ops add schema namespace entry {100 0 sc} -> 104 upsert descriptor #104 - @@ -31,7 +31,6 @@ upsert descriptor #104 + userProto: root + withGrantOption: "2" + version: 2 - + state: ADD + version: "1" upsert descriptor #100 ... diff --git a/pkg/sql/schemachanger/testdata/end_to_end/drop_index_with_materialized_view_dep b/pkg/sql/schemachanger/testdata/end_to_end/drop_index_with_materialized_view_dep index 18bcf6f9797c..1244e8722c05 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/drop_index_with_materialized_view_dep +++ b/pkg/sql/schemachanger/testdata/end_to_end/drop_index_with_materialized_view_dep @@ -45,7 +45,7 @@ write *eventpb.DropIndex to event log: tag: DROP INDEX user: root tableName: defaultdb.public.v2 -## StatementPhase stage 1 of 1 with 21 MutationType ops +## StatementPhase stage 1 of 1 with 34 MutationType ops delete object namespace entry {100 101 v3} -> 106 upsert descriptor #105 ... diff --git a/pkg/sql/schemachanger/testdata/end_to_end/drop_table b/pkg/sql/schemachanger/testdata/end_to_end/drop_table index eb6e375634e0..feaf227983b1 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/drop_table +++ b/pkg/sql/schemachanger/testdata/end_to_end/drop_table @@ -27,7 +27,7 @@ write *eventpb.DropTable to event log: tag: DROP TABLE user: root tableName: db.sc.t -## StatementPhase stage 1 of 1 with 22 MutationType ops +## StatementPhase stage 1 of 1 with 38 MutationType ops delete object namespace entry {104 106 t} -> 107 upsert descriptor #107 ... diff --git a/pkg/sql/schemachanger/testdata/end_to_end/drop_table_udf_default b/pkg/sql/schemachanger/testdata/end_to_end/drop_table_udf_default index 2329f6b38239..d7d5d4799dee 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/drop_table_udf_default +++ b/pkg/sql/schemachanger/testdata/end_to_end/drop_table_udf_default @@ -19,7 +19,7 @@ write *eventpb.DropTable to event log: tag: DROP TABLE user: root tableName: defaultdb.public.t -## StatementPhase stage 1 of 1 with 20 MutationType ops +## StatementPhase stage 1 of 1 with 33 MutationType ops delete object namespace entry {100 101 t} -> 105 upsert descriptor #104 function: diff --git a/pkg/sql/schemachanger/testdata/explain/create_function b/pkg/sql/schemachanger/testdata/explain/create_function index 3f3ff3c86495..6c2e3f89cd3c 100644 --- a/pkg/sql/schemachanger/testdata/explain/create_function +++ b/pkg/sql/schemachanger/testdata/explain/create_function @@ -28,15 +28,15 @@ Schema change plan for CREATE FUNCTION ‹defaultdb›.‹public›.‹f›(IN ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── ABSENT → DESCRIPTOR_ADDED Function:{DescID: 110 (f+)} - │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 110 (f+), ReferencedDescID: 101 (public)} - │ │ ├── ABSENT → PUBLIC FunctionName:{DescID: 110 (f+)} - │ │ ├── ABSENT → PUBLIC FunctionVolatility:{DescID: 110 (f+)} - │ │ ├── ABSENT → PUBLIC Owner:{DescID: 110 (f+)} - │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 110 (f+), Name: "admin"} - │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 110 (f+), Name: "root"} - │ │ └── ABSENT → PUBLIC FunctionBody:{DescID: 110 (f+)} - │ └── 10 Mutation operations + │ │ ├── ABSENT → PUBLIC Function:{DescID: 110 (f+)} + │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 110 (f+), ReferencedDescID: 101 (public)} + │ │ ├── ABSENT → PUBLIC FunctionName:{DescID: 110 (f+)} + │ │ ├── ABSENT → PUBLIC FunctionVolatility:{DescID: 110 (f+)} + │ │ ├── ABSENT → PUBLIC Owner:{DescID: 110 (f+)} + │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 110 (f+), Name: "admin"} + │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 110 (f+), Name: "root"} + │ │ └── ABSENT → PUBLIC FunctionBody:{DescID: 110 (f+)} + │ └── 11 Mutation operations │ ├── CreateFunctionDescriptor {"Function":{"FunctionID":110}} │ ├── SetFunctionName {"FunctionID":110,"Name":"f"} │ ├── SetFunctionVolatility {"FunctionID":110,"Volatility":1} @@ -46,18 +46,19 @@ Schema change plan for CREATE FUNCTION ‹defaultdb›.‹public›.‹f›(IN │ ├── SetFunctionBody {"Body":{"Body":"SELECT a FROM t;...","FunctionID":110}} │ ├── UpdateFunctionTypeReferences {"FunctionID":110} │ ├── UpdateFunctionRelationReferences {"FunctionID":110} - │ └── SetObjectParentID {"ObjParent":{"ChildObjectID":110,"SchemaID":101}} + │ ├── SetObjectParentID {"ObjParent":{"ChildObjectID":110,"SchemaID":101}} + │ └── MarkDescriptorAsPublic {"DescriptorID":110} └── PreCommitPhase ├── Stage 1 of 2 in PreCommitPhase │ ├── 8 elements transitioning toward PUBLIC - │ │ ├── DESCRIPTOR_ADDED → ABSENT Function:{DescID: 110 (f+)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 110 (f+), ReferencedDescID: 101 (public)} - │ │ ├── PUBLIC → ABSENT FunctionName:{DescID: 110 (f+)} - │ │ ├── PUBLIC → ABSENT FunctionVolatility:{DescID: 110 (f+)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 110 (f+)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 110 (f+), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 110 (f+), Name: "root"} - │ │ └── PUBLIC → ABSENT FunctionBody:{DescID: 110 (f+)} + │ │ ├── PUBLIC → ABSENT Function:{DescID: 110 (f+)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 110 (f+), ReferencedDescID: 101 (public)} + │ │ ├── PUBLIC → ABSENT FunctionName:{DescID: 110 (f+)} + │ │ ├── PUBLIC → ABSENT FunctionVolatility:{DescID: 110 (f+)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 110 (f+)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 110 (f+), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 110 (f+), Name: "root"} + │ │ └── PUBLIC → ABSENT FunctionBody:{DescID: 110 (f+)} │ └── 1 Mutation operation │ └── UndoAllInTxnImmediateMutationOpSideEffects └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_1_of_2 b/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_1_of_2 index 92d1d70a0fc4..b45219a13433 100644 --- a/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_1_of_2 @@ -11,14 +11,14 @@ Schema change plan for CREATE FUNCTION ‹defaultdb›.‹public›.‹t›() ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase │ ├── 7 elements transitioning toward PUBLIC - │ │ ├── ABSENT → DESCRIPTOR_ADDED Function:{DescID: 105 (t+)} - │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} - │ │ ├── ABSENT → PUBLIC FunctionName:{DescID: 105 (t+)} - │ │ ├── ABSENT → PUBLIC Owner:{DescID: 105 (t+)} - │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t+), Name: "admin"} - │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t+), Name: "root"} - │ │ └── ABSENT → PUBLIC FunctionBody:{DescID: 105 (t+)} - │ └── 9 Mutation operations + │ │ ├── ABSENT → PUBLIC Function:{DescID: 105 (t+)} + │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} + │ │ ├── ABSENT → PUBLIC FunctionName:{DescID: 105 (t+)} + │ │ ├── ABSENT → PUBLIC Owner:{DescID: 105 (t+)} + │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t+), Name: "admin"} + │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t+), Name: "root"} + │ │ └── ABSENT → PUBLIC FunctionBody:{DescID: 105 (t+)} + │ └── 10 Mutation operations │ ├── CreateFunctionDescriptor {"Function":{"FunctionID":105}} │ ├── SetFunctionName {"FunctionID":105,"Name":"t"} │ ├── UpdateOwner {"Owner":{"DescriptorID":105,"Owner":"root"}} @@ -27,17 +27,18 @@ Schema change plan for CREATE FUNCTION ‹defaultdb›.‹public›.‹t›() │ ├── SetFunctionBody {"Body":{"Body":"SELECT 1;","FunctionID":105}} │ ├── UpdateFunctionTypeReferences {"FunctionID":105} │ ├── UpdateFunctionRelationReferences {"FunctionID":105} - │ └── SetObjectParentID {"ObjParent":{"ChildObjectID":105,"SchemaID":101}} + │ ├── SetObjectParentID {"ObjParent":{"ChildObjectID":105,"SchemaID":101}} + │ └── MarkDescriptorAsPublic {"DescriptorID":105} └── PreCommitPhase ├── Stage 1 of 2 in PreCommitPhase │ ├── 7 elements transitioning toward PUBLIC - │ │ ├── DESCRIPTOR_ADDED → ABSENT Function:{DescID: 105 (t+)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} - │ │ ├── PUBLIC → ABSENT FunctionName:{DescID: 105 (t+)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (t+)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "root"} - │ │ └── PUBLIC → ABSENT FunctionBody:{DescID: 105 (t+)} + │ │ ├── PUBLIC → ABSENT Function:{DescID: 105 (t+)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} + │ │ ├── PUBLIC → ABSENT FunctionName:{DescID: 105 (t+)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (t+)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "root"} + │ │ └── PUBLIC → ABSENT FunctionBody:{DescID: 105 (t+)} │ └── 1 Mutation operation │ └── UndoAllInTxnImmediateMutationOpSideEffects └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_2_of_2 b/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_2_of_2 index 8b5bfb230a5d..723b9f70d832 100644 --- a/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain/create_function_in_txn.statement_2_of_2 @@ -32,22 +32,22 @@ Schema change plan for CREATE UNIQUE INDEX ‹idx› ON ‹defaultdb›.‹publi ├── PreCommitPhase │ ├── Stage 1 of 2 in PreCommitPhase │ │ ├── 12 elements transitioning toward PUBLIC - │ │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (t+)} - │ │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "admin"} - │ │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "root"} - │ │ │ ├── DESCRIPTOR_ADDED → ABSENT Function:{DescID: 105 (t+)} - │ │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} - │ │ │ ├── PUBLIC → ABSENT FunctionName:{DescID: 105 (t+)} - │ │ │ ├── PUBLIC → ABSENT FunctionBody:{DescID: 105 (t+)} - │ │ │ ├── BACKFILL_ONLY → ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} - │ │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx+)} - │ │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (idx+)} - │ │ │ ├── PUBLIC → ABSENT IndexData:{DescID: 104 (t), IndexID: 2 (idx+)} - │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx+)} + │ │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (t+)} + │ │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "admin"} + │ │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t+), Name: "root"} + │ │ │ ├── PUBLIC → ABSENT Function:{DescID: 105 (t+)} + │ │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} + │ │ │ ├── PUBLIC → ABSENT FunctionName:{DescID: 105 (t+)} + │ │ │ ├── PUBLIC → ABSENT FunctionBody:{DescID: 105 (t+)} + │ │ │ ├── BACKFILL_ONLY → ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx+)} + │ │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (idx+)} + │ │ │ ├── PUBLIC → ABSENT IndexData:{DescID: 104 (t), IndexID: 2 (idx+)} + │ │ │ └── PUBLIC → ABSENT IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx+)} │ │ ├── 3 elements transitioning toward TRANSIENT_ABSENT - │ │ │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} - │ │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} - │ │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} + │ │ │ ├── DELETE_ONLY → ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} + │ │ │ └── PUBLIC → ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} │ │ └── 1 Mutation operation │ │ └── UndoAllInTxnImmediateMutationOpSideEffects │ └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/sql/schemachanger/testdata/explain/create_schema b/pkg/sql/schemachanger/testdata/explain/create_schema index 9f25ff8bce52..ac494ac04500 100644 --- a/pkg/sql/schemachanger/testdata/explain/create_schema +++ b/pkg/sql/schemachanger/testdata/explain/create_schema @@ -7,31 +7,32 @@ Schema change plan for CREATE SCHEMA ‹defaultdb›.‹sc›; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase │ ├── 7 elements transitioning toward PUBLIC - │ │ ├── ABSENT → DESCRIPTOR_ADDED Schema:{DescID: 104 (sc+)} - │ │ ├── ABSENT → PUBLIC SchemaName:{DescID: 104 (sc+)} - │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 104 (sc+), Name: "sc", ReferencedDescID: 100 (defaultdb)} - │ │ ├── ABSENT → PUBLIC SchemaParent:{DescID: 104 (sc+), ReferencedDescID: 100 (defaultdb)} - │ │ ├── ABSENT → PUBLIC Owner:{DescID: 104 (sc+)} - │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (sc+), Name: "admin"} - │ │ └── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (sc+), Name: "root"} - │ └── 7 Mutation operations + │ │ ├── ABSENT → PUBLIC Schema:{DescID: 104 (sc+)} + │ │ ├── ABSENT → PUBLIC SchemaName:{DescID: 104 (sc+)} + │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 104 (sc+), Name: "sc", ReferencedDescID: 100 (defaultdb)} + │ │ ├── ABSENT → PUBLIC SchemaParent:{DescID: 104 (sc+), ReferencedDescID: 100 (defaultdb)} + │ │ ├── ABSENT → PUBLIC Owner:{DescID: 104 (sc+)} + │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (sc+), Name: "admin"} + │ │ └── ABSENT → PUBLIC UserPrivileges:{DescID: 104 (sc+), Name: "root"} + │ └── 8 Mutation operations │ ├── CreateSchemaDescriptor {"SchemaID":104} │ ├── SetSchemaName {"Name":"sc","SchemaID":104} │ ├── AddDescriptorName {"Namespace":{"DatabaseID":100,"DescriptorID":104,"Name":"sc"}} │ ├── AddSchemaParent {"Parent":{"ParentDatabaseID":100,"SchemaID":104}} │ ├── UpdateOwner {"Owner":{"DescriptorID":104,"Owner":"root"}} │ ├── UpdateUserPrivileges {"Privileges":{"DescriptorID":104,"Privileges":2,"UserName":"admin","WithGrantOption":2}} - │ └── UpdateUserPrivileges {"Privileges":{"DescriptorID":104,"Privileges":2,"UserName":"root","WithGrantOption":2}} + │ ├── UpdateUserPrivileges {"Privileges":{"DescriptorID":104,"Privileges":2,"UserName":"root","WithGrantOption":2}} + │ └── MarkDescriptorAsPublic {"DescriptorID":104} └── PreCommitPhase ├── Stage 1 of 2 in PreCommitPhase │ ├── 7 elements transitioning toward PUBLIC - │ │ ├── DESCRIPTOR_ADDED → ABSENT Schema:{DescID: 104 (sc+)} - │ │ ├── PUBLIC → ABSENT SchemaName:{DescID: 104 (sc+)} - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 104 (sc+), Name: "sc", ReferencedDescID: 100 (defaultdb)} - │ │ ├── PUBLIC → ABSENT SchemaParent:{DescID: 104 (sc+), ReferencedDescID: 100 (defaultdb)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 104 (sc+)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (sc+), Name: "admin"} - │ │ └── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (sc+), Name: "root"} + │ │ ├── PUBLIC → ABSENT Schema:{DescID: 104 (sc+)} + │ │ ├── PUBLIC → ABSENT SchemaName:{DescID: 104 (sc+)} + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 104 (sc+), Name: "sc", ReferencedDescID: 100 (defaultdb)} + │ │ ├── PUBLIC → ABSENT SchemaParent:{DescID: 104 (sc+), ReferencedDescID: 100 (defaultdb)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 104 (sc+)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (sc+), Name: "admin"} + │ │ └── PUBLIC → ABSENT UserPrivileges:{DescID: 104 (sc+), Name: "root"} │ └── 1 Mutation operation │ └── UndoAllInTxnImmediateMutationOpSideEffects └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/sql/schemachanger/testdata/explain/drop_index_with_materialized_view_dep b/pkg/sql/schemachanger/testdata/explain/drop_index_with_materialized_view_dep index 539249d87136..ba3c6aff0aad 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_index_with_materialized_view_dep +++ b/pkg/sql/schemachanger/testdata/explain/drop_index_with_materialized_view_dep @@ -10,32 +10,34 @@ EXPLAIN (ddl) DROP INDEX idx CASCADE; Schema change plan for DROP INDEX ‹defaultdb›.‹public›.‹v2›@‹idx› CASCADE; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 24 elements transitioning toward ABSENT - │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 106 (v3-), Name: "v3", ReferencedDescID: 100 (defaultdb)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 106 (v3-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (v3-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (v3-), Name: "root"} - │ │ ├── PUBLIC → DROPPED View:{DescID: 106 (v3-)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 106 (v3-), ReferencedDescID: 101 (public)} - │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 106 (v3-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 1 (j-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "j", ColumnID: 1 (j-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (j-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "rowid", ColumnID: 2 (rowid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (rowid-)} - │ │ ├── PUBLIC → VALIDATED ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} - │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106 (v3-), Name: "v3_pkey", IndexID: 1 (v3_pkey-)} - │ └── 21 Mutation operations + │ ├── 26 elements transitioning toward ABSENT + │ │ ├── PUBLIC → VALIDATED SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 106 (v3-), Name: "v3", ReferencedDescID: 100 (defaultdb)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 106 (v3-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (v3-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 106 (v3-), Name: "root"} + │ │ ├── PUBLIC → DROPPED View:{DescID: 106 (v3-)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 106 (v3-), ReferencedDescID: 101 (public)} + │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 106 (v3-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 106 (v3-), ColumnID: 1 (j-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "j", ColumnID: 1 (j-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (j-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "rowid", ColumnID: 2 (rowid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (rowid-)} + │ │ ├── PUBLIC → ABSENT ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} + │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 106 (v3-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 106 (v3-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 106 (v3-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 1 (v3_pkey-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 106 (v3-), ColumnID: 1 (j-), IndexID: 1 (v3_pkey-)} + │ │ ├── PUBLIC → ABSENT PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 106 (v3-), Name: "v3_pkey", IndexID: 1 (v3_pkey-)} + │ └── 34 Mutation operations │ ├── MarkDescriptorAsDropped {"DescriptorID":106} │ ├── RemoveBackReferencesInRelations {"BackReferencedID":106} │ ├── RemoveObjectParent {"ObjectID":106,"ParentSchemaID":101} @@ -56,34 +58,49 @@ Schema change plan for DROP INDEX ‹defaultdb›.‹public›.‹v2›@‹idx │ ├── NotImplementedForPublicObjects {"DescID":106,"ElementType":"scpb.Owner"} │ ├── RemoveUserPrivileges {"DescriptorID":106,"User":"admin"} │ ├── RemoveUserPrivileges {"DescriptorID":106,"User":"root"} - │ └── AssertColumnFamilyIsRemoved {"TableID":106} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":1,"TableID":106} + │ ├── RemoveColumnNotNull {"ColumnID":2,"TableID":106} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967295,"TableID":106} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967294,"TableID":106} + │ ├── AssertColumnFamilyIsRemoved {"TableID":106} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":2,"TableID":106} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967295,"TableID":106} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967294,"TableID":106} + │ ├── MakeWriteOnlyIndexDeleteOnly {"IndexID":1,"TableID":106} + │ ├── RemoveColumnFromIndex {"ColumnID":2,"IndexID":1,"TableID":106} + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":1,"Kind":2,"TableID":106} + │ ├── MakeIndexAbsent {"IndexID":1,"TableID":106} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":1,"TableID":106} + │ └── MakeDeleteOnlyColumnAbsent {"ColumnID":2,"TableID":106} ├── PreCommitPhase │ ├── Stage 1 of 2 in PreCommitPhase - │ │ ├── 24 elements transitioning toward ABSENT - │ │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 106 (v3-), Name: "v3", ReferencedDescID: 100 (defaultdb)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 106 (v3-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (v3-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (v3-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC View:{DescID: 106 (v3-)} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 106 (v3-), ReferencedDescID: 101 (public)} - │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 106 (v3-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 1 (j-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "j", ColumnID: 1 (j-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (j-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "rowid", ColumnID: 2 (rowid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (rowid-)} - │ │ │ ├── VALIDATED → PUBLIC ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} - │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} - │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 106 (v3-), Name: "v3_pkey", IndexID: 1 (v3_pkey-)} + │ │ ├── 26 elements transitioning toward ABSENT + │ │ │ ├── VALIDATED → PUBLIC SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 106 (v3-), Name: "v3", ReferencedDescID: 100 (defaultdb)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 106 (v3-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (v3-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 106 (v3-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC View:{DescID: 106 (v3-)} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 106 (v3-), ReferencedDescID: 101 (public)} + │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 106 (v3-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 1 (j-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "j", ColumnID: 1 (j-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (j-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "rowid", ColumnID: 2 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} + │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 106 (v3-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 106 (v3-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 1 (v3_pkey-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 106 (v3-), ColumnID: 1 (j-), IndexID: 1 (v3_pkey-)} + │ │ │ ├── ABSENT → PUBLIC PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} + │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 106 (v3-), Name: "v3_pkey", IndexID: 1 (v3_pkey-)} │ │ └── 1 Mutation operation │ │ └── UndoAllInTxnImmediateMutationOpSideEffects │ └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/sql/schemachanger/testdata/explain/drop_table b/pkg/sql/schemachanger/testdata/explain/drop_table index b487865e0bea..b707c7a3e88d 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_table +++ b/pkg/sql/schemachanger/testdata/explain/drop_table @@ -11,35 +11,38 @@ EXPLAIN (ddl) DROP TABLE db.sc.t; Schema change plan for DROP TABLE ‹db›.‹sc›.‹t›; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 27 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 107 (t-), Name: "t", ReferencedDescID: 104 (db)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 107 (t-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (t-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (t-), Name: "root"} - │ │ ├── PUBLIC → DROPPED Table:{DescID: 107 (t-)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 107 (t-), ReferencedDescID: 106 (sc)} - │ │ ├── PUBLIC → ABSENT TableComment:{DescID: 107 (t-), Comment: "t has a comment"} - │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 107 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 1 (k-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "k", ColumnID: 1 (k-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 2 (v-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "v", ColumnID: 2 (v-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (v-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "rowid", ColumnID: 3 (rowid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 3 (rowid-)} - │ │ ├── PUBLIC → VALIDATED ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} - │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 107 (t-), ColumnID: 3 (rowid-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 107 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} - │ └── 22 Mutation operations + │ ├── 30 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 107 (t-), Name: "t", ReferencedDescID: 104 (db)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 107 (t-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (t-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 107 (t-), Name: "root"} + │ │ ├── PUBLIC → DROPPED Table:{DescID: 107 (t-)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 107 (t-), ReferencedDescID: 106 (sc)} + │ │ ├── PUBLIC → ABSENT TableComment:{DescID: 107 (t-), Comment: "t has a comment"} + │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 107 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 107 (t-), ColumnID: 1 (k-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "k", ColumnID: 1 (k-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 107 (t-), ColumnID: 2 (v-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "v", ColumnID: 2 (v-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (v-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "rowid", ColumnID: 3 (rowid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 3 (rowid-)} + │ │ ├── PUBLIC → ABSENT ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} + │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 107 (t-), ColumnID: 3 (rowid-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 107 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 107 (t-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 107 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 1 (t_pkey-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 1 (k-), IndexID: 1 (t_pkey-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 2 (v-), IndexID: 1 (t_pkey-)} + │ │ ├── PUBLIC → ABSENT PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 107 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} + │ └── 38 Mutation operations │ ├── MarkDescriptorAsDropped {"DescriptorID":107} │ ├── RemoveObjectParent {"ObjectID":107,"ParentSchemaID":106} │ ├── RemoveTableComment {"TableID":107} @@ -61,37 +64,56 @@ Schema change plan for DROP TABLE ‹db›.‹sc›.‹t›; │ ├── NotImplementedForPublicObjects {"DescID":107,"ElementType":"scpb.Owner"} │ ├── RemoveUserPrivileges {"DescriptorID":107,"User":"admin"} │ ├── RemoveUserPrivileges {"DescriptorID":107,"User":"root"} - │ └── AssertColumnFamilyIsRemoved {"TableID":107} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":1,"TableID":107} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":2,"TableID":107} + │ ├── RemoveColumnNotNull {"ColumnID":3,"TableID":107} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967295,"TableID":107} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967294,"TableID":107} + │ ├── AssertColumnFamilyIsRemoved {"TableID":107} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":3,"TableID":107} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967295,"TableID":107} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967294,"TableID":107} + │ ├── MakeWriteOnlyIndexDeleteOnly {"IndexID":1,"TableID":107} + │ ├── RemoveColumnFromIndex {"ColumnID":3,"IndexID":1,"TableID":107} + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":1,"Kind":2,"TableID":107} + │ ├── RemoveColumnFromIndex {"ColumnID":2,"IndexID":1,"Kind":2,"Ordinal":1,"TableID":107} + │ ├── MakeIndexAbsent {"IndexID":1,"TableID":107} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":1,"TableID":107} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":2,"TableID":107} + │ └── MakeDeleteOnlyColumnAbsent {"ColumnID":3,"TableID":107} ├── PreCommitPhase │ ├── Stage 1 of 2 in PreCommitPhase - │ │ ├── 27 elements transitioning toward ABSENT - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 107 (t-), Name: "t", ReferencedDescID: 104 (db)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 107 (t-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (t-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (t-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 107 (t-)} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 107 (t-), ReferencedDescID: 106 (sc)} - │ │ │ ├── ABSENT → PUBLIC TableComment:{DescID: 107 (t-), Comment: "t has a comment"} - │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 107 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 107 (t-), ColumnID: 1 (k-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "k", ColumnID: 1 (k-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 107 (t-), ColumnID: 2 (v-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "v", ColumnID: 2 (v-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (v-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "rowid", ColumnID: 3 (rowid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 3 (rowid-)} - │ │ │ ├── VALIDATED → PUBLIC ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} - │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 107 (t-), ColumnID: 3 (rowid-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 107 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 107 (t-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} - │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 107 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} + │ │ ├── 30 elements transitioning toward ABSENT + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 107 (t-), Name: "t", ReferencedDescID: 104 (db)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 107 (t-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (t-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 107 (t-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 107 (t-)} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 107 (t-), ReferencedDescID: 106 (sc)} + │ │ │ ├── ABSENT → PUBLIC TableComment:{DescID: 107 (t-), Comment: "t has a comment"} + │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 107 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 107 (t-), ColumnID: 1 (k-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "k", ColumnID: 1 (k-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 107 (t-), ColumnID: 2 (v-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "v", ColumnID: 2 (v-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (v-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "rowid", ColumnID: 3 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 3 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} + │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 107 (t-), ColumnID: 3 (rowid-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 107 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 107 (t-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 107 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 1 (t_pkey-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 107 (t-), ColumnID: 1 (k-), IndexID: 1 (t_pkey-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 107 (t-), ColumnID: 2 (v-), IndexID: 1 (t_pkey-)} + │ │ │ ├── ABSENT → PUBLIC PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 107 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} │ │ └── 1 Mutation operation │ │ └── UndoAllInTxnImmediateMutationOpSideEffects │ └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/sql/schemachanger/testdata/explain/drop_table_udf_default b/pkg/sql/schemachanger/testdata/explain/drop_table_udf_default index fa492365d230..e1586e877d77 100644 --- a/pkg/sql/schemachanger/testdata/explain/drop_table_udf_default +++ b/pkg/sql/schemachanger/testdata/explain/drop_table_udf_default @@ -8,31 +8,33 @@ EXPLAIN (ddl) DROP TABLE t; Schema change plan for DROP TABLE ‹defaultdb›.‹public›.‹t›; ├── StatementPhase │ └── Stage 1 of 1 in StatementPhase - │ ├── 23 elements transitioning toward ABSENT - │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 105 (t-), Name: "t", ReferencedDescID: 100 (defaultdb)} - │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (t-)} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t-), Name: "admin"} - │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} - │ │ ├── PUBLIC → DROPPED Table:{DescID: 105 (t-)} - │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (public)} - │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 105 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 1 (i-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "i", ColumnID: 1 (i-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (i-)} - │ │ ├── PUBLIC → VALIDATED ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 2 (b-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "b", ColumnID: 2 (b-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (b-)} - │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 105 (t-), ColumnID: 2 (b-), ReferencedFunctionIDs: [104 (#104)]} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ ├── PUBLIC → WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ ├── PUBLIC → VALIDATED PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} - │ │ └── PUBLIC → ABSENT IndexName:{DescID: 105 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} - │ └── 20 Mutation operations + │ ├── 25 elements transitioning toward ABSENT + │ │ ├── PUBLIC → ABSENT Namespace:{DescID: 105 (t-), Name: "t", ReferencedDescID: 100 (defaultdb)} + │ │ ├── PUBLIC → ABSENT Owner:{DescID: 105 (t-)} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t-), Name: "admin"} + │ │ ├── PUBLIC → ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} + │ │ ├── PUBLIC → DROPPED Table:{DescID: 105 (t-)} + │ │ ├── PUBLIC → ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (public)} + │ │ ├── PUBLIC → ABSENT ColumnFamily:{DescID: 105 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 105 (t-), ColumnID: 1 (i-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "i", ColumnID: 1 (i-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (i-)} + │ │ ├── PUBLIC → ABSENT ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 105 (t-), ColumnID: 2 (b-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "b", ColumnID: 2 (b-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (b-)} + │ │ ├── PUBLIC → ABSENT ColumnDefaultExpression:{DescID: 105 (t-), ColumnID: 2 (b-), ReferencedFunctionIDs: [104 (#104)]} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 105 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ ├── PUBLIC → ABSENT Column:{DescID: 105 (t-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnName:{DescID: 105 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 1 (t_pkey-)} + │ │ ├── PUBLIC → ABSENT IndexColumn:{DescID: 105 (t-), ColumnID: 2 (b-), IndexID: 1 (t_pkey-)} + │ │ ├── PUBLIC → ABSENT PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── PUBLIC → ABSENT IndexName:{DescID: 105 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} + │ └── 33 Mutation operations │ ├── MarkDescriptorAsDropped {"DescriptorID":105} │ ├── RemoveObjectParent {"ObjectID":105,"ParentSchemaID":101} │ ├── MakePublicColumnWriteOnly {"ColumnID":1,"TableID":105} @@ -52,33 +54,48 @@ Schema change plan for DROP TABLE ‹defaultdb›.‹public›.‹t›; │ ├── NotImplementedForPublicObjects {"DescID":105,"ElementType":"scpb.Owner"} │ ├── RemoveUserPrivileges {"DescriptorID":105,"User":"admin"} │ ├── RemoveUserPrivileges {"DescriptorID":105,"User":"root"} - │ └── AssertColumnFamilyIsRemoved {"TableID":105} + │ ├── RemoveColumnNotNull {"ColumnID":1,"TableID":105} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":2,"TableID":105} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967295,"TableID":105} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":4294967294,"TableID":105} + │ ├── AssertColumnFamilyIsRemoved {"TableID":105} + │ ├── MakeWriteOnlyColumnDeleteOnly {"ColumnID":1,"TableID":105} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967295,"TableID":105} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":4294967294,"TableID":105} + │ ├── MakeWriteOnlyIndexDeleteOnly {"IndexID":1,"TableID":105} + │ ├── RemoveColumnFromIndex {"ColumnID":1,"IndexID":1,"TableID":105} + │ ├── RemoveColumnFromIndex {"ColumnID":2,"IndexID":1,"Kind":2,"TableID":105} + │ ├── MakeIndexAbsent {"IndexID":1,"TableID":105} + │ ├── MakeDeleteOnlyColumnAbsent {"ColumnID":1,"TableID":105} + │ └── MakeDeleteOnlyColumnAbsent {"ColumnID":2,"TableID":105} ├── PreCommitPhase │ ├── Stage 1 of 2 in PreCommitPhase - │ │ ├── 23 elements transitioning toward ABSENT - │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 105 (t-), Name: "t", ReferencedDescID: 100 (defaultdb)} - │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 105 (t-)} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t-), Name: "admin"} - │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t-), Name: "root"} - │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 105 (t-)} - │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (public)} - │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 105 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 105 (t-), ColumnID: 1 (i-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "i", ColumnID: 1 (i-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (i-)} - │ │ │ ├── VALIDATED → PUBLIC ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 105 (t-), ColumnID: 2 (b-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "b", ColumnID: 2 (b-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (b-)} - │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 105 (t-), ColumnID: 2 (b-), ReferencedFunctionIDs: [104 (#104)]} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 105 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} - │ │ │ ├── WRITE_ONLY → PUBLIC Column:{DescID: 105 (t-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} - │ │ │ ├── VALIDATED → PUBLIC PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} - │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 105 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} + │ │ ├── 25 elements transitioning toward ABSENT + │ │ │ ├── ABSENT → PUBLIC Namespace:{DescID: 105 (t-), Name: "t", ReferencedDescID: 100 (defaultdb)} + │ │ │ ├── ABSENT → PUBLIC Owner:{DescID: 105 (t-)} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t-), Name: "admin"} + │ │ │ ├── ABSENT → PUBLIC UserPrivileges:{DescID: 105 (t-), Name: "root"} + │ │ │ ├── DROPPED → PUBLIC Table:{DescID: 105 (t-)} + │ │ │ ├── ABSENT → PUBLIC SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (public)} + │ │ │ ├── ABSENT → PUBLIC ColumnFamily:{DescID: 105 (t-), Name: "primary", ColumnFamilyID: 0 (primary-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 105 (t-), ColumnID: 1 (i-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "i", ColumnID: 1 (i-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (i-)} + │ │ │ ├── ABSENT → PUBLIC ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 105 (t-), ColumnID: 2 (b-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "b", ColumnID: 2 (b-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (b-)} + │ │ │ ├── ABSENT → PUBLIC ColumnDefaultExpression:{DescID: 105 (t-), ColumnID: 2 (b-), ReferencedFunctionIDs: [104 (#104)]} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 105 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} + │ │ │ ├── ABSENT → PUBLIC Column:{DescID: 105 (t-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnName:{DescID: 105 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 1 (t_pkey-)} + │ │ │ ├── ABSENT → PUBLIC IndexColumn:{DescID: 105 (t-), ColumnID: 2 (b-), IndexID: 1 (t_pkey-)} + │ │ │ ├── ABSENT → PUBLIC PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── ABSENT → PUBLIC IndexName:{DescID: 105 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} │ │ └── 1 Mutation operation │ │ └── UndoAllInTxnImmediateMutationOpSideEffects │ └── Stage 2 of 2 in PreCommitPhase diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column b/pkg/sql/schemachanger/testdata/explain_verbose/add_column index 4c977191dc90..a17538d63812 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j+)} @@ -49,7 +49,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -87,7 +87,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -254,7 +254,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j+)} @@ -283,7 +283,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -321,7 +321,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -463,7 +463,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106 (tbl), ColumnID: 3 (j+)} @@ -475,7 +475,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ ├── • SameStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column writable right before column constraint is enforced." │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT @@ -486,7 +486,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -532,7 +532,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -561,7 +561,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -584,7 +584,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -607,7 +607,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -624,7 +624,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -647,7 +647,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} @@ -656,7 +656,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "index is ready to be validated before we validate constraint on it" │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 2 Validation operations @@ -679,7 +679,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j+)} @@ -709,7 +709,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey+)} @@ -737,7 +737,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "column existence precedes column dependents" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT @@ -745,7 +745,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -771,7 +771,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} @@ -848,7 +848,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -877,7 +877,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 6 Mutation operations @@ -933,7 +933,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL DEFAU │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 2 (k), IndexID: 1 (tbl_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_1_of_7 index 70e89e67df5e..4a26a28668d1 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_1_of_7 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -103,7 +103,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_2_of_7 index e043fca71c78..357a6ab4cbb0 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_2_of_7 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -36,7 +36,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -102,7 +102,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -182,7 +182,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_3_of_7 index 3c6f2bf05e14..751df477c1ba 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_3_of_7 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -36,7 +36,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -102,7 +102,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -182,7 +182,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_4_of_7 index 1b9b6c52f0d1..3d00277fa09f 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_4_of_7 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -36,7 +36,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -102,7 +102,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -182,7 +182,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_5_of_7 index 740784129193..88fab347c0b8 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_5_of_7 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -36,7 +36,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -63,7 +63,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -90,7 +90,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -170,7 +170,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -213,7 +213,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -237,7 +237,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_6_of_7 index d7f261becd81..f400577cab75 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_6_of_7 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -36,7 +36,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -63,7 +63,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -90,7 +90,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -170,7 +170,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -213,7 +213,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -237,7 +237,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_7_of_7 index 31031e1209af..70b936426bfe 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column.rollback_7_of_7 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -36,7 +36,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -63,7 +63,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -90,7 +90,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -170,7 +170,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -213,7 +213,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -237,7 +237,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} 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 721d94c6d3ae..e6c9f09628c3 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l+)} @@ -46,7 +46,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -78,7 +78,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -227,7 +227,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l+)} @@ -256,7 +256,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -288,7 +288,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -423,7 +423,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106 (tbl), ColumnID: 2 (l+), ReferencedSequenceIDs: [107 (sq1)]} @@ -435,7 +435,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ ├── • SameStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ rule: "column writable right before column constraint is enforced." │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l+), IndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l+), IndexID: 2 (tbl_pkey+)} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT @@ -446,7 +446,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -492,7 +492,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -518,7 +518,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -544,7 +544,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -570,7 +570,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -587,7 +587,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -613,7 +613,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l+), IndexID: 2 (tbl_pkey+)} @@ -622,7 +622,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "index is ready to be validated before we validate constraint on it" │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l+), IndexID: 2 (tbl_pkey+)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 2 Validation operations @@ -645,7 +645,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l+)} @@ -675,7 +675,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey+)} @@ -700,7 +700,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l+)} │ │ │ rule: "column existence precedes column dependents" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l+), IndexID: 2 (tbl_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 3 elements transitioning toward TRANSIENT_ABSENT @@ -708,7 +708,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -728,7 +728,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} @@ -801,7 +801,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -821,7 +821,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 6 Mutation operations @@ -871,7 +871,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN l INT NOT NULL DEFAU │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_1_of_7 index ed22cb1b684e..e9fad7a107b2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_1_of_7 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l-)} @@ -58,7 +58,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -91,7 +91,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_2_of_7 index 7932c1a24ad4..08d42d310c9e 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_2_of_7 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} @@ -33,7 +33,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -63,7 +63,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} @@ -153,7 +153,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l-)} @@ -202,7 +202,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_3_of_7 index ac94e8d4ce0f..71e45ca9799c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_3_of_7 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} @@ -33,7 +33,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -63,7 +63,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} @@ -153,7 +153,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l-)} @@ -202,7 +202,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_4_of_7 index 1a500527b975..98e11499ec04 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_4_of_7 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} @@ -33,7 +33,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -63,7 +63,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} @@ -153,7 +153,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l-)} @@ -202,7 +202,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_5_of_7 index 6202167fabe9..a2c14a061c5b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_5_of_7 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} @@ -33,7 +33,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} @@ -144,7 +144,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l-)} @@ -187,7 +187,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -208,7 +208,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_6_of_7 index 44b1c45d216a..269a3a0ac1d7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_6_of_7 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} @@ -33,7 +33,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} @@ -144,7 +144,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l-)} @@ -187,7 +187,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -208,7 +208,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_7_of_7 index 59295796e259..8988213aad5f 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_seq.rollback_7_of_7 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} @@ -33,7 +33,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 2 (l-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} @@ -144,7 +144,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (l-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "l", ColumnID: 2 (l-)} @@ -187,7 +187,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -208,7 +208,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique index 2209a60ceae9..836a08a163ae 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j+)} @@ -45,7 +45,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -77,7 +77,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -219,7 +219,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j+)} @@ -248,7 +248,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -280,7 +280,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -404,7 +404,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC ColumnDefaultExpression:{DescID: 106 (tbl), ColumnID: 2 (j+)} @@ -418,7 +418,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -457,7 +457,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -483,7 +483,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -506,7 +506,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -529,7 +529,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -546,7 +546,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -569,7 +569,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • 1 Validation operation @@ -588,7 +588,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ │ rule: "primary index swap" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey+)} @@ -631,7 +631,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ │ ├── • Precedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ │ rule: "primary index with new columns should exist before secondary indexes" │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ │ │ ├── • IndexData:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+)} @@ -672,7 +672,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ ├── • Precedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "primary index with new columns should exist before temp indexes" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • 2 elements transitioning toward ABSENT @@ -680,7 +680,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ │ PUBLIC → VALIDATED │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ │ │ └── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} @@ -780,7 +780,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ └── • IndexData:{DescID: 106 (tbl), IndexID: 5} @@ -815,7 +815,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 4 (tbl_j_key+)} │ │ │ │ rule: "index-column added to index before index is backfilled" │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} @@ -835,7 +835,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -858,7 +858,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -881,7 +881,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -898,7 +898,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ │ └── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -921,7 +921,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ └── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} +│ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key+)} @@ -942,7 +942,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j+)} @@ -978,7 +978,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 4 (tbl_j_key+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key+)} @@ -989,7 +989,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -1007,7 +1007,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ ├── • 2 elements transitioning toward ABSENT @@ -1021,7 +1021,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 12 Mutation operations @@ -1083,7 +1083,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -1104,7 +1104,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ └── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey+)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ └── • IndexData:{DescID: 106 (tbl), IndexID: 5} @@ -1127,7 +1127,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT UNIQUE DEFAULT │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_10_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_10_of_15 index 712f86a8ecf2..b06472731b77 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_10_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_10_of_15 @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey+)} @@ -38,7 +38,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 2 (j-), IndexID: 4 (tbl_j_key-)} @@ -134,7 +134,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 18 Mutation operations @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -252,7 +252,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -270,7 +270,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 5} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 7 Mutation operations @@ -313,7 +313,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -362,7 +362,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_11_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_11_of_15 index bd11ddc2fcee..df75e8e1ce05 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_11_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_11_of_15 @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey+)} @@ -38,7 +38,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 2 (j-), IndexID: 4 (tbl_j_key-)} @@ -134,7 +134,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 18 Mutation operations @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -252,7 +252,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -270,7 +270,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 5} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 7 Mutation operations @@ -313,7 +313,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -362,7 +362,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_12_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_12_of_15 index c4a7c5c6f1a1..c2134553b517 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_12_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_12_of_15 @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey+)} @@ -38,7 +38,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -104,7 +104,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 4 (tbl_j_key-)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key-)} @@ -134,7 +134,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 18 Mutation operations @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -252,7 +252,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -270,7 +270,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 5} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 7 Mutation operations @@ -313,7 +313,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -362,7 +362,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_13_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_13_of_15 index bde1c9f05e9d..9255043926b4 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_13_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_13_of_15 @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey+)} @@ -38,7 +38,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key-)} @@ -125,7 +125,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 18 Mutation operations @@ -222,7 +222,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -261,7 +261,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 4 (tbl_j_key-)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key-)} @@ -276,7 +276,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 5} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 8 Mutation operations @@ -323,7 +323,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -372,7 +372,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_14_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_14_of_15 index 7a0b942ba7a2..4c036aae6e59 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_14_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_14_of_15 @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey+)} @@ -38,7 +38,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key-)} @@ -125,7 +125,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 18 Mutation operations @@ -222,7 +222,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -261,7 +261,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 4 (tbl_j_key-)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key-)} @@ -276,7 +276,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 5} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 8 Mutation operations @@ -323,7 +323,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -372,7 +372,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_15_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_15_of_15 index d77c719a758f..2b1391ce986b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_15_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_15_of_15 @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey+)} @@ -38,7 +38,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key-)} @@ -125,7 +125,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 18 Mutation operations @@ -222,7 +222,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -261,7 +261,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 4 (tbl_j_key-)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_j_key", IndexID: 4 (tbl_j_key-)} @@ -276,7 +276,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 5} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 8 Mutation operations @@ -323,7 +323,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -372,7 +372,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_1_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_1_of_15 index 4c9ef13ffc39..ac0524e6360f 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_1_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_1_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -63,7 +63,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -96,7 +96,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_2_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_2_of_15 index f244c26f83ef..e92831780478 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_2_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_2_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -29,7 +29,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -133,7 +133,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -188,7 +188,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_3_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_3_of_15 index ab5b03d506ae..a53956305762 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_3_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_3_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -29,7 +29,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -133,7 +133,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -188,7 +188,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_4_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_4_of_15 index 637fa72b1b6a..58fd16627fe7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_4_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_4_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -29,7 +29,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -133,7 +133,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -188,7 +188,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_5_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_5_of_15 index cf61dfad5d09..c009c6104434 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_5_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_5_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -29,7 +29,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -173,7 +173,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -194,7 +194,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_6_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_6_of_15 index 4adc4c2224ba..f1d8ab088fce 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_6_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_6_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -29,7 +29,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -173,7 +173,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -194,7 +194,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_7_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_7_of_15 index 7c2ef691eae3..539cc4b6ccb9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_7_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_7_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -29,7 +29,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -173,7 +173,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -194,7 +194,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_8_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_8_of_15 index a0e660de6d63..f102f91a0f42 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_8_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_8_of_15 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -29,7 +29,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -173,7 +173,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -194,7 +194,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_9_of_15 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_9_of_15 index ad9e216fd7ea..dfaebc32b550 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_9_of_15 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_default_unique.rollback_9_of_15 @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey+)} @@ -38,7 +38,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (tbl), IndexID: 4 (tbl_j_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 2 (j-), IndexID: 4 (tbl_j_key-)} @@ -140,7 +140,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 5} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (tbl_pkey-)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 18 Mutation operations @@ -237,7 +237,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -258,7 +258,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -303,7 +303,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} @@ -352,7 +352,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default index 2031ba7d7a19..e97b2d511929 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j+)} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j+)} @@ -179,7 +179,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT; │ │ └── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} +│ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ └── • 3 Mutation operations @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT; │ └── • Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ WRITE_ONLY → PUBLIC │ │ - │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} + │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j+)} │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j+)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default.rollback_1_of_1 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default.rollback_1_of_1 index 68ac44152147..271f0c6c45b9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default.rollback_1_of_1 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_no_default.rollback_1_of_1 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 1; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 2 (j-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored index 702dcebd326e..42d412d27ce2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j+)} @@ -41,7 +41,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -79,7 +79,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -240,7 +240,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j+)} @@ -263,7 +263,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -301,7 +301,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -440,7 +440,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} @@ -449,7 +449,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • SameStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column writable right before column constraint is enforced." │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT @@ -460,7 +460,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -506,7 +506,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -535,7 +535,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -558,7 +558,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -581,7 +581,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -598,7 +598,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -621,7 +621,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} @@ -630,7 +630,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "index is ready to be validated before we validate constraint on it" │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 2 Validation operations @@ -653,7 +653,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j+)} @@ -680,7 +680,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey+)} @@ -708,7 +708,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "column existence precedes column dependents" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT @@ -716,7 +716,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -742,7 +742,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} @@ -819,7 +819,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -848,7 +848,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 6 Mutation operations @@ -904,7 +904,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 2 (k), IndexID: 1 (tbl_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_1_of_7 index d235d5998513..b1c687a85008 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_1_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -92,7 +92,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_2_of_7 index 0c6bff3922bc..05e16f311dd2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_2_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -180,7 +180,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -217,7 +217,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_3_of_7 index 4190c3cb667a..a80e7c6909c0 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_3_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -180,7 +180,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -217,7 +217,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_4_of_7 index 725e2f283db6..378f42e94158 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_4_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -180,7 +180,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -217,7 +217,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_5_of_7 index 8b9a9060d228..991337388f2b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_5_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -168,7 +168,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -199,7 +199,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_6_of_7 index 334b5ebc134f..264196abba8b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_6_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -168,7 +168,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -199,7 +199,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_7_of_7 index ff237cd78305..a62d3c8b5522 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored.rollback_7_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -168,7 +168,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -199,7 +199,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family index 9be66829705c..fb76abab2755 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnFamily:{DescID: 106 (tbl), Name: "bob", ColumnFamilyID: 1 (bob+)} @@ -44,7 +44,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -252,7 +252,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnFamily:{DescID: 106 (tbl), Name: "bob", ColumnFamilyID: 1 (bob+)} @@ -278,7 +278,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -316,7 +316,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -462,7 +462,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} @@ -471,7 +471,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • SameStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "column writable right before column constraint is enforced." │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT @@ -482,7 +482,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -528,7 +528,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey+)} @@ -557,7 +557,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -580,7 +580,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -603,7 +603,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -620,7 +620,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -643,7 +643,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} @@ -652,7 +652,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "index is ready to be validated before we validate constraint on it" │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 2 Validation operations @@ -675,7 +675,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j+)} @@ -702,7 +702,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey+)} @@ -730,7 +730,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j+)} │ │ │ rule: "column existence precedes column dependents" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j+), IndexID: 2 (tbl_pkey+)} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT @@ -738,7 +738,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -764,7 +764,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} @@ -841,7 +841,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ └── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -870,7 +870,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ └── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 6 Mutation operations @@ -926,7 +926,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE db.public.tbl ADD COLUMN j INT NOT NULL AS (k │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 2 (k), IndexID: 1 (tbl_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 1 (tbl_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 1 (tbl_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_1_of_7 index a47b06e51166..a18bc15fbd46 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_1_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -56,7 +56,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_2_of_7 index 636d94d25d99..ad5bc9d53a9f 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_2_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -180,7 +180,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_3_of_7 index b06a8b50667a..dc0deae8b9fb 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_3_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -180,7 +180,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_4_of_7 index 73ae83cf18e3..83c4f70b9be8 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_4_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -180,7 +180,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_5_of_7 index 27652a6a7336..eaf57f89eb5b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_5_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -168,7 +168,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_6_of_7 index 7a0f5a036ea1..8871ee6f95e2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_6_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -168,7 +168,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_7_of_7 index 9015d9cdc037..da53bdf516f6 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/add_column_with_stored_family.rollback_7_of_7 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} @@ -34,7 +34,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 2 (tbl_pkey-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ └── • ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 106 (tbl), ColumnID: 3 (j-), IndexID: 2 (tbl_pkey-)} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} @@ -168,7 +168,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (tbl), ColumnID: 3 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (tbl), Name: "j", ColumnID: 3 (j-)} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (tbl), IndexID: 2 (tbl_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (tbl), Name: "tbl_pkey", IndexID: 2 (tbl_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (tbl), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (tbl_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (tbl), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf index 7960f02c400d..3467b76d8abb 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CONSTRAINT check_b CHECK (f(b) > 1); │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_b", ConstraintID: 2 (check_b+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CONSTRAINT check_b CHECK (f(b) > 1); │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_b", ConstraintID: 2 (check_b+)} @@ -131,7 +131,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CONSTRAINT check_b CHECK (f(b) > 1); │ │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -147,7 +147,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CONSTRAINT check_b CHECK (f(b) > 1); │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b+)} │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ └── • 4 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_1_of_2 index 591b4876a6b1..d042de1e16ec 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_1_of_2 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 2; │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_b", ConstraintID: 2 (check_b-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_2_of_2 index b6d016ada226..230df29fccbd 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_udf.rollback_2_of_2 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 2; │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_b-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_b", ConstraintID: 2 (check_b-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla index 13c50a0e9a0f..5de2edb0e62a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > 0) │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 2 (check_i+)} @@ -65,7 +65,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > 0) │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 2 (check_i+)} @@ -114,7 +114,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > 0) │ │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -130,7 +130,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > 0) │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i+)} │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ └── • 3 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_1_of_2 index 12e96d820233..26f894236647 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_1_of_2 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 2; │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 2 (check_i-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_2_of_2 index b7e4711767e6..57b86f84ebff 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_vanilla.rollback_2_of_2 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 2; │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 2 (check_i-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt index 63f773c0448a..335cfb673966 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > nextval('s') OR j::typ = 'a' │ │ ├── • CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 107 (t), Name: "check_i_j", ConstraintID: 2 (check_i_j+)} @@ -77,7 +77,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > nextval('s') OR j::typ = 'a' │ │ ├── • CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 107 (t), Name: "check_i_j", ConstraintID: 2 (check_i_j+)} @@ -154,7 +154,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > nextval('s') OR j::typ = 'a' │ │ └── • CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ │ │ WRITE_ONLY → VALIDATED │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -170,7 +170,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD CHECK (i > nextval('s') OR j::typ = 'a' │ └── • CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j+), ReferencedSequenceIDs: [104 (s)]} │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ └── • 6 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_1_of_2 index c7d12cc52622..5af3dae3b39a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_1_of_2 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 2; │ ├── • CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j-), ReferencedSequenceIDs: [104 (s)]} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j-), ReferencedSequenceIDs: [104 (s)]} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j-), ReferencedSequenceIDs: [104 (s)]} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 107 (t), Name: "check_i_j", ConstraintID: 2 (check_i_j-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_2_of_2 index df9a1b6868a3..6af8560aa08a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_check_with_seq_and_udt.rollback_2_of_2 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 2; │ ├── • CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j-), ReferencedSequenceIDs: [104 (s)]} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j-), ReferencedSequenceIDs: [104 (s)]} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 107 (t), ReferencedTypeIDs: [105 (typ), 106 (#106)], IndexID: 0, ConstraintID: 2 (check_i_j-), ReferencedSequenceIDs: [104 (s)]} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 107 (t), Name: "check_i_j", ConstraintID: 2 (check_i_j-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key index 761eebfa9404..e79f5b63adf9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t1 ADD FOREIGN KEY (i) REFERENCES t2(i); │ │ ├── • ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ │ │ rule: "ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t1), Name: "t1_i_fkey", ConstraintID: 2 (t1_i_fkey+)} @@ -68,7 +68,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t1 ADD FOREIGN KEY (i) REFERENCES t2(i); │ │ ├── • ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ │ │ rule: "ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t1), Name: "t1_i_fkey", ConstraintID: 2 (t1_i_fkey+)} @@ -125,7 +125,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t1 ADD FOREIGN KEY (i) REFERENCES t2(i); │ │ └── • ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ │ rule: "ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -141,7 +141,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t1 ADD FOREIGN KEY (i) REFERENCES t2(i); │ └── • ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey+), ReferencedDescID: 105 (t2)} │ rule: "ForeignKeyConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ └── • 4 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_1_of_2 index 249f07178271..20baa02a0705 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_1_of_2 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 2; │ ├── • ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 105 (t2)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 105 (t2)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 105 (t2)} │ │ │ rule: "ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t1), Name: "t1_i_fkey", ConstraintID: 2 (t1_i_fkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_2_of_2 index 9d42242b1761..d609473b5ad1 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_foreign_key.rollback_2_of_2 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 2; │ ├── • ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 105 (t2)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 105 (t2)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ForeignKeyConstraint:{DescID: 104 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 105 (t2)} │ │ │ rule: "ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t1), Name: "t1_i_fkey", ConstraintID: 2 (t1_i_fkey-)} 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 0b6ad1a2bcb0..0f6817fbd9cb 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 @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -79,7 +79,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid-)} @@ -91,7 +91,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 11 Mutation operations @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey+)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -267,7 +267,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid-)} @@ -299,7 +299,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 16 Mutation operations @@ -407,7 +407,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -442,7 +442,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -468,7 +468,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -491,7 +491,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -514,7 +514,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -531,7 +531,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -554,7 +554,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • 1 Validation operation @@ -573,7 +573,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ │ rule: "primary index swap" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey~)} @@ -598,7 +598,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ │ ├── • Precedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "primary index with new columns should exist before temp indexes" │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -612,7 +612,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ │ PUBLIC → VALIDATED │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -672,7 +672,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -704,7 +704,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey+)} @@ -727,7 +727,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -750,7 +750,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -773,7 +773,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -790,7 +790,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -813,7 +813,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -831,7 +831,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -852,7 +852,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -866,7 +866,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} @@ -878,7 +878,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ rule: "column no longer public before dependents" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 1 (t_pkey-)} @@ -899,7 +899,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 12 Mutation operations @@ -972,7 +972,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ │ ├── • SameStagePrecedence dependency from TRANSIENT_VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey+)} @@ -993,7 +993,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ PUBLIC → TRANSIENT_VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: PUBLIC->TRANSIENT_VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey~)} @@ -1005,7 +1005,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -1017,7 +1017,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -1034,7 +1034,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -1087,7 +1087,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ TRANSIENT_VALIDATED → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from TRANSIENT_VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from TRANSIENT_VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_VALIDATED->TRANSIENT_WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -1137,7 +1137,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey~)} @@ -1190,7 +1190,7 @@ EXPLAIN (ddl, verbose) alter table t add primary key (a); │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid-)} 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 19f4cc3bebd0..fb8b0473fc20 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -211,7 +211,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -241,7 +241,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 ed512609ed97..b751d706f69e 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -211,7 +211,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -241,7 +241,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 a546aac98ba4..22440c8ebdb8 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -211,7 +211,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -241,7 +241,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 fa81cdaeef79..d7fb29f3e02e 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey-)} @@ -112,7 +112,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -235,7 +235,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -247,7 +247,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -297,7 +297,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 abcb3f48c1e4..17597318f69c 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey-)} @@ -112,7 +112,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -235,7 +235,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -247,7 +247,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -297,7 +297,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 e273bc0627e0..2f3ba1ec1ef9 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey-)} @@ -112,7 +112,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -235,7 +235,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -247,7 +247,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -297,7 +297,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 17560bb89195..9156d9463a1c 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ ├── • 10 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -81,7 +81,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -105,7 +105,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} 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 c88344de9a31..cdff281ede08 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 12f6ba9711aa..7cf15d97a11d 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 22f838c00091..88eb31506921 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 2179194d44be..f47411f368e5 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 7499e7eb7089..b058be4ad894 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 a3fde7fb7f04..7b27ffad3b3d 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 f9ea3b712142..57d7eee77aa1 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 c4566de256f7..c16958689120 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -214,7 +214,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -232,7 +232,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -277,7 +277,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index index e6e5d9371699..94de0ae8320a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD UNIQUE WITHOUT INDEX (j); │ │ ├── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ │ │ rule: "UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "unique_j", ConstraintID: 2 (unique_j+)} @@ -64,7 +64,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD UNIQUE WITHOUT INDEX (j); │ │ ├── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ │ │ rule: "UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "unique_j", ConstraintID: 2 (unique_j+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD UNIQUE WITHOUT INDEX (j); │ │ └── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ │ rule: "UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ADD UNIQUE WITHOUT INDEX (j); │ └── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j+)} │ rule: "UniqueWithoutIndexConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ └── • 3 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_1_of_2 index f8badf24e8ad..2d40715b757c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_1_of_2 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 2; │ ├── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ rule: "UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "unique_j", ConstraintID: 2 (unique_j-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_2_of_2 index 65d81059b502..857b698cfa22 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_add_unique_without_index.rollback_2_of_2 @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 2; │ ├── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ rule: "UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "unique_j", ConstraintID: 2 (unique_j-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null index 335efb8d8a10..ca348f6c368f 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER COLUMN j SET NOT NULL; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ │ ABSENT → WRITE_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ └── • 1 Mutation operation @@ -45,7 +45,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER COLUMN j SET NOT NULL; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ │ ABSENT → WRITE_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ └── • 3 Mutation operations @@ -80,7 +80,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER COLUMN j SET NOT NULL; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ │ WRITE_ONLY → VALIDATED │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -96,7 +96,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER COLUMN j SET NOT NULL; │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ └── • 3 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_1_of_2 index 25ea65718d06..e813ef275b05 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_1_of_2 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 2; │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ WRITE_ONLY → ABSENT │ │ - │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} + │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ └── • 3 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_2_of_2 index 1092ee311088..92a5e0bc8990 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_column_set_not_null.rollback_2_of_2 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 2; │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ │ WRITE_ONLY → ABSENT │ │ - │ └── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} + │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 0} │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ └── • 3 Mutation operations 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 c7ac59455cb6..886b678c975e 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 @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -79,7 +79,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid-)} @@ -91,7 +91,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 11 Mutation operations @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey+)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -267,7 +267,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid-)} @@ -299,7 +299,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 16 Mutation operations @@ -408,7 +408,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -443,7 +443,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -469,7 +469,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -492,7 +492,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -515,7 +515,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -532,7 +532,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -555,7 +555,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • 1 Validation operation @@ -574,7 +574,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ │ rule: "primary index swap" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey~)} @@ -599,7 +599,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ │ ├── • Precedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "primary index with new columns should exist before temp indexes" │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -613,7 +613,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ │ PUBLIC → VALIDATED │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -673,7 +673,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -705,7 +705,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey+)} @@ -728,7 +728,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -751,7 +751,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -774,7 +774,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -791,7 +791,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -814,7 +814,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -832,7 +832,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -853,7 +853,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -867,7 +867,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} @@ -879,7 +879,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ │ rule: "column no longer public before dependents" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (rowid-), IndexID: 1 (t_pkey-)} @@ -900,7 +900,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 12 Mutation operations @@ -973,7 +973,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ │ ├── • SameStagePrecedence dependency from TRANSIENT_VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey+)} @@ -994,7 +994,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ PUBLIC → TRANSIENT_VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: PUBLIC->TRANSIENT_VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey~)} @@ -1006,7 +1006,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -1018,7 +1018,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey~)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -1035,7 +1035,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -1088,7 +1088,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ TRANSIENT_VALIDATED → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from TRANSIENT_VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from TRANSIENT_VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_VALIDATED->TRANSIENT_WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey~)} @@ -1138,7 +1138,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey~), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey~)} @@ -1191,7 +1191,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (a); │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid-)} 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 bd7a7a859a03..a403079875bd 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -211,7 +211,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -241,7 +241,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 aaed851eab50..83b4869fa786 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -211,7 +211,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -241,7 +241,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 c2f8f70aa8f5..1df1baae4f61 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -211,7 +211,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -229,7 +229,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -241,7 +241,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -287,7 +287,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 488f26fe3dd4..9747ba6c0da6 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey-)} @@ -112,7 +112,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -235,7 +235,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -247,7 +247,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -297,7 +297,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 9ae27694d720..08f4171e988c 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey-)} @@ -112,7 +112,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -235,7 +235,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -247,7 +247,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -297,7 +297,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 57b9b8320cd0..0e8490936c3e 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 4 (t_pkey-)} @@ -112,7 +112,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -205,7 +205,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -235,7 +235,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -247,7 +247,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -297,7 +297,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} 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 4d24a82f7c6b..b25d20a5a233 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ ├── • 10 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -81,7 +81,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -105,7 +105,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} 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 7565988ace98..4137fb29fec6 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 104d4d23919d..a89771521127 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 36e978f2e252..dd54dcded6f0 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -75,7 +75,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 9e47c4ed50b5..eef1260d6207 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 97e69e240954..b7dc355c58b4 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 6262c0475538..48381a397e79 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 76b47fe2e88b..37eb3f03529f 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ ├── • 8 elements transitioning toward ABSENT @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -192,7 +192,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} 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 4414664d3323..ac1af75e9993 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (rowid+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "rowid", ColumnID: 2 (rowid+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 2 (rowid+), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -70,7 +70,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 4 (t_pkey-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 4 (t_pkey-)} @@ -118,7 +118,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 2 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 5} @@ -214,7 +214,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 2 (t_pkey-)} @@ -232,7 +232,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (a), IndexID: 3} @@ -277,7 +277,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash index 9d0645b1ddd6..c5af3bb6aeca 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ ├── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3+)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} @@ -86,7 +86,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexData:{DescID: 104 (t), IndexID: 4 (t_i_key+)} @@ -151,7 +151,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 3} @@ -181,7 +181,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ rule: "column existence precedes temp index existence" │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ └── • 22 Mutation operations @@ -441,7 +441,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3+)} @@ -461,7 +461,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ ├── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3+)} @@ -476,7 +476,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} @@ -512,7 +512,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column existence precedes index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexData:{DescID: 104 (t), IndexID: 4 (t_i_key+)} @@ -577,7 +577,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column existence precedes temp index existence" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 3} @@ -607,7 +607,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ rule: "column existence precedes temp index existence" │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ └── • 28 Mutation operations @@ -818,7 +818,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ └── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} @@ -827,7 +827,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • SameStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column writable right before column constraint is enforced." │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ ├── • 4 elements transitioning toward TRANSIENT_ABSENT @@ -838,7 +838,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 3} @@ -862,7 +862,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ │ rule: "column is WRITE_ONLY before temporary index is WRITE_ONLY" │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ └── • IndexData:{DescID: 104 (t), IndexID: 5} @@ -903,7 +903,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} @@ -921,7 +921,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} @@ -955,13 +955,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -988,13 +988,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -1021,13 +1021,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 2 Backfill operations @@ -1049,13 +1049,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -1082,7 +1082,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} │ │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} @@ -1091,7 +1091,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} @@ -1100,13 +1100,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_i_key", IndexID: 4 (t_i_key+)} @@ -1141,7 +1141,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3+)} @@ -1174,13 +1174,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • Precedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+)} │ │ │ │ rule: "column existence precedes column dependents" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 2 (t_pkey+)} │ │ │ rule: "ColumnNotNull transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ │ VALIDATED → PUBLIC │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2 (check_crdb_internal_j_shard_3+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} @@ -1189,7 +1189,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey+)} @@ -1214,7 +1214,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key+)} @@ -1234,7 +1234,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 3} @@ -1258,7 +1258,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ ├── • 2 elements transitioning toward ABSENT @@ -1266,7 +1266,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -1357,7 +1357,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3+), IndexID: 3} @@ -1372,7 +1372,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ └── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ ├── • 3 elements transitioning toward ABSENT @@ -1392,7 +1392,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 7 Mutation operations @@ -1464,7 +1464,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j) USING H │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_1_of_7 index bdf818cc0232..1d3443b336c9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_1_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -56,7 +56,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3-)} @@ -71,7 +71,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -146,7 +146,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -173,7 +173,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_2_of_7 index 535a82b4d9f6..57eaa8dc6785 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_2_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -31,7 +31,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3-)} @@ -55,7 +55,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -94,7 +94,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -121,7 +121,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -139,7 +139,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -320,7 +320,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -366,7 +366,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -402,7 +402,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_3_of_7 index 535b33a99c35..b7545c8270b7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_3_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -31,7 +31,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3-)} @@ -55,7 +55,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -94,7 +94,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -121,7 +121,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -139,7 +139,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -320,7 +320,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -366,7 +366,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -402,7 +402,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_4_of_7 index 320f1e3b1824..93f45be49b25 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_4_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -31,7 +31,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3-)} @@ -55,7 +55,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -94,7 +94,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -121,7 +121,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -139,7 +139,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -320,7 +320,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -366,7 +366,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -402,7 +402,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_5_of_7 index 4bf2bf36b756..582c1d84a5b7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_5_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -31,7 +31,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3-)} @@ -55,7 +55,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -109,13 +109,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -296,7 +296,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -336,7 +336,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -360,7 +360,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -384,7 +384,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -414,7 +414,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_6_of_7 index eaa0ab174985..35c3e46afd62 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_6_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -31,7 +31,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3-)} @@ -55,7 +55,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -109,13 +109,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -296,7 +296,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -336,7 +336,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -360,7 +360,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -384,7 +384,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -414,7 +414,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_7_of_7 index f2d88bed887a..9ef44cbaeffe 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_using_hash.rollback_7_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -31,7 +31,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} │ │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ WRITE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2 (check_crdb_internal_j_shard_3-)} │ │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_3", ConstraintID: 2 (check_crdb_internal_j_shard_3-)} @@ -55,7 +55,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 2 (t_pkey-)} @@ -82,7 +82,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -109,13 +109,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -296,7 +296,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_3", ColumnID: 3 (crdb_internal_j_shard_3-)} @@ -336,7 +336,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 3, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -360,7 +360,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_3-), IndexID: 3} @@ -384,7 +384,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -414,7 +414,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} 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 a7fadfd481f1..1189f138de6a 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 2 (t_pkey+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexData:{DescID: 104 (t), IndexID: 4 (t_i_key+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -102,7 +102,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ ABSENT → DELETE_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ └── • 13 Mutation operations @@ -257,7 +257,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 2 (t_pkey+)} @@ -281,7 +281,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexData:{DescID: 104 (t), IndexID: 4 (t_i_key+)} @@ -325,7 +325,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -343,7 +343,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ ABSENT → DELETE_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ └── • 19 Mutation operations @@ -475,7 +475,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -493,7 +493,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ └── • IndexData:{DescID: 104 (t), IndexID: 5} @@ -526,7 +526,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 2 (t_pkey+)} @@ -541,7 +541,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} @@ -572,13 +572,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -605,13 +605,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -638,13 +638,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 2 Backfill operations @@ -666,13 +666,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -699,13 +699,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} +│ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_i_key", IndexID: 4 (t_i_key+)} @@ -733,7 +733,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey+)} @@ -755,7 +755,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key+), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key+)} @@ -772,7 +772,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -790,7 +790,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ ├── • 2 elements transitioning toward ABSENT @@ -798,7 +798,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -868,7 +868,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -880,7 +880,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ └── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ ├── • 3 elements transitioning toward ABSENT @@ -900,7 +900,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 7 Mutation operations @@ -972,7 +972,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (j); │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_1_of_7 index 85a42d0a7b64..b63175a3f009 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_1_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_2_of_7 index 0e0eeecbfd26..d3026476afdc 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_2_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -44,7 +44,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -77,7 +77,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -198,7 +198,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_3_of_7 index 66ef89dd7cae..48a3d508ca0c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_3_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -44,7 +44,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -77,7 +77,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -198,7 +198,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_4_of_7 index 7ba546de0aa7..d155d7a998f4 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_4_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -44,7 +44,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -62,7 +62,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -77,7 +77,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -198,7 +198,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -231,7 +231,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_5_of_7 index b09a21e523cf..4878f476d37b 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_5_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 2 (t_pkey-)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -53,13 +53,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -174,7 +174,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -195,7 +195,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -216,7 +216,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_6_of_7 index 743c6a465ff7..d3552196e310 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_6_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 2 (t_pkey-)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -53,13 +53,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -174,7 +174,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -195,7 +195,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -216,7 +216,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_7_of_7 index c186c940cfdf..94fb62739b57 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_alter_primary_key_vanilla.rollback_7_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 2 (t_pkey-)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -53,13 +53,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -174,7 +174,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -195,7 +195,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j), IndexID: 3} @@ -216,7 +216,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 4 (t_i_key-), ConstraintID: 4, TemporaryIndexID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (t_i_key-)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 5, ConstraintID: 5, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 5} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_check b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_check index f57916f67d97..ebc84059dda6 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_check +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_check @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP CONSTRAINT check_i; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 2 (check_i-)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP CONSTRAINT check_i; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 2 (check_i-)} @@ -105,7 +105,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP CONSTRAINT check_i; │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ VALIDATED → ABSENT │ │ - │ ├── • PreviousStagePrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} + │ ├── • PreviousTransactionPrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_i-)} │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT" │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 2 (check_i-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_fk b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_fk index 317905987593..2409a425f218 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_fk +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_fk @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t1 DROP CONSTRAINT t1_i_fkey; │ │ ├── • ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} │ │ │ rule: "ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 105 (t1), Name: "t1_i_fkey", ConstraintID: 2 (t1_i_fkey-)} @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t1 DROP CONSTRAINT t1_i_fkey; │ │ ├── • ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} │ │ │ rule: "ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 105 (t1), Name: "t1_i_fkey", ConstraintID: 2 (t1_i_fkey-)} @@ -111,7 +111,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t1 DROP CONSTRAINT t1_i_fkey; │ └── • ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} │ │ VALIDATED → ABSENT │ │ - │ ├── • PreviousStagePrecedence dependency from VALIDATED ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} + │ ├── • PreviousTransactionPrecedence dependency from VALIDATED ForeignKeyConstraint:{DescID: 105 (t1), IndexID: 0, ConstraintID: 2 (t1_i_fkey-), ReferencedDescID: 104 (#104)} │ │ rule: "ForeignKeyConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT" │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 105 (t1), Name: "t1_i_fkey", ConstraintID: 2 (t1_i_fkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_uwi b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_uwi index c56119487fec..407b27db44b5 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_uwi +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_drop_constraint_uwi @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP CONSTRAINT unique_j; │ │ ├── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ rule: "UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "unique_j", ConstraintID: 2 (unique_j-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP CONSTRAINT unique_j; │ │ ├── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ │ rule: "UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "unique_j", ConstraintID: 2 (unique_j-)} @@ -107,7 +107,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP CONSTRAINT unique_j; │ └── • UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ VALIDATED → ABSENT │ │ - │ ├── • PreviousStagePrecedence dependency from VALIDATED UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} + │ ├── • PreviousTransactionPrecedence dependency from VALIDATED UniqueWithoutIndexConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (unique_j-)} │ │ rule: "UniqueWithoutIndexConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT" │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "unique_j", ConstraintID: 2 (unique_j-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint index 8f9e1b3335de..252ae8da5523 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t VALIDATE CONSTRAINT check_i; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 3 (check_i+)} @@ -92,7 +92,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t VALIDATE CONSTRAINT check_i; │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ │ │ │ ABSENT → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: ABSENT->WRITE_ONLY" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 3 (check_i+)} @@ -161,7 +161,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t VALIDATE CONSTRAINT check_i; │ │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -177,7 +177,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t VALIDATE CONSTRAINT check_i; │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ │ VALIDATED → PUBLIC │ │ - │ └── • PreviousStagePrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} + │ └── • PreviousTransactionPrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i+)} │ rule: "CheckConstraint transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ └── • 3 Mutation operations diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_1_of_2 index c95c36bbb24f..b06f3d67abe7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_1_of_2 @@ -25,7 +25,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 2; │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 3 (check_i-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_2_of_2 index 053a492f8b46..33564606a7a7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/alter_table_validate_constraint.rollback_2_of_2 @@ -25,7 +25,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 2; │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i-)} │ │ │ WRITE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i-)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 3 (check_i-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_i", ConstraintID: 3 (check_i-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function b/pkg/sql/schemachanger/testdata/explain_verbose/create_function index 9d784f8e6d0d..0f2146ed7eb6 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function @@ -33,7 +33,28 @@ $$; │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Function:{DescID: 110 (f+)} -│ │ │ ABSENT → DESCRIPTOR_ADDED +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC SchemaChild:{DescID: 110 (f+), ReferencedDescID: 101 (public)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC FunctionName:{DescID: 110 (f+)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC FunctionVolatility:{DescID: 110 (f+)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC Owner:{DescID: 110 (f+)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC UserPrivileges:{DescID: 110 (f+), Name: "admin"} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC UserPrivileges:{DescID: 110 (f+), Name: "root"} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ └── • Precedence dependency from PUBLIC FunctionBody:{DescID: 110 (f+)} +│ │ │ rule: "dependents exist before descriptor becomes public" │ │ │ │ │ ├── • SchemaChild:{DescID: 110 (f+), ReferencedDescID: 101 (public)} │ │ │ │ ABSENT → PUBLIC @@ -80,7 +101,7 @@ $$; │ │ └── • Precedence dependency from DESCRIPTOR_ADDED Function:{DescID: 110 (f+)} │ │ rule: "descriptor existence precedes dependents" │ │ -│ └── • 10 Mutation operations +│ └── • 11 Mutation operations │ │ │ ├── • CreateFunctionDescriptor │ │ Function: @@ -199,10 +220,13 @@ $$; │ │ columnids: │ │ - 1 │ │ -│ └── • SetObjectParentID -│ ObjParent: -│ ChildObjectID: 110 -│ SchemaID: 101 +│ ├── • SetObjectParentID +│ │ ObjParent: +│ │ ChildObjectID: 110 +│ │ SchemaID: 101 +│ │ +│ └── • MarkDescriptorAsPublic +│ DescriptorID: 110 │ └── • PreCommitPhase │ @@ -211,7 +235,7 @@ $$; │ ├── • 8 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Function:{DescID: 110 (f+)} - │ │ │ DESCRIPTOR_ADDED → ABSENT + │ │ │ PUBLIC → ABSENT │ │ │ │ │ ├── • SchemaChild:{DescID: 110 (f+), ReferencedDescID: 101 (public)} │ │ │ PUBLIC → ABSENT diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_1_of_7 index 2e050fddbf21..f972fa8a02d9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_1_of_7 @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -99,7 +99,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -215,7 +215,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ rule: "non-data dependents removed before descriptor" │ │ - │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 105 (t-)} + │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 105 (t-)} │ │ rule: "descriptor dropped in transaction before removal" │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (#101)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_2_of_7 index 14480b3837a9..b5f2806e56e2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_2_of_7 @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -195,7 +195,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 105 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 105 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (#101)} @@ -216,7 +216,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_3_of_7 index 4d67d3efe7f4..97028a83a802 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_3_of_7 @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -195,7 +195,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 105 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 105 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (#101)} @@ -216,7 +216,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_4_of_7 index 84a709987448..58eac04bfc82 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_4_of_7 @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -195,7 +195,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 105 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 105 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (#101)} @@ -216,7 +216,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_5_of_7 index 2c672491bcb5..06972c3f086c 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_5_of_7 @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 105 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 105 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (#101)} @@ -201,7 +201,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -222,7 +222,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_6_of_7 index a61061a7a8c6..528b6be144e3 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_6_of_7 @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 105 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 105 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (#101)} @@ -201,7 +201,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -222,7 +222,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_7_of_7 index 90aa1e59c9e2..0ba67b076c12 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.rollback_7_of_7 @@ -60,7 +60,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -186,7 +186,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 105 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 105 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (#101)} @@ -201,7 +201,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx-)} @@ -222,7 +222,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_1_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_1_of_2 index 9ba2965cd4fb..cdd863fe88ce 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_1_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_1_of_2 @@ -16,7 +16,25 @@ EXPLAIN (ddl, verbose) CREATE FUNCTION t() RETURNS INT LANGUAGE SQL AS $$ SELECT │ ├── • 7 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Function:{DescID: 105 (t+)} -│ │ │ ABSENT → DESCRIPTOR_ADDED +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC FunctionName:{DescID: 105 (t+)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC Owner:{DescID: 105 (t+)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC UserPrivileges:{DescID: 105 (t+), Name: "admin"} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC UserPrivileges:{DescID: 105 (t+), Name: "root"} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ └── • Precedence dependency from PUBLIC FunctionBody:{DescID: 105 (t+)} +│ │ │ rule: "dependents exist before descriptor becomes public" │ │ │ │ │ ├── • SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} │ │ │ │ ABSENT → PUBLIC @@ -57,7 +75,7 @@ EXPLAIN (ddl, verbose) CREATE FUNCTION t() RETURNS INT LANGUAGE SQL AS $$ SELECT │ │ └── • Precedence dependency from DESCRIPTOR_ADDED Function:{DescID: 105 (t+)} │ │ rule: "descriptor existence precedes dependents" │ │ -│ └── • 9 Mutation operations +│ └── • 10 Mutation operations │ │ │ ├── • CreateFunctionDescriptor │ │ Function: @@ -105,10 +123,13 @@ EXPLAIN (ddl, verbose) CREATE FUNCTION t() RETURNS INT LANGUAGE SQL AS $$ SELECT │ ├── • UpdateFunctionRelationReferences │ │ FunctionID: 105 │ │ -│ └── • SetObjectParentID -│ ObjParent: -│ ChildObjectID: 105 -│ SchemaID: 101 +│ ├── • SetObjectParentID +│ │ ObjParent: +│ │ ChildObjectID: 105 +│ │ SchemaID: 101 +│ │ +│ └── • MarkDescriptorAsPublic +│ DescriptorID: 105 │ └── • PreCommitPhase │ @@ -117,7 +138,7 @@ EXPLAIN (ddl, verbose) CREATE FUNCTION t() RETURNS INT LANGUAGE SQL AS $$ SELECT │ ├── • 7 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Function:{DescID: 105 (t+)} - │ │ │ DESCRIPTOR_ADDED → ABSENT + │ │ │ PUBLIC → ABSENT │ │ │ │ │ ├── • SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} │ │ │ PUBLIC → ABSENT diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_2_of_2 b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_2_of_2 index 6dc8a50f491e..4d62139e7cf0 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_2_of_2 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_function_in_txn.statement_2_of_2 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx+)} @@ -51,7 +51,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -130,7 +130,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ │ │ PUBLIC → ABSENT │ │ │ │ │ │ │ ├── • Function:{DescID: 105 (t+)} -│ │ │ │ DESCRIPTOR_ADDED → ABSENT +│ │ │ │ PUBLIC → ABSENT │ │ │ │ │ │ │ ├── • SchemaChild:{DescID: 105 (t+), ReferencedDescID: 101 (public)} │ │ │ │ PUBLIC → ABSENT @@ -221,7 +221,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx+)} @@ -253,7 +253,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -410,7 +410,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -448,7 +448,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx+)} @@ -474,7 +474,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -500,7 +500,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -526,7 +526,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -543,7 +543,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -569,7 +569,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx+)} @@ -611,7 +611,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 2 (idx+)} @@ -628,7 +628,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} @@ -688,7 +688,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(b); │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (b), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index b/pkg/sql/schemachanger/testdata/explain_verbose/create_index index a877b23748d9..69ea7488eb50 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1+)} @@ -48,7 +48,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -163,7 +163,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1+)} @@ -195,7 +195,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -310,7 +310,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -351,7 +351,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ │ └── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1+)} @@ -377,7 +377,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ │ └── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 5 Mutation operations @@ -406,7 +406,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ │ └── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 5 Mutation operations @@ -435,7 +435,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ │ └── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -452,7 +452,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ │ └── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 5 Mutation operations @@ -481,7 +481,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ └── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} +│ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 106 (t), Name: "idx1", IndexID: 2 (idx1+)} @@ -502,7 +502,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ └── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1+), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1+)} @@ -519,7 +519,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -579,7 +579,7 @@ EXPLAIN (ddl, verbose) CREATE INDEX idx1 ON t (v) WHERE (v = 'a'); │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_1_of_7 index 108a7a91e455..41dae975e157 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_1_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -56,7 +56,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_2_of_7 index f8b791ee5cfb..e08b3258b842 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_2_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_3_of_7 index 3531ab36fbea..23ad268ddf01 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_3_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_4_of_7 index c384357a195f..6b94285d2824 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_4_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_5_of_7 index cf9dbcfb4f6b..acf16a5a23b1 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_5_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -41,7 +41,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_6_of_7 index 3f2d57b0bbd4..dc7657f0bafb 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_6_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -41,7 +41,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_7_of_7 index 496d590bef2a..a48db84cd103 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_index.rollback_7_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -41,7 +41,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 106 (t), IndexID: 2 (idx1-), TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 2 (idx1-)} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (t), IndexID: 3, ConstraintID: 1, SourceIndexID: 1 (t_pkey)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (t), ColumnID: 2 (v), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/create_schema b/pkg/sql/schemachanger/testdata/explain_verbose/create_schema index d046ca8547e5..143601def88e 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/create_schema +++ b/pkg/sql/schemachanger/testdata/explain_verbose/create_schema @@ -12,7 +12,25 @@ EXPLAIN (ddl, verbose) CREATE SCHEMA sc; │ ├── • 7 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Schema:{DescID: 104 (sc+)} -│ │ │ ABSENT → DESCRIPTOR_ADDED +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC SchemaName:{DescID: 104 (sc+)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC Namespace:{DescID: 104 (sc+), Name: "sc", ReferencedDescID: 100 (defaultdb)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC SchemaParent:{DescID: 104 (sc+), ReferencedDescID: 100 (defaultdb)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC Owner:{DescID: 104 (sc+)} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ ├── • Precedence dependency from PUBLIC UserPrivileges:{DescID: 104 (sc+), Name: "admin"} +│ │ │ │ rule: "dependents exist before descriptor becomes public" +│ │ │ │ +│ │ │ └── • Precedence dependency from PUBLIC UserPrivileges:{DescID: 104 (sc+), Name: "root"} +│ │ │ rule: "dependents exist before descriptor becomes public" │ │ │ │ │ ├── • SchemaName:{DescID: 104 (sc+)} │ │ │ │ ABSENT → PUBLIC @@ -50,7 +68,7 @@ EXPLAIN (ddl, verbose) CREATE SCHEMA sc; │ │ └── • Precedence dependency from DESCRIPTOR_ADDED Schema:{DescID: 104 (sc+)} │ │ rule: "descriptor existence precedes dependents" │ │ -│ └── • 7 Mutation operations +│ └── • 8 Mutation operations │ │ │ ├── • CreateSchemaDescriptor │ │ SchemaID: 104 @@ -82,12 +100,15 @@ EXPLAIN (ddl, verbose) CREATE SCHEMA sc; │ │ UserName: admin │ │ WithGrantOption: 2 │ │ -│ └── • UpdateUserPrivileges -│ Privileges: -│ DescriptorID: 104 -│ Privileges: 2 -│ UserName: root -│ WithGrantOption: 2 +│ ├── • UpdateUserPrivileges +│ │ Privileges: +│ │ DescriptorID: 104 +│ │ Privileges: 2 +│ │ UserName: root +│ │ WithGrantOption: 2 +│ │ +│ └── • MarkDescriptorAsPublic +│ DescriptorID: 104 │ └── • PreCommitPhase │ @@ -96,7 +117,7 @@ EXPLAIN (ddl, verbose) CREATE SCHEMA sc; │ ├── • 7 elements transitioning toward PUBLIC │ │ │ │ │ ├── • Schema:{DescID: 104 (sc+)} - │ │ │ DESCRIPTOR_ADDED → ABSENT + │ │ │ PUBLIC → ABSENT │ │ │ │ │ ├── • SchemaName:{DescID: 104 (sc+)} │ │ │ PUBLIC → ABSENT diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic index 657815a745fb..571812e4b544 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_basic @@ -20,7 +20,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey+)} @@ -46,7 +46,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -188,7 +188,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey+)} @@ -214,7 +214,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -234,7 +234,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -337,7 +337,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -372,7 +372,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey+)} @@ -398,7 +398,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -421,7 +421,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -444,7 +444,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -461,7 +461,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -484,7 +484,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -505,7 +505,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey+)} @@ -529,7 +529,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -549,13 +549,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -618,7 +618,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -653,7 +653,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 7 Mutation operations @@ -710,7 +710,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -747,7 +747,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} 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 68d8c3173400..5a42fb001f90 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 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -47,7 +47,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -80,7 +80,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} 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 1680198d175e..ce3f9c1aff37 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 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -47,7 +47,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -160,7 +160,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} 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 1b945caf5318..d0ea426a5d08 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 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -47,7 +47,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -160,7 +160,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} 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 96ab8c78dd70..691fb593fbd8 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 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -47,7 +47,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -160,7 +160,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} 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 6e62de9aad83..4b9420b7a17b 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 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -47,7 +47,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey-)} @@ -65,7 +65,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -166,7 +166,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} 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 fe5b19eaaa47..f42500eb15d1 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 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -47,7 +47,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey-)} @@ -65,7 +65,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -166,7 +166,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} 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 2ee26e6c03ba..8aa50b426802 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 @@ -21,7 +21,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -47,7 +47,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey-)} @@ -65,7 +65,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -166,7 +166,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3} 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 3e509cdae905..5480222e02c9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_computed_index @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -49,7 +49,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} @@ -76,7 +76,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 9 Mutation operations @@ -182,7 +182,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -202,7 +202,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -216,7 +216,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -228,7 +228,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} @@ -243,7 +243,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 13 Mutation operations @@ -330,7 +330,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -362,7 +362,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -385,7 +385,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -408,7 +408,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -431,7 +431,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -448,7 +448,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -471,7 +471,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -492,7 +492,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey+)} @@ -513,7 +513,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -527,19 +527,19 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -566,7 +566,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx-)} @@ -650,7 +650,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -661,7 +661,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr-)} @@ -701,7 +701,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} @@ -713,7 +713,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx-)} @@ -777,7 +777,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -808,7 +808,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j-), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} 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 bca768769b6b..8c60fbc0af85 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -37,7 +37,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "ensure columns are in increasing order" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr+)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx+)} │ │ rule: "index dependents exist before index becomes public" │ │ - │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} + │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx+)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -96,7 +96,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 d08036b9d614..3381b8df8b70 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -37,7 +37,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr+)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx+)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -90,7 +90,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 88df41faf6ae..9147b08e1b56 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -37,7 +37,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr+)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx+)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -90,7 +90,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 09a70727d299..0b2b06bf071e 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -37,7 +37,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr+)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx+)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -90,7 +90,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -171,7 +171,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 158238344ddf..9c067124818b 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -37,7 +37,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr+)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx+)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -159,7 +159,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -177,7 +177,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 58f8a1522ebf..743b4a6db2b0 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -37,7 +37,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr+)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx+)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -159,7 +159,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -177,7 +177,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 653540dbcae3..eaac26a57f10 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -37,7 +37,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr+)} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_idx", IndexID: 2 (t_expr_idx+)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -159,7 +159,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -177,7 +177,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 b9588761faaa..97f91717fa3a 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -125,13 +125,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -164,7 +164,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -307,7 +307,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} @@ -319,13 +319,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -395,7 +395,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 10 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} 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 bbdd9be1eb75..9678abcf6653 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -125,13 +125,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -164,7 +164,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -307,7 +307,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} @@ -319,13 +319,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -395,7 +395,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 11 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} 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 cb75c9947696..3c5332e42eac 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -125,13 +125,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -164,7 +164,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -307,7 +307,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} @@ -319,13 +319,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -395,7 +395,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 12 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} 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 674e42f7b573..8fd054537163 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -125,13 +125,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -155,7 +155,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -298,7 +298,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} @@ -310,13 +310,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -331,7 +331,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -405,7 +405,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 13 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} 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 baa6d8df8cb8..fd3b425d3563 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -125,13 +125,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -155,7 +155,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -298,7 +298,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} @@ -310,13 +310,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -331,7 +331,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -405,7 +405,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 14 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} 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 641b4f3a5ba7..4f1dbede81fd 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -125,13 +125,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -155,7 +155,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -298,7 +298,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} @@ -310,13 +310,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -331,7 +331,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -405,7 +405,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 15 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} 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 e1fbed57d8e2..9da45f2885e1 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "ensure columns are in increasing order" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -106,7 +106,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -127,7 +127,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 17 Mutation operations 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 c62e309318d6..76baec26c446 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -115,7 +115,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 16 Mutation operations @@ -217,7 +217,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 5 Mutation operations 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 fd46ac0ae2ab..c41ca7cb367f 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -100,7 +100,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -115,7 +115,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 16 Mutation operations @@ -217,7 +217,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 5 Mutation operations 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 5681f687933c..1af48eb9e584 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -106,7 +106,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -115,7 +115,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 16 Mutation operations @@ -217,7 +217,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 5 Mutation operations 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 220200bd41c3..da646e2aa4f8 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -100,13 +100,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 16 Mutation operations @@ -208,7 +208,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 6 Mutation operations 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 9420eabc2c15..ebf0afbabcfb 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -100,13 +100,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 16 Mutation operations @@ -208,7 +208,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 6 Mutation operations 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 c7a523d6681b..17e03103afe8 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -100,13 +100,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 16 Mutation operations @@ -208,7 +208,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 6 Mutation operations 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 7d384aaf735b..7575414b0978 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -100,13 +100,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 16 Mutation operations @@ -208,7 +208,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -223,7 +223,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 8 of 15; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 6 Mutation operations 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 2593081dbdff..b816317fac73 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -59,7 +59,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey+), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey+)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -113,7 +113,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -125,13 +125,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx-), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx-)} @@ -164,7 +164,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey-)} │ │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -313,7 +313,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} @@ -325,7 +325,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ └── • 6 Mutation operations @@ -385,7 +385,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 9 of 15; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} 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 cb53c3172ed7..1058ddf19052 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 @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -41,7 +41,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 11 Mutation operations @@ -212,7 +212,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -238,7 +238,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -258,7 +258,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -270,7 +270,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -285,7 +285,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 15 Mutation operations @@ -384,7 +384,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -419,7 +419,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -445,7 +445,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -468,7 +468,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -491,7 +491,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -508,7 +508,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -531,7 +531,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -552,7 +552,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey+)} @@ -576,7 +576,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -596,19 +596,19 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -641,7 +641,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} @@ -737,7 +737,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -751,7 +751,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 4 (crdb_internal_idx_expr-)} @@ -797,7 +797,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -812,7 +812,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} @@ -883,7 +883,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -917,7 +917,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} 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 f72cab2e272b..7c24de1df385 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 @@ -87,7 +87,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ ABSENT → BACKFILL_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ ├── • 3 elements transitioning toward TRANSIENT_ABSENT @@ -107,7 +107,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ ABSENT → DELETE_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ ├── • 5 elements transitioning toward ABSENT @@ -115,13 +115,13 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -130,7 +130,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -256,7 +256,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "index-column added to index before temp index receives writes" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -285,7 +285,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey+)} │ │ │ │ rule: "index-column added to index before index is backfilled" │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} @@ -305,7 +305,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -328,7 +328,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -351,7 +351,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -368,7 +368,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -391,7 +391,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • 1 Validation operation @@ -416,7 +416,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 3 (t_pkey+)} │ │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey+)} @@ -435,7 +435,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ │ ├── • Precedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "primary index with new columns should exist before secondary indexes" │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx+)} @@ -470,7 +470,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ │ ├── • Precedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "primary index with new columns should exist before temp indexes" │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -490,7 +490,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ │ PUBLIC → VALIDATED │ │ │ │ │ -│ │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -587,7 +587,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -622,7 +622,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx+)} @@ -648,7 +648,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -671,7 +671,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -694,7 +694,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -711,7 +711,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -734,7 +734,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} +│ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "idx", IndexID: 5 (idx+)} @@ -755,7 +755,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ VALIDATED → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 5 (idx+), ConstraintID: 4, TemporaryIndexID: 6, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 5 (idx+)} @@ -784,13 +784,13 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -810,13 +810,13 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 1 (t_pkey-)} @@ -843,7 +843,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-), IndexID: 2 (t_expr_k_idx-)} @@ -870,7 +870,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} @@ -1011,13 +1011,13 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 6, ConstraintID: 5, SourceIndexID: 3 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 6} @@ -1046,7 +1046,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j-)} @@ -1071,7 +1071,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr-)} @@ -1105,7 +1105,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -1129,7 +1129,7 @@ EXPLAIN (ddl, verbose) CREATE UNIQUE INDEX idx ON t(k); │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} 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 7db415773d80..5007bc5f9419 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_unique_index @@ -18,7 +18,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 6 (test_pkey+)} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 7} @@ -76,7 +76,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 106 (test), ColumnID: 3 (pi-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ └── • ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi-)} @@ -206,7 +206,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 6 (test_pkey+)} @@ -238,7 +238,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 7} @@ -264,7 +264,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 106 (test), ColumnID: 3 (pi-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ └── • ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi-)} @@ -372,7 +372,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 7} @@ -410,7 +410,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ └── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 6 (test_pkey+)} @@ -439,7 +439,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ └── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -462,7 +462,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ └── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -485,7 +485,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ └── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -502,7 +502,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ └── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -525,7 +525,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ └── • PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -546,7 +546,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (test), IndexID: 6 (test_pkey+), ConstraintID: 7, TemporaryIndexID: 7, SourceIndexID: 4 (test_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 6 (test_pkey+)} @@ -573,7 +573,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 7} @@ -599,13 +599,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -675,7 +675,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ └── • TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 7, ConstraintID: 8, SourceIndexID: 4 (test_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 7} @@ -719,7 +719,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ └── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 8 Mutation operations @@ -783,7 +783,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi-)} @@ -832,7 +832,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t.test DROP pi; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 4 (x), IndexID: 4 (test_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 4} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} 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 e6cb49e1b6a8..0ff2ce519f0e 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 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi+)} @@ -42,7 +42,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -84,7 +84,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} 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 854c8fa8dfd5..79a7a46534e6 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 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi+)} @@ -42,7 +42,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -78,7 +78,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} @@ -178,7 +178,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} 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 2080eb9b3771..5a60367da605 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 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi+)} @@ -42,7 +42,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -78,7 +78,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} @@ -178,7 +178,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} 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 12c74194fc79..d0706979d8df 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 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi+)} @@ -42,7 +42,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -78,7 +78,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} @@ -178,7 +178,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} 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 73b6a62b6b21..be91b8b1bf81 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 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi+)} @@ -42,7 +42,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 4 (test_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} @@ -160,7 +160,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -184,7 +184,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} 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 5a548961fd4b..1cd8d97b1a18 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 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi+)} @@ -42,7 +42,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 4 (test_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} @@ -160,7 +160,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -184,7 +184,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} 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 4a310bdefb75..3486b2da4543 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 @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 106 (test), ColumnID: 3 (pi+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 106 (test), Name: "pi", ColumnID: 3 (pi+)} @@ -42,7 +42,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 4 (test_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} @@ -160,7 +160,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (test), IndexID: 4 (test_pkey-), ConstraintID: 5, TemporaryIndexID: 5, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 106 (test), Name: "test_pkey", IndexID: 4 (test_pkey-)} @@ -184,7 +184,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 106 (test), IndexID: 5, ConstraintID: 6, SourceIndexID: 1 (test_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (test), ColumnID: 1 (k), IndexID: 5} 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 1e83a5bfb69c..8ea0a20631f2 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_index @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -49,7 +49,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} @@ -64,7 +64,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 7 Mutation operations @@ -155,7 +155,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -175,7 +175,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -189,7 +189,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} @@ -204,7 +204,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 11 Mutation operations @@ -282,7 +282,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -314,7 +314,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -337,7 +337,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -360,7 +360,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -383,7 +383,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -400,7 +400,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -423,7 +423,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -444,7 +444,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey+)} @@ -465,7 +465,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -479,13 +479,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -512,7 +512,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx-)} @@ -592,7 +592,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -618,7 +618,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} @@ -630,7 +630,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx-)} @@ -690,7 +690,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -727,7 +727,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j-), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} 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 89f5f10f2d4d..76ee06a97941 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ rule: "index dependents exist before index becomes public" │ │ - │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -78,7 +78,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 eace203d6670..488fb1d42f16 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -141,7 +141,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 02fd7bf4e23c..abf1d5584e7d 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -141,7 +141,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 edae5b40a521..13dd325a6467 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -141,7 +141,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 b1230e1c8d9b..240306b4bb73 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -147,7 +147,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 0dcee8fb4a36..f253e10c71f7 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -147,7 +147,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} 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 e1dd676c4432..297ad9a01f93 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -147,7 +147,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index index b16807a8c66b..a9de418d03a9 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -35,7 +35,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -49,7 +49,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} @@ -64,7 +64,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 7 Mutation operations @@ -155,7 +155,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -175,7 +175,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -189,7 +189,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} @@ -204,7 +204,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 11 Mutation operations @@ -282,7 +282,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -314,7 +314,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -337,7 +337,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -360,7 +360,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -383,7 +383,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -400,7 +400,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -423,7 +423,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -444,7 +444,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey+)} @@ -465,7 +465,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -479,13 +479,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -512,7 +512,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx-)} @@ -596,7 +596,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -622,7 +622,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} @@ -634,7 +634,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx-)} @@ -694,7 +694,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -731,7 +731,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 2 (j-), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_1_of_7 index 25ca659c4a3e..2cb07a096b18 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_1_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ rule: "index dependents exist before index becomes public" │ │ - │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -78,7 +78,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_2_of_7 index e17a17598f27..468c58fb0713 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_2_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -141,7 +141,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_3_of_7 index f1f83a88fe9a..ebf0fe7199d5 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_3_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -141,7 +141,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_4_of_7 index 1f6f00c21ffe..38291ddb074a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_4_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -72,7 +72,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -141,7 +141,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_5_of_7 index 9c90d6665425..54f379746066 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_5_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -147,7 +147,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_6_of_7 index 01c2c4f5f353..347222c862ae 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_6_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -147,7 +147,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_7_of_7 index 8019ec109e9a..58b7b18ace45 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_partial_index.rollback_7_of_7 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j+)} @@ -43,7 +43,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_j_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_j_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_j_idx", IndexID: 2 (t_j_idx+)} @@ -54,7 +54,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -66,7 +66,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -147,7 +147,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default index 60fc73ac638d..7afe5ecad3c1 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey+)} @@ -36,7 +36,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -50,7 +50,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 105 (t), ColumnID: 2 (b-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ └── • ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b-)} @@ -140,7 +140,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey+)} @@ -160,7 +160,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -174,7 +174,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 105 (t), ColumnID: 2 (b-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ └── • ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b-)} @@ -259,7 +259,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -294,7 +294,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ │ └── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey+)} @@ -317,7 +317,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ │ └── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -343,7 +343,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ │ └── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -369,7 +369,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ │ └── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -386,7 +386,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ │ └── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 4 Mutation operations @@ -412,7 +412,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ └── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -433,7 +433,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey+)} @@ -454,7 +454,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -468,13 +468,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -534,7 +534,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ └── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ └── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -560,7 +560,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ └── • PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ VALIDATED → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ └── • 7 Mutation operations @@ -613,7 +613,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b-)} @@ -656,7 +656,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN b; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 2 (b-), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_1_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_1_of_7 index 467c438142c1..61ce28ba2bfc 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_1_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_1_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -64,7 +64,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_2_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_2_of_7 index 3cf9b29fba0b..3f4f2bf7bd0a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_2_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_2_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -58,7 +58,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -123,7 +123,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_3_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_3_of_7 index 9f9a7aa1ac98..c8f07a14fe39 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_3_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_3_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -58,7 +58,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -123,7 +123,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_4_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_4_of_7 index 892b37b05ff1..edbe321f2789 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_4_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_4_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -58,7 +58,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -123,7 +123,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_5_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_5_of_7 index 85dbed78fc59..ac81d0252fb4 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_5_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_5_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey-)} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -111,7 +111,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_6_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_6_of_7 index 80cdbab277d8..3112cef8d8fd 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_6_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_6_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey-)} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -111,7 +111,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_7_of_7 b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_7_of_7 index e6c56393599b..5bb219efa7ba 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_7_of_7 +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_column_with_udf_default.rollback_7_of_7 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 105 (t), ColumnID: 2 (b+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 105 (t), Name: "b", ColumnID: 2 (b+)} @@ -40,7 +40,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 2 (t_pkey-)} @@ -52,7 +52,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} @@ -111,7 +111,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t), IndexID: 2 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t), Name: "t_pkey", IndexID: 2 (t_pkey-)} @@ -129,7 +129,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 105 (t), IndexID: 3, ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t), ColumnID: 1 (i), IndexID: 3} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_function b/pkg/sql/schemachanger/testdata/explain_verbose/drop_function index af783070597b..e08bc2234f80 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_function +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_function @@ -354,7 +354,7 @@ EXPLAIN (ddl, verbose) DROP FUNCTION f; │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 109 (f-), Name: "root"} │ │ rule: "non-data dependents removed before descriptor" │ │ - │ ├── • PreviousStagePrecedence dependency from DROPPED Function:{DescID: 109 (f-)} + │ ├── • PreviousTransactionPrecedence dependency from DROPPED Function:{DescID: 109 (f-)} │ │ rule: "descriptor dropped in transaction before removal" │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 109 (f-), ReferencedDescID: 101 (public)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_hash_sharded_index b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_hash_sharded_index index 0986d7442195..302b0d50e901 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_hash_sharded_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_hash_sharded_index @@ -19,7 +19,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} @@ -34,19 +34,19 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_16", ConstraintID: 2 (check_crdb_internal_j_shard_16-)} @@ -119,7 +119,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} @@ -134,19 +134,19 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ └── • ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_16", ConstraintID: 2 (check_crdb_internal_j_shard_16-)} @@ -209,7 +209,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} @@ -221,7 +221,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ │ rule: "column no longer public before dependents" │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED ColumnNotNull:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 0} │ │ │ rule: "ColumnNotNull transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-), IndexID: 2 (idx-)} @@ -248,7 +248,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx-)} @@ -263,7 +263,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ └── • CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} │ │ │ VALIDATED → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED CheckConstraint:{DescID: 104 (t), IndexID: 0, ConstraintID: 2 (check_crdb_internal_j_shard_16-)} │ │ │ rule: "CheckConstraint transitions to ABSENT uphold 2-version invariant: VALIDATED->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT ConstraintWithoutIndexName:{DescID: 104 (t), Name: "check_crdb_internal_j_shard_16", ConstraintID: 2 (check_crdb_internal_j_shard_16-)} @@ -324,7 +324,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_j_shard_16-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_j_shard_16", ColumnID: 3 (crdb_internal_j_shard_16-)} @@ -361,7 +361,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_partial_expression_index b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_partial_expression_index index aaf28cbcca84..c8715a86c6c7 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_partial_expression_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_partial_expression_index @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} @@ -31,7 +31,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 3 Mutation operations @@ -76,7 +76,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} @@ -91,7 +91,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 5 Mutation operations @@ -135,7 +135,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-), IndexID: 2 (idx-)} @@ -156,7 +156,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx-)} @@ -213,7 +213,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 3 (crdb_internal_idx_expr-)} @@ -244,7 +244,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_vanilla_index b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_vanilla_index index 25590240b771..59cc3fbd494f 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_vanilla_index +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_vanilla_index @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 1 Mutation operation @@ -46,7 +46,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 3 Mutation operations @@ -93,7 +93,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx-)} @@ -148,7 +148,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "idx", IndexID: 2 (idx-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_with_materialized_view_dep b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_with_materialized_view_dep index 048a43f01b0a..ab41294da930 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_with_materialized_view_dep +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_index_with_materialized_view_dep @@ -13,12 +13,12 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 24 elements transitioning toward ABSENT +│ ├── • 26 elements transitioning toward ABSENT │ │ │ │ │ ├── • SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} @@ -77,10 +77,19 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ rule: "column type removed before column family" │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 1 (j-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (v3-), Name: "j", ColumnID: 1 (j-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (j-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (v3-), ColumnID: 1 (j-), IndexID: 1 (v3_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "j", ColumnID: 1 (j-)} │ │ │ │ PUBLIC → ABSENT @@ -101,10 +110,28 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} +│ │ │ │ rule: "column constraint removed right before column reaches delete only" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (v3-), Name: "rowid", ColumnID: 2 (rowid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (rowid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnDefaultExpression:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 1 (v3_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "rowid", ColumnID: 2 (rowid-)} │ │ │ │ PUBLIC → ABSENT @@ -128,7 +155,10 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ rule: "column type dependents removed right before column type" │ │ │ │ │ ├── • ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} -│ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} +│ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • ColumnDefaultExpression:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} │ │ │ │ PUBLIC → ABSENT @@ -140,10 +170,16 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (v3-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ PUBLIC → ABSENT @@ -164,10 +200,16 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 106 (v3-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ PUBLIC → ABSENT @@ -187,11 +229,44 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 4294967294 (tableoid-)} │ │ │ rule: "column no longer public before dependents" │ │ │ +│ │ ├── • IndexColumn:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 1 (v3_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ +│ │ ├── • IndexColumn:{DescID: 106 (v3-), ColumnID: 1 (j-), IndexID: 1 (v3_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 106 (v3-), ColumnID: 1 (j-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ │ │ ├── • PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} -│ │ │ rule: "relation dropped before dependent index" +│ │ │ ├── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} +│ │ │ │ rule: "relation dropped before dependent index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 1 (v3_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 106 (v3-), ColumnID: 1 (j-), IndexID: 1 (v3_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 106 (v3-), Name: "v3_pkey", IndexID: 1 (v3_pkey-)} +│ │ │ rule: "dependents removed before index" │ │ │ │ │ └── • IndexName:{DescID: 106 (v3-), Name: "v3_pkey", IndexID: 1 (v3_pkey-)} │ │ │ PUBLIC → ABSENT @@ -202,7 +277,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} │ │ rule: "index no longer public before dependents, excluding columns" │ │ -│ └── • 21 Mutation operations +│ └── • 34 Mutation operations │ │ │ ├── • MarkDescriptorAsDropped │ │ DescriptorID: 106 @@ -292,14 +367,69 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ DescriptorID: 106 │ │ User: root │ │ -│ └── • AssertColumnFamilyIsRemoved +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 1 +│ │ TableID: 106 +│ │ +│ ├── • RemoveColumnNotNull +│ │ ColumnID: 2 +│ │ TableID: 106 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967295 +│ │ TableID: 106 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967294 +│ │ TableID: 106 +│ │ +│ ├── • AssertColumnFamilyIsRemoved +│ │ TableID: 106 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 2 +│ │ TableID: 106 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967295 +│ │ TableID: 106 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967294 +│ │ TableID: 106 +│ │ +│ ├── • MakeWriteOnlyIndexDeleteOnly +│ │ IndexID: 1 +│ │ TableID: 106 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 2 +│ │ IndexID: 1 +│ │ TableID: 106 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 1 +│ │ IndexID: 1 +│ │ Kind: 2 +│ │ TableID: 106 +│ │ +│ ├── • MakeIndexAbsent +│ │ IndexID: 1 +│ │ TableID: 106 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 1 +│ │ TableID: 106 +│ │ +│ └── • MakeDeleteOnlyColumnAbsent +│ ColumnID: 2 │ TableID: 106 │ ├── • PreCommitPhase │ │ │ ├── • Stage 1 of 2 in PreCommitPhase │ │ │ -│ │ ├── • 24 elements transitioning toward ABSENT +│ │ ├── • 26 elements transitioning toward ABSENT │ │ │ │ │ │ │ ├── • SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ │ VALIDATED → PUBLIC @@ -326,7 +456,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 1 (j-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "j", ColumnID: 1 (j-)} │ │ │ │ ABSENT → PUBLIC @@ -335,7 +465,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "rowid", ColumnID: 2 (rowid-)} │ │ │ │ ABSENT → PUBLIC @@ -344,13 +474,13 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnNotNull:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 0} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnDefaultExpression:{DescID: 106 (v3-), ColumnID: 2 (rowid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ ABSENT → PUBLIC @@ -359,7 +489,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 106 (v3-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 106 (v3-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC @@ -367,8 +497,14 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ ├── • ColumnType:{DescID: 106 (v3-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 106 (v3-), ColumnID: 2 (rowid-), IndexID: 1 (v3_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 106 (v3-), ColumnID: 1 (j-), IndexID: 1 (v3_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 106 (v3-), IndexID: 1 (v3_pkey-), ConstraintID: 1} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ └── • IndexName:{DescID: 106 (v3-), Name: "v3_pkey", IndexID: 1 (v3_pkey-)} │ │ │ ABSENT → PUBLIC @@ -385,7 +521,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ │ │ └── • Precedence dependency from DROPPED View:{DescID: 106 (v3-)} @@ -835,7 +971,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ ├── • IndexName:{DescID: 105 (v2), Name: "idx", IndexID: 2 (idx-)} @@ -865,7 +1001,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 106 (v3-), Name: "root"} │ │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DROPPED View:{DescID: 106 (v3-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED View:{DescID: 106 (v3-)} │ │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 106 (v3-), ReferencedDescID: 101 (public)} @@ -1000,7 +1136,7 @@ EXPLAIN (ddl, verbose) DROP INDEX idx CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (v2), ColumnID: 3 (rowid), IndexID: 2 (idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 105 (v2), IndexID: 2 (idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexName:{DescID: 105 (v2), Name: "idx", IndexID: 2 (idx-)} 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 490ef076524f..4fbb1f2f0963 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k+)} @@ -53,7 +53,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ WRITE_ONLY → PUBLIC │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ rule: "ensure columns are in increasing order" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ rule: "index dependents exist before index becomes public" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -139,7 +139,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ BACKFILL_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -154,7 +154,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 1 of 7; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 20 Mutation operations 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 52dfae5c017b..fcf7adbb512d 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k+)} @@ -53,7 +53,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -133,7 +133,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 19 Mutation operations @@ -256,7 +256,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 2 of 7; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 5 Mutation operations 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 694ad89ed7d4..ac4ffd73fd09 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k+)} @@ -53,7 +53,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -133,7 +133,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ BACKFILL_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: BACKFILL_ONLY->DELETE_ONLY" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 19 Mutation operations @@ -256,7 +256,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 3 of 7; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 5 Mutation operations 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 66eb71cb9842..cac45de31411 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k+)} @@ -53,7 +53,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -136,7 +136,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} │ │ │ │ rule: "dependents removed before index" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -145,7 +145,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 19 Mutation operations @@ -256,7 +256,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 4 of 7; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 5 Mutation operations 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 df9d80a51768..3d1c45773257 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k+)} @@ -53,7 +53,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -133,13 +133,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 19 Mutation operations @@ -250,7 +250,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -262,7 +262,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 5 of 7; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 6 Mutation operations 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 40507d0c5486..5c447b220235 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k+)} @@ -53,7 +53,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -133,13 +133,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ MERGE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: MERGE_ONLY->WRITE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 19 Mutation operations @@ -250,7 +250,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -262,7 +262,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 6 of 7; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 6 Mutation operations 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 ca8cc5a886a5..12188cb99899 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 @@ -17,7 +17,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k+)} @@ -53,7 +53,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ WRITE_ONLY → PUBLIC │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j+)} @@ -74,7 +74,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ │ ├── • SameStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j+)} │ │ │ │ rule: "ensure columns are in increasing order" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr+)} │ │ │ │ rule: "Column transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->PUBLIC" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr+)} @@ -98,7 +98,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx+)} │ │ │ │ rule: "SecondaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • Precedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx+)} @@ -133,13 +133,13 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ └── • 19 Mutation operations @@ -250,7 +250,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey-), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey+)} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey-)} @@ -262,7 +262,7 @@ EXPLAIN (ddl, verbose) rollback at post-commit stage 7 of 7; │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ rule: "dependents removed before index" │ │ - │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} + │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey+)} │ rule: "TemporaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ └── • 6 Mutation operations 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 cb53c3172ed7..1058ddf19052 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 @@ -15,7 +15,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -41,7 +41,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -61,7 +61,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -73,7 +73,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -88,7 +88,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 11 Mutation operations @@ -212,7 +212,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → BACKFILL_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -238,7 +238,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ ABSENT → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -258,7 +258,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -270,7 +270,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -285,7 +285,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ PUBLIC → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} +│ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ └── • 15 Mutation operations @@ -384,7 +384,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ DELETE_ONLY → WRITE_ONLY │ │ │ │ │ -│ │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -419,7 +419,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILL_ONLY → BACKFILLED │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} @@ -445,7 +445,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -468,7 +468,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -491,7 +491,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -508,7 +508,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -531,7 +531,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -552,7 +552,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ │ ├── • SameStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ rule: "primary index swap" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4, SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey+)} @@ -576,7 +576,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ │ │ ├── • IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -596,19 +596,19 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -641,7 +641,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} @@ -737,7 +737,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ TRANSIENT_DELETE_ONLY → TRANSIENT_ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ ├── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4, ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ │ │ ├── • Precedence dependency from TRANSIENT_ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4} @@ -751,7 +751,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "crdb_internal_idx_expr", ColumnID: 4 (crdb_internal_idx_expr-)} @@ -797,7 +797,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -812,7 +812,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} @@ -883,7 +883,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -917,7 +917,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN j CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} 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 2159a6cdcd75..c8f9c8c0f1e3 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 @@ -16,7 +16,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (k-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -124,7 +124,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ ABSENT → BACKFILL_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: ABSENT->BACKFILL_ONLY" │ │ │ ├── • 2 elements transitioning toward TRANSIENT_ABSENT @@ -138,7 +138,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ ABSENT → DELETE_ONLY │ │ │ -│ │ └── • PreviousStagePrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from ABSENT TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: ABSENT->DELETE_ONLY" │ │ │ ├── • 7 elements transitioning toward ABSENT @@ -146,7 +146,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (k-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -161,13 +161,13 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ PUBLIC → WRITE_ONLY │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from PUBLIC Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: PUBLIC->WRITE_ONLY" │ │ │ │ │ │ │ └── • Precedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -176,7 +176,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • ColumnName:{DescID: 104 (t), Name: "j", ColumnID: 2 (j-)} @@ -296,7 +296,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ │ rule: "index-column added to index before temp index receives writes" │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: DELETE_ONLY->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -322,7 +322,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} │ │ │ │ rule: "index-column added to index before index is backfilled" │ │ │ │ -│ │ │ ├── • PreviousStagePrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ ├── • PreviousTransactionPrecedence dependency from BACKFILL_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILL_ONLY->BACKFILLED" │ │ │ │ │ │ │ └── • Precedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} @@ -342,7 +342,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ BACKFILLED → DELETE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from BACKFILLED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: BACKFILLED->DELETE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -365,7 +365,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ DELETE_ONLY → MERGE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: DELETE_ONLY->MERGE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -388,7 +388,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGE_ONLY → MERGED │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGE_ONLY->MERGED" │ │ │ │ │ └── • 1 Backfill operation @@ -405,7 +405,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ MERGED → WRITE_ONLY │ │ │ │ -│ │ │ └── • PreviousStagePrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ │ └── • PreviousTransactionPrecedence dependency from MERGED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: MERGED->WRITE_ONLY" │ │ │ │ │ └── • 3 Mutation operations @@ -428,7 +428,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ └── • PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → VALIDATED │ │ │ -│ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} +│ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: WRITE_ONLY->VALIDATED" │ │ │ └── • 1 Validation operation @@ -452,7 +452,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ │ ├── • Precedence dependency from PUBLIC IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 3 (t_pkey+)} │ │ │ │ rule: "index dependents exist before index becomes public" │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 3 (t_pkey+), ConstraintID: 2, TemporaryIndexID: 4 (crdb_internal_index_4_name_placeholder), SourceIndexID: 1 (t_pkey-)} │ │ │ │ rule: "PrimaryIndex transitions to PUBLIC uphold 2-version invariant: VALIDATED->PUBLIC" │ │ │ │ │ │ │ └── • SameStagePrecedence dependency from PUBLIC IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 3 (t_pkey+)} @@ -476,7 +476,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ └── • TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ │ WRITE_ONLY → TRANSIENT_DELETE_ONLY │ │ │ - │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: WRITE_ONLY->TRANSIENT_DELETE_ONLY" │ │ │ ├── • 10 elements transitioning toward ABSENT @@ -484,25 +484,25 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ WRITE_ONLY → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from WRITE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: WRITE_ONLY->DELETE_ONLY" │ │ │ │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ PUBLIC → VALIDATED │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from PUBLIC PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED" │ │ │ │ │ ├── • IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} @@ -538,7 +538,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} @@ -638,7 +638,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k-), IndexID: 4 (crdb_internal_index_4_name_placeholder)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ └── • PreviousStagePrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} + │ │ └── • PreviousTransactionPrecedence dependency from TRANSIENT_DELETE_ONLY TemporaryIndex:{DescID: 104 (t), IndexID: 4 (crdb_internal_index_4_name_placeholder), ConstraintID: 3, SourceIndexID: 1 (t_pkey-)} │ │ rule: "TemporaryIndex transitions to TRANSIENT_ABSENT uphold 2-version invariant: TRANSIENT_DELETE_ONLY->TRANSIENT_ABSENT" │ │ │ ├── • 7 elements transitioning toward ABSENT @@ -646,7 +646,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ DELETE_ONLY → ABSENT │ │ │ │ - │ │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} + │ │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 4 (crdb_internal_idx_expr-)} │ │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 4 (crdb_internal_idx_expr-)} @@ -695,7 +695,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ │ VALIDATED → DELETE_ONLY │ │ │ │ - │ │ │ └── • PreviousStagePrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ │ └── • PreviousTransactionPrecedence dependency from VALIDATED PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: VALIDATED->WRITE_ONLY" │ │ │ │ │ └── • SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} @@ -710,7 +710,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 1 (i), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY SecondaryIndex:{DescID: 104 (t), IndexID: 2 (t_expr_k_idx-)} │ │ │ rule: "SecondaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_expr_k_idx", IndexID: 2 (t_expr_k_idx-)} @@ -781,7 +781,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ ├── • Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 3 (k-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 104 (t), Name: "k", ColumnID: 3 (k-)} @@ -842,7 +842,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ ├── • Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ DELETE_ONLY → ABSENT │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY Column:{DescID: 104 (t), ColumnID: 2 (j-)} │ │ │ rule: "Column transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnType:{DescID: 104 (t), ColumnFamilyID: 0 (primary), ColumnID: 2 (j-)} @@ -876,7 +876,7 @@ EXPLAIN (ddl, verbose) ALTER TABLE t DROP COLUMN k CASCADE; │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 104 (t), ColumnID: 3 (k-), IndexID: 1 (t_pkey-)} │ │ │ rule: "dependents removed before index" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} + │ │ ├── • PreviousTransactionPrecedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 104 (t), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ │ rule: "PrimaryIndex transitions to ABSENT uphold 2-version invariant: DELETE_ONLY->ABSENT" │ │ │ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 104 (t), Name: "t_pkey", IndexID: 1 (t_pkey-)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_schema b/pkg/sql/schemachanger/testdata/explain_verbose/drop_schema index e3a29f801125..cfd90a4d9f64 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_schema +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_schema @@ -213,7 +213,7 @@ EXPLAIN (ddl, verbose) DROP SCHEMA db.sc; │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 106 (sc-), Name: "root"} │ │ rule: "non-data dependents removed before descriptor" │ │ - │ ├── • PreviousStagePrecedence dependency from DROPPED Schema:{DescID: 106 (sc-)} + │ ├── • PreviousTransactionPrecedence dependency from DROPPED Schema:{DescID: 106 (sc-)} │ │ rule: "descriptor dropped in transaction before removal" │ │ │ └── • Precedence dependency from ABSENT SchemaParent:{DescID: 106 (sc-), ReferencedDescID: 104 (db)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_table b/pkg/sql/schemachanger/testdata/explain_verbose/drop_table index 79e321537b4a..fdae159bf837 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_table +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_table @@ -14,7 +14,7 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 27 elements transitioning toward ABSENT +│ ├── • 30 elements transitioning toward ABSENT │ │ │ │ │ ├── • Namespace:{DescID: 107 (t-), Name: "t", ReferencedDescID: 104 (db)} │ │ │ │ PUBLIC → ABSENT @@ -78,10 +78,19 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ rule: "column type removed before column family" │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 1 (k-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 107 (t-), Name: "k", ColumnID: 1 (k-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (k-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 1 (k-), IndexID: 1 (t_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "k", ColumnID: 1 (k-)} │ │ │ │ PUBLIC → ABSENT @@ -102,10 +111,19 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 2 (v-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 107 (t-), Name: "v", ColumnID: 2 (v-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (v-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 2 (v-), IndexID: 1 (t_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "v", ColumnID: 2 (v-)} │ │ │ │ PUBLIC → ABSENT @@ -126,10 +144,28 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} +│ │ │ │ rule: "column constraint removed right before column reaches delete only" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 107 (t-), Name: "rowid", ColumnID: 3 (rowid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 3 (rowid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnDefaultExpression:{DescID: 107 (t-), ColumnID: 3 (rowid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 1 (t_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "rowid", ColumnID: 3 (rowid-)} │ │ │ │ PUBLIC → ABSENT @@ -153,10 +189,13 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ rule: "column type dependents removed right before column type" │ │ │ │ │ ├── • ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} -│ │ │ rule: "relation dropped before dependent constraint" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "relation dropped before dependent constraint" +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} +│ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • ColumnDefaultExpression:{DescID: 107 (t-), ColumnID: 3 (rowid-)} │ │ │ │ PUBLIC → ABSENT @@ -168,10 +207,16 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 107 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ PUBLIC → ABSENT @@ -192,10 +237,16 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 107 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ PUBLIC → ABSENT @@ -215,11 +266,59 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 4294967294 (tableoid-)} │ │ │ rule: "column no longer public before dependents" │ │ │ +│ │ ├── • IndexColumn:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 1 (t_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ +│ │ ├── • IndexColumn:{DescID: 107 (t-), ColumnID: 1 (k-), IndexID: 1 (t_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 1 (k-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ +│ │ ├── • IndexColumn:{DescID: 107 (t-), ColumnID: 2 (v-), IndexID: 1 (t_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 107 (t-), ColumnID: 2 (v-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ │ │ ├── • PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} -│ │ │ rule: "relation dropped before dependent index" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 107 (t-)} +│ │ │ │ rule: "relation dropped before dependent index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 1 (t_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 1 (k-), IndexID: 1 (t_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 107 (t-), ColumnID: 2 (v-), IndexID: 1 (t_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 107 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} +│ │ │ rule: "dependents removed before index" │ │ │ │ │ └── • IndexName:{DescID: 107 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} │ │ │ PUBLIC → ABSENT @@ -230,7 +329,7 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "index no longer public before dependents, excluding columns" │ │ -│ └── • 22 Mutation operations +│ └── • 38 Mutation operations │ │ │ ├── • MarkDescriptorAsDropped │ │ DescriptorID: 107 @@ -323,14 +422,84 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ DescriptorID: 107 │ │ User: root │ │ -│ └── • AssertColumnFamilyIsRemoved +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 1 +│ │ TableID: 107 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 2 +│ │ TableID: 107 +│ │ +│ ├── • RemoveColumnNotNull +│ │ ColumnID: 3 +│ │ TableID: 107 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967295 +│ │ TableID: 107 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967294 +│ │ TableID: 107 +│ │ +│ ├── • AssertColumnFamilyIsRemoved +│ │ TableID: 107 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 3 +│ │ TableID: 107 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967295 +│ │ TableID: 107 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967294 +│ │ TableID: 107 +│ │ +│ ├── • MakeWriteOnlyIndexDeleteOnly +│ │ IndexID: 1 +│ │ TableID: 107 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 3 +│ │ IndexID: 1 +│ │ TableID: 107 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 1 +│ │ IndexID: 1 +│ │ Kind: 2 +│ │ TableID: 107 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 2 +│ │ IndexID: 1 +│ │ Kind: 2 +│ │ Ordinal: 1 +│ │ TableID: 107 +│ │ +│ ├── • MakeIndexAbsent +│ │ IndexID: 1 +│ │ TableID: 107 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 1 +│ │ TableID: 107 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 2 +│ │ TableID: 107 +│ │ +│ └── • MakeDeleteOnlyColumnAbsent +│ ColumnID: 3 │ TableID: 107 │ ├── • PreCommitPhase │ │ │ ├── • Stage 1 of 2 in PreCommitPhase │ │ │ -│ │ ├── • 27 elements transitioning toward ABSENT +│ │ ├── • 30 elements transitioning toward ABSENT │ │ │ │ │ │ │ ├── • Namespace:{DescID: 107 (t-), Name: "t", ReferencedDescID: 104 (db)} │ │ │ │ ABSENT → PUBLIC @@ -357,7 +526,7 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 1 (k-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "k", ColumnID: 1 (k-)} │ │ │ │ ABSENT → PUBLIC @@ -366,7 +535,7 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 2 (v-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "v", ColumnID: 2 (v-)} │ │ │ │ ABSENT → PUBLIC @@ -375,7 +544,7 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 3 (rowid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "rowid", ColumnID: 3 (rowid-)} │ │ │ │ ABSENT → PUBLIC @@ -384,13 +553,13 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnNotNull:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 0} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnDefaultExpression:{DescID: 107 (t-), ColumnID: 3 (rowid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ ABSENT → PUBLIC @@ -399,7 +568,7 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 107 (t-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 107 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC @@ -407,8 +576,17 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ │ ├── • ColumnType:{DescID: 107 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 107 (t-), ColumnID: 3 (rowid-), IndexID: 1 (t_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 107 (t-), ColumnID: 1 (k-), IndexID: 1 (t_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 107 (t-), ColumnID: 2 (v-), IndexID: 1 (t_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 107 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ └── • IndexName:{DescID: 107 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} │ │ │ ABSENT → PUBLIC @@ -939,7 +1117,7 @@ EXPLAIN (ddl, verbose) DROP TABLE db.sc.t; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 107 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Table:{DescID: 107 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Table:{DescID: 107 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 107 (t-), ReferencedDescID: 106 (sc)} diff --git a/pkg/sql/schemachanger/testdata/explain_verbose/drop_table_udf_default b/pkg/sql/schemachanger/testdata/explain_verbose/drop_table_udf_default index de475fcc38d1..f5b53b6ddf1a 100644 --- a/pkg/sql/schemachanger/testdata/explain_verbose/drop_table_udf_default +++ b/pkg/sql/schemachanger/testdata/explain_verbose/drop_table_udf_default @@ -11,7 +11,7 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ └── • Stage 1 of 1 in StatementPhase │ │ -│ ├── • 23 elements transitioning toward ABSENT +│ ├── • 25 elements transitioning toward ABSENT │ │ │ │ │ ├── • Namespace:{DescID: 105 (t-), Name: "t", ReferencedDescID: 100 (defaultdb)} │ │ │ │ PUBLIC → ABSENT @@ -66,10 +66,25 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ rule: "column type removed before column family" │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 1 (i-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • SameStagePrecedence dependency from ABSENT ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} +│ │ │ │ rule: "column constraint removed right before column reaches delete only" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 105 (t-), Name: "i", ColumnID: 1 (i-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 1 (i-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 1 (t_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "i", ColumnID: 1 (i-)} │ │ │ │ PUBLIC → ABSENT @@ -90,16 +105,31 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} -│ │ │ rule: "relation dropped before dependent constraint" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "relation dropped before dependent constraint" +│ │ │ │ +│ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 1 (i-)} +│ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 2 (b-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 105 (t-), Name: "b", ColumnID: 2 (b-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 2 (b-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnDefaultExpression:{DescID: 105 (t-), ColumnID: 2 (b-), ReferencedFunctionIDs: [104 (#104)]} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t-), ColumnID: 2 (b-), IndexID: 1 (t_pkey-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "b", ColumnID: 2 (b-)} │ │ │ │ PUBLIC → ABSENT @@ -132,10 +162,16 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 105 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ PUBLIC → ABSENT @@ -156,10 +192,16 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ rule: "column no longer public before dependents" │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ PUBLIC → WRITE_ONLY +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} -│ │ │ rule: "relation dropped before dependent column" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "relation dropped before dependent column" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT ColumnName:{DescID: 105 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} +│ │ │ │ rule: "dependents removed before column" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} +│ │ │ rule: "dependents removed before column" │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ PUBLIC → ABSENT @@ -179,11 +221,44 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ └── • Precedence dependency from WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 4294967294 (tableoid-)} │ │ │ rule: "column no longer public before dependents" │ │ │ +│ │ ├── • IndexColumn:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 1 (t_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 1 (i-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ +│ │ ├── • IndexColumn:{DescID: 105 (t-), ColumnID: 2 (b-), IndexID: 1 (t_pkey-)} +│ │ │ │ PUBLIC → ABSENT +│ │ │ │ +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "descriptor dropped before dependent element removal" +│ │ │ │ +│ │ │ ├── • Precedence dependency from WRITE_ONLY Column:{DescID: 105 (t-), ColumnID: 2 (b-)} +│ │ │ │ rule: "column no longer public before dependents" +│ │ │ │ +│ │ │ └── • Precedence dependency from DELETE_ONLY PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} +│ │ │ rule: "index drop mutation visible before cleaning up index columns" +│ │ │ │ │ ├── • PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} -│ │ │ │ PUBLIC → VALIDATED +│ │ │ │ PUBLIC → ABSENT │ │ │ │ -│ │ │ └── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} -│ │ │ rule: "relation dropped before dependent index" +│ │ │ ├── • Precedence dependency from DROPPED Table:{DescID: 105 (t-)} +│ │ │ │ rule: "relation dropped before dependent index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 1 (t_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ ├── • Precedence dependency from ABSENT IndexColumn:{DescID: 105 (t-), ColumnID: 2 (b-), IndexID: 1 (t_pkey-)} +│ │ │ │ rule: "dependents removed before index" +│ │ │ │ +│ │ │ └── • Precedence dependency from ABSENT IndexName:{DescID: 105 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} +│ │ │ rule: "dependents removed before index" │ │ │ │ │ └── • IndexName:{DescID: 105 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} │ │ │ PUBLIC → ABSENT @@ -194,7 +269,7 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ └── • Precedence dependency from VALIDATED PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} │ │ rule: "index no longer public before dependents, excluding columns" │ │ -│ └── • 20 Mutation operations +│ └── • 33 Mutation operations │ │ │ ├── • MarkDescriptorAsDropped │ │ DescriptorID: 105 @@ -281,14 +356,69 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ DescriptorID: 105 │ │ User: root │ │ -│ └── • AssertColumnFamilyIsRemoved +│ ├── • RemoveColumnNotNull +│ │ ColumnID: 1 +│ │ TableID: 105 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 2 +│ │ TableID: 105 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967295 +│ │ TableID: 105 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 4294967294 +│ │ TableID: 105 +│ │ +│ ├── • AssertColumnFamilyIsRemoved +│ │ TableID: 105 +│ │ +│ ├── • MakeWriteOnlyColumnDeleteOnly +│ │ ColumnID: 1 +│ │ TableID: 105 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967295 +│ │ TableID: 105 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 4294967294 +│ │ TableID: 105 +│ │ +│ ├── • MakeWriteOnlyIndexDeleteOnly +│ │ IndexID: 1 +│ │ TableID: 105 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 1 +│ │ IndexID: 1 +│ │ TableID: 105 +│ │ +│ ├── • RemoveColumnFromIndex +│ │ ColumnID: 2 +│ │ IndexID: 1 +│ │ Kind: 2 +│ │ TableID: 105 +│ │ +│ ├── • MakeIndexAbsent +│ │ IndexID: 1 +│ │ TableID: 105 +│ │ +│ ├── • MakeDeleteOnlyColumnAbsent +│ │ ColumnID: 1 +│ │ TableID: 105 +│ │ +│ └── • MakeDeleteOnlyColumnAbsent +│ ColumnID: 2 │ TableID: 105 │ ├── • PreCommitPhase │ │ │ ├── • Stage 1 of 2 in PreCommitPhase │ │ │ -│ │ ├── • 23 elements transitioning toward ABSENT +│ │ ├── • 25 elements transitioning toward ABSENT │ │ │ │ │ │ │ ├── • Namespace:{DescID: 105 (t-), Name: "t", ReferencedDescID: 100 (defaultdb)} │ │ │ │ ABSENT → PUBLIC @@ -312,7 +442,7 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 1 (i-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "i", ColumnID: 1 (i-)} │ │ │ │ ABSENT → PUBLIC @@ -321,10 +451,10 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnNotNull:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 0} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 2 (b-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "b", ColumnID: 2 (b-)} │ │ │ │ ABSENT → PUBLIC @@ -336,7 +466,7 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "crdb_internal_mvcc_timestamp", ColumnID: 4294967295 (crdb_internal_mvcc_timestamp-)} │ │ │ │ ABSENT → PUBLIC @@ -345,7 +475,7 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • Column:{DescID: 105 (t-), ColumnID: 4294967294 (tableoid-)} -│ │ │ │ WRITE_ONLY → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ ├── • ColumnName:{DescID: 105 (t-), Name: "tableoid", ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC @@ -353,8 +483,14 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ │ ├── • ColumnType:{DescID: 105 (t-), ColumnFamilyID: 0 (primary-), ColumnID: 4294967294 (tableoid-)} │ │ │ │ ABSENT → PUBLIC │ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 105 (t-), ColumnID: 1 (i-), IndexID: 1 (t_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ +│ │ │ ├── • IndexColumn:{DescID: 105 (t-), ColumnID: 2 (b-), IndexID: 1 (t_pkey-)} +│ │ │ │ ABSENT → PUBLIC +│ │ │ │ │ │ │ ├── • PrimaryIndex:{DescID: 105 (t-), IndexID: 1 (t_pkey-), ConstraintID: 1} -│ │ │ │ VALIDATED → PUBLIC +│ │ │ │ ABSENT → PUBLIC │ │ │ │ │ │ │ └── • IndexName:{DescID: 105 (t-), Name: "t_pkey", IndexID: 1 (t_pkey-)} │ │ │ ABSENT → PUBLIC @@ -812,7 +948,7 @@ EXPLAIN (ddl, verbose) DROP TABLE t; │ │ ├── • Precedence dependency from ABSENT UserPrivileges:{DescID: 105 (t-), Name: "root"} │ │ │ rule: "non-data dependents removed before descriptor" │ │ │ - │ │ ├── • PreviousStagePrecedence dependency from DROPPED Table:{DescID: 105 (t-)} + │ │ ├── • PreviousTransactionPrecedence dependency from DROPPED Table:{DescID: 105 (t-)} │ │ │ rule: "descriptor dropped in transaction before removal" │ │ │ │ │ ├── • Precedence dependency from ABSENT SchemaChild:{DescID: 105 (t-), ReferencedDescID: 101 (public)}