Skip to content

Commit 9d5a1fa

Browse files
craig[bot]DrewKimballbghalkev-caoyuzefovich
committed
148539: sql: add storage param for region column inference r=michae2,rafiss,yuzefovich a=DrewKimball #### sql: add storage param for region column inference This commit adds a new storage parameter to the table descriptor `infer_rbr_region_col_using_constraint`. It will be used by following commits/PRs to determine a foreign-key constraint that will be used to look up values for the RBR region column from the FK parent table. Informs #148243 Release note: None #### sql: implement new storage param in the schema changer This commit implements the schema-change and validation logic for the new storage param for region-column inference. This involves looking up the referenced FK constraint on the table descriptor, and ensuring it has the correct columns, as well as that the locality is RBR and no computed columns reference the region column. This commit also adds a set of logic tests for the process of setting and unsetting the new storage param, without yet testing the (currently unimplemented) functionality. Informs #148243 Release note: None 149096: sql: use friendly schema changes status messages r=yuzefovich a=bghal Previously the job status message provided limited information. It required knowledge of the schema change architecture to be actionable. The status message is expanded to be more user-friendly. Fixes: #125560 Epic: CRDB-42485 Release note (sql change): Schema change job status messages provide additional information. 150149: roachtest: increase restore timeouts for fingerprinting r=yuzefovich a=kev-cao Since validating fingerprints is now the default behavior for restore roachtests, we are seeing some test timeouts across the suite. This commit increases the timeout to account for any fingerprints on all of our restores. Fixes: #149771 Release note: None 150213: sql: include write buffering info to EXPLAIN ANALYZE top level r=yuzefovich a=yuzefovich In order to make it easier to notice that write buffering is enabled, we now will include top-level `write buffering enabled` message to the output of EXPLAIN ANALYZE when write buffering is enabled for all mutations as well as read-only stmts that are part of explicit txns. Touches: #150212. Epic: None Release note: None 150250: storage: disable value separation by default r=yuzefovich a=annrpom We disable value separation for now until we root cause #150216. Epic: none Release note: None 150255: sql/schemachanger: properly discard zone configs for sequences r=yuzefovich a=spilchen Discarding zone configs via the declarative schema changer was a no-op for sequences, leaving stale configs. This was due to not loading scpb.TableZoneConfig elements for sequences. This change ensures those elements are loaded, so configs are properly removed. Fixes #150252 Epic: none Release note (bug fix): Fixes an issue where discarding zone configs on sequences did not remove the actual configuration. Co-authored-by: Drew Kimball <[email protected]> Co-authored-by: Brendan Gerrity <[email protected]> Co-authored-by: Kevin Cao <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Annie Pompa <[email protected]> Co-authored-by: Matt Spilchen <[email protected]>
7 parents 180e50a + c11b16d + 54535c1 + 179f8c2 + 2d68329 + 97834df + dd52aa4 commit 9d5a1fa

File tree

786 files changed

+3676
-2365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

786 files changed

+3676
-2365
lines changed

docs/generated/settings/settings-for-tenants.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ feature.backup.enabled boolean true set to true to enable backups, false to disa
7373
feature.changefeed.enabled boolean true set to true to enable changefeeds, false to disable; default is true application
7474
feature.export.enabled boolean true set to true to enable exports, false to disable; default is true application
7575
feature.import.enabled boolean true set to true to enable imports, false to disable; default is true application
76+
feature.infer_rbr_region_col_using_constraint.enabled boolean false set to true to enable looking up the region column via a foreign key constraint in a REGIONAL BY ROW table, false to disable; default is false application
7677
feature.restore.enabled boolean true set to true to enable restore, false to disable; default is true application
7778
feature.schema_change.enabled boolean true set to true to enable schema changes, false to disable; default is true application
7879
feature.stats.enabled boolean true set to true to enable CREATE STATISTICS/ANALYZE, false to disable; default is true application

docs/generated/settings/settings.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
<tr><td><div id="setting-feature-changefeed-enabled" class="anchored"><code>feature.changefeed.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable changefeeds, false to disable; default is true</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
7979
<tr><td><div id="setting-feature-export-enabled" class="anchored"><code>feature.export.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable exports, false to disable; default is true</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
8080
<tr><td><div id="setting-feature-import-enabled" class="anchored"><code>feature.import.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable imports, false to disable; default is true</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
81+
<tr><td><div id="setting-feature-infer-rbr-region-col-using-constraint-enabled" class="anchored"><code>feature.infer_rbr_region_col_using_constraint.enabled</code></div></td><td>boolean</td><td><code>false</code></td><td>set to true to enable looking up the region column via a foreign key constraint in a REGIONAL BY ROW table, false to disable; default is false</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
8182
<tr><td><div id="setting-feature-restore-enabled" class="anchored"><code>feature.restore.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable restore, false to disable; default is true</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
8283
<tr><td><div id="setting-feature-schema-change-enabled" class="anchored"><code>feature.schema_change.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable schema changes, false to disable; default is true</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
8384
<tr><td><div id="setting-feature-stats-enabled" class="anchored"><code>feature.stats.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>set to true to enable CREATE STATISTICS/ANALYZE, false to disable; default is true</td><td>Serverless/Dedicated/Self-Hosted</td></tr>

pkg/ccl/logictestccl/testdata/logic_test/provisioning

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ WHERE username = 'role_with_provisioning'
4242
AND option = 'PROVISIONSRC'
4343
----
4444
ldap:foo.bar
45-

pkg/ccl/logictestccl/testdata/logic_test/regional_by_row

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ statement ok
435435
ALTER TABLE regional_by_row_table ADD CONSTRAINT unique_b_a UNIQUE(b, a)
436436

437437
# Tests dropping a referenced column in REGIONAL BY ROW does not succeed.
438-
statement error cannot drop column crdb_region as it is used to store the region in a REGIONAL BY ROW table\nHINT: You must change the table locality before dropping this table
438+
statement error cannot drop column crdb_region as it is used to store the region in a REGIONAL BY ROW table\nHINT: You must change the table locality before dropping this column
439439
ALTER TABLE regional_by_row_table DROP COLUMN crdb_region
440440

441441
# Tests changing the PK of a regional by row table.
@@ -619,7 +619,7 @@ pk a b crdb_region_col
619619
20 NULL NULL ap-southeast-2
620620

621621
# Tests dropping a referenced column in REGIONAL BY ROW does not succeed.
622-
statement error cannot drop column crdb_region_col as it is used to store the region in a REGIONAL BY ROW table\nHINT: You must change the table locality before dropping this table
622+
statement error cannot drop column crdb_region_col as it is used to store the region in a REGIONAL BY ROW table\nHINT: You must change the table locality before dropping this column
623623
ALTER TABLE regional_by_row_table_as DROP COLUMN crdb_region_col
624624

625625
# Tests for altering the survivability of a REGIONAL BY ROW table.

0 commit comments

Comments
 (0)