Skip to content

Commit f3394f5

Browse files
committed
Remove mention of 'declarative' schema changer'
Fixes DOC-8693 Summary: - Remove mentions of "declarative schema changer" (DSC) for the following reasons: - 1. It is enabled by default, and 99% of users will never change the relevant setting or even need to know what that is. - 2. Its existence is an internal implementation detail that is fine for internal TSE runbooks to refer to, but should not really be in customer-facing docs since "it uses two different implementations on the inside, one of which we're migrating away from" should not be a thing that matters to 99% of users unless there is a specific problem they are working with TSE to solve.
1 parent 57c67ca commit f3394f5

12 files changed

+6
-54
lines changed

Diff for: src/current/_includes/releases/v25.1/upgrade-finalization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ During a major-version upgrade, certain features and performance improvements ma
22

33
- A cluster must have an [Enterprise license]({% link v25.1/licensing-faqs.md %}#set-a-license) or a [trial license]({% link v25.1/licensing-faqs.md %}#obtain-a-license) set before an upgrade to v25.1 can be finalized.
44
- Support for XA transactions, which allow CockroachDB to participate in distributed transactions with other resources (e.g. databases or message queues) using a two-phase commit protocol. [#129448](https://github.com/cockroachdb/cockroach/pull/129448)
5-
- [`ALTER TABLE ... ALTER COLUMN TYPE`]({% link v25.1/alter-table.md %}#alter-column-data-types) is in [General Availability (GA)]({% link v25.1/cockroachdb-feature-availability.md %}#feature-availability-phases) and takes advantage of the logic in the [declarative schema changer]({% link v25.1/online-schema-changes.md %}#declarative-schema-changer).
5+
- [`ALTER TABLE ... ALTER COLUMN TYPE`]({% link v25.1/alter-table.md %}#alter-column-data-types) is in [General Availability (GA)]({% link v25.1/cockroachdb-feature-availability.md %}#feature-availability-phases).
66
- Jobs system changes:
77
- `SHOW JOBS` is now based on a new mechanism for storing information about the progress and status of running jobs. [#139230](https://github.com/cockroachdb/cockroach/pull/139230)
88
- `ALTER JOB ... OWNER TO` can now be used to transfer ownership of a job between users/roles. [#138139](https://github.com/cockroachdb/cockroach/pull/138139)

Diff for: src/current/_includes/v25.1/misc/declarative-schema-changer-note.md

-3
This file was deleted.

Diff for: src/current/_includes/v25.1/misc/session-vars.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
| <a id="transaction-status"></a> `transaction_status` | The state of the current transaction. See [Transactions]({% link {{ page.version.version }}/transactions.md %}) for more details. | `NoTxn` | No | Yes |
9090
| <a id="transaction-timeout"></a> `transaction_timeout` | Aborts an explicit [transaction]({% link {{ page.version.version }}/transactions.md %}) when it runs longer than the configured duration. Stored in milliseconds; can be expressed in milliseconds or as an [`INTERVAL`]({% link {{ page.version.version }}/interval.md %}). | `0` | Yes | Yes |
9191
| <a id="troubleshooting_mode_enabled"></a> `troubleshooting_mode_enabled` | When enabled, avoid performing additional work on queries, such as collecting and emitting telemetry data. This session variable is particularly useful when the cluster is experiencing issues, unavailability, or failure. | `off` | Yes | Yes |
92-
| <a id="use_declarative_schema_changer"></a> `use_declarative_schema_changer` | Whether to use the declarative schema changer for supported statements. See [Declarative schema changer]({% link {{ page.version.version }}/online-schema-changes.md %}#declarative-schema-changer) for more details. | `on` | Yes | Yes |
92+
| <a id="use_declarative_schema_changer"></a> `use_declarative_schema_changer` | Whether to use the declarative schema changer for supported statements. | `on` | Yes | Yes |
9393
| <a id="vectorize"></a> `vectorize` | The vectorized execution engine mode. Options include `on` and `off`. For more details, see [Configure vectorized execution for CockroachDB]({% link {{ page.version.version }}/vectorized-execution.md %}#configure-vectorized-execution). | `on` | Yes | Yes |
9494
| <a id="virtual_cluster_name"></a> `virtual_cluster_name` | The name of the virtual cluster that the SQL client is connected to. | Session-dependent | No | Yes |
9595

Diff for: src/current/v25.1/changefeed-best-practices.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The key areas to monitor when running changefeeds:
5151

5252
## Manage changefeeds and schema changes
5353

54-
When a schema change is issued that causes a column backfill, it can result in a changefeed emitting [duplicate messages]({% link {{ page.version.version }}/changefeed-messages.md %}#schema-changes-with-column-backfill) for an event. We recommend issuing schema changes **outside of explicit transactions** to make use of the declarative schema changer, which does not perform column backfill for the [schema changes it supports]({% link {{ page.version.version }}/online-schema-changes.md %}#declarative-schema-changer). For more details on schema changes and column backfill generally, refer to the [Online Schema Changes]({% link {{ page.version.version }}/online-schema-changes.md %}) page.
54+
When a schema change is issued that causes a column backfill, it can result in a changefeed emitting [duplicate messages]({% link {{ page.version.version }}/changefeed-messages.md %}#schema-changes-with-column-backfill) for an event. We recommend issuing schema changes **outside of explicit transactions**. For more details on schema changes and column backfill generally, refer to the [Online Schema Changes]({% link {{ page.version.version }}/online-schema-changes.md %}) page.
5555

5656
You can also use the [`schema_change_events`]({% link {{ page.version.version }}/create-changefeed.md %}#schema-change-events) and [`schema_change_policy`]({% link {{ page.version.version }}/create-changefeed.md %}#schema-change-policy) options to define a schema change type and an associated policy that will modify how the changefeed behaves under the schema change.
5757

Diff for: src/current/v25.1/changefeed-messages.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ The `min_checkpoint_frequency` option controls how often nodes flush their progr
422422

423423
## Schema Changes
424424

425-
In v22.1, CockroachDB introduced the [declarative schema changer]({% link {{ page.version.version }}/online-schema-changes.md %}#declarative-schema-changer). When schema changes happen that use the declarative schema changer by default, changefeeds will **not** emit duplicate records for the table that is being altered. It will only emit a copy of the table using the new schema. Refer to [Schema changes with column backfill](#schema-changes-with-column-backfill) for examples of this.
425+
For some schema changes, changefeeds will **not** emit duplicate records for the table that is being altered. Instead, the changefeed will only emit a copy of the table using the new schema. Refer to [Schema changes with column backfill](#schema-changes-with-column-backfill) for examples of this.
426426

427427
### Avro schema changes
428428

@@ -438,10 +438,6 @@ Schema validation tools should ignore the `__crdb__` field. This is an internal
438438

439439
When schema changes with column backfill (e.g., adding a column with a default, adding a [stored computed column]({% link {{ page.version.version }}/computed-columns.md %}), adding a `NOT NULL` column, dropping a column) are made to watched rows, CockroachDB emits a copy of the table using the new schema.
440440

441-
{{site.data.alerts.callout_info}}
442-
Schema changes that do **not** use the declarative schema changer by default will trigger a changefeed to emit a copy of the table being altered as well as a copy of the table using the new schema. For a list of supported schema changes, refer to the [Declarative schema changer]({% link {{ page.version.version }}/online-schema-changes.md %}#declarative-schema-changer) section.
443-
{{site.data.alerts.end}}
444-
445441
The following example demonstrates the messages you will receive after creating a changefeed and then applying a schema change to the watched table:
446442

447443
{% include_cached copy-clipboard.html %}
@@ -488,7 +484,7 @@ After the schema change, the changefeed will emit a copy of the table with the n
488484
[3] {"id": 3, "likes_treats": true, "name": "Ernie"}
489485
~~~
490486

491-
If the schema change does **not** use the declarative schema changer by default, the changefeed will emit a copy of the altered table and a copy of the table using the new schema:
487+
For some schema changes, the changefeed will emit a copy of the altered table and a copy of the table using the new schema:
492488

493489
~~~json
494490
[1] {"id": 1, "name": "Petee H"}

Diff for: src/current/v25.1/drop-database.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ The `DROP DATABASE` [statement]({% link {{ page.version.version }}/sql-statement
99

1010
{% include {{ page.version.version }}/misc/schema-change-stmt-note.md %}
1111

12-
{% include {{ page.version.version }}/misc/declarative-schema-changer-note.md %}
13-
1412
## Required privileges
1513

1614
The user must have the `DROP` [privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#managing-privileges) on the database and on all tables in the database.

Diff for: src/current/v25.1/drop-schema.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ The `DROP SCHEMA` [statement]({% link {{ page.version.version }}/sql-statements.
99

1010
{% include {{ page.version.version }}/misc/schema-change-stmt-note.md %}
1111

12-
{% include {{ page.version.version }}/misc/declarative-schema-changer-note.md %}
13-
1412
## Required privileges
1513

1614
The user must have the `DROP` [privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#managing-privileges) on the schema and on all tables in the schema. If the user is the owner of the schema, `DROP` privileges are not necessary.

Diff for: src/current/v25.1/drop-table.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ The `DROP TABLE` [statement]({% link {{ page.version.version }}/sql-statements.m
99

1010
{% include {{ page.version.version }}/misc/schema-change-stmt-note.md %}
1111

12-
{% include {{ page.version.version }}/misc/declarative-schema-changer-note.md %}
13-
1412
## Required privileges
1513

1614
The user must have the `DROP` [privilege]({% link {{ page.version.version }}/security-reference/authorization.md %}#managing-privileges) on the specified table(s). If `CASCADE` is used, the user must have the privileges required to drop each dependent object as well.

Diff for: src/current/v25.1/drop-type.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ The `DROP TYPE` [statement]({% link {{ page.version.version }}/sql-statements.md
99

1010
{% include {{ page.version.version }}/misc/schema-change-stmt-note.md %}
1111

12-
{% include {{ page.version.version }}/misc/declarative-schema-changer-note.md %}
13-
1412
## Synopsis
1513

1614
<div>

Diff for: src/current/v25.1/known-limitations.md

-4
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ See: https://go.crdb.dev/issue-v/42508/v24.2
217217

218218
{% include {{ page.version.version }}/known-limitations/schema-changes-between-prepared-statements.md %}
219219

220-
#### Declarative schema changer does not track rows in `system.privileges`
221-
222-
The [declarative schema changer]({% link {{ page.version.version }}/online-schema-changes.md %}#declarative-schema-changer) does not track rows in the `system.privileges` table, which prevents the declarative schema changer from successfully running the [`DROP OWNED BY`]({% link {{ page.version.version }}/drop-owned-by.md %}) statement. [#88149](https://github.com/cockroachdb/cockroach/issues/88149)
223-
224220
#### New values generated by `DEFAULT` expressions during `ALTER TABLE ADD COLUMN`
225221

226222
When executing an [`ALTER TABLE ADD COLUMN`]({% link {{ page.version.version }}/alter-table.md %}#add-column) statement with a [`DEFAULT`]({% link {{ page.version.version }}/default-value.md %}) expression, new values generated:

Diff for: src/current/v25.1/online-schema-changes.md

-29
Original file line numberDiff line numberDiff line change
@@ -62,35 +62,6 @@ If a schema change fails, the schema change job will be cleaned up automatically
6262

6363
For advice about how to avoid running out of space during an online schema change, refer to [Estimate your storage capacity before performing online schema changes](#estimate-your-storage-capacity-before-performing-online-schema-changes).
6464

65-
## Declarative schema changer
66-
67-
CockroachDB only guarantees atomicity for schema changes within single statement transactions, either implicit transactions or in an explicit transaction with a single schema change statement. The declarative schema changer is the next iteration of how schema changes will be performed in CockroachDB. By planning schema change operations in a more principled manner, the declarative schema changer will ultimately make transactional schema changes possible. You can identify jobs that are using the declarative schema changer by running [`SHOW JOBS`]({% link {{ page.version.version }}/show-jobs.md %}) and finding jobs with a `job_type` of `NEW SCHEMA CHANGE`.
68-
69-
The following statements use the declarative schema changer by default:
70-
71-
- [`DROP DATABASE`]({% link {{ page.version.version }}/drop-database.md %})
72-
- [`DROP SCHEMA`]({% link {{ page.version.version }}/drop-schema.md %})
73-
- [`DROP TABLE`]({% link {{ page.version.version }}/drop-table.md %})
74-
- [`DROP TYPE`]({% link {{ page.version.version }}/drop-type.md %})
75-
- [`CREATE FUNCTION`]({% link {{ page.version.version }}/create-function.md %})
76-
- [`DROP FUNCTION`]({% link {{ page.version.version }}/drop-function.md %})
77-
- [`ALTER TABLE ... ADD CONSTRAINT ... CHECK`]({% link {{ page.version.version }}/alter-table.md %}#add-constraint)
78-
- [`ALTER TABLE ... ADD CONSTRAINT ... CHECK ... NOT VALID`]({% link {{ page.version.version }}/alter-table.md %}#add-constraint)
79-
- [`ALTER TABLE ... ADD CONSTRAINT ... FOREIGN KEY`]({% link {{ page.version.version }}/alter-table.md %}#add-constraint)
80-
- [`ALTER TABLE ... ADD CONSTRAINT ... FOREIGN KEY ... NOT VALID`]({% link {{ page.version.version }}/alter-table.md %}#add-constraint)
81-
- [`ALTER TABLE ... VALIDATE CONSTRAINT`]({% link {{ page.version.version }}/alter-table.md %}#drop-constraint)
82-
- [`ALTER TABLE ... DROP CONSTRAINT`]({% link {{ page.version.version }}/alter-table.md %}#validate-constraint)
83-
- [`ALTER TABLE ... ALTER COLUMN TYPE`]({% link {{ page.version.version }}/alter-table.md %}#alter-column-data-types)
84-
- [`CREATE SEQUENCE`]({% link {{page.version.version}}/create-sequence.md %})
85-
86-
Until all schema change statements are moved to use the declarative schema changer you can enable and disable the declarative schema changer for supported statements using the `sql.defaults.use_declarative_schema_changer` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}#setting-sql-defaults-use-declarative-schema-changer) and the `use_declarative_schema_changer` [session variable]({% link {{ page.version.version }}/set-vars.md %}#use_declarative_schema_changer).
87-
88-
{{site.data.alerts.callout_danger}}
89-
Declarative schema changer statements and legacy schema changer statements operating on the same objects cannot exist within the same transaction. Either split the transaction into multiple transactions, or disable the cluster setting or session variable.
90-
{{site.data.alerts.end}}
91-
92-
{% include {{page.version.version}}/sql/sql-defaults-cluster-settings-deprecation-notice.md %}
93-
9465
## Best practices for online schema changes
9566

9667
### Estimate your storage capacity before performing online schema changes

Diff for: src/current/v25.1/show-jobs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The following fields are returned for each job:
6161
Field | Description
6262
------|------------
6363
`job_id` | A unique ID to identify each job. This value is used if you want to control jobs (i.e., [pause]({% link {{ page.version.version }}/pause-job.md %}), [resume]({% link {{ page.version.version }}/resume-job.md %}), or [cancel]({% link {{ page.version.version }}/cancel-job.md %}) it).
64-
`job_type` | The type of job: [`SCHEMA CHANGE`]({% link {{ page.version.version }}/online-schema-changes.md %}), [`NEW SCHEMA CHANGE`]({% link {{ page.version.version }}/online-schema-changes.md %}#declarative-schema-changer), [`KEY VISUALIZER`]({% link {{ page.version.version }}/ui-key-visualizer.md %}), [`MIGRATION`]({% link {{ page.version.version }}/upgrade-cockroach-version.md %}#overview), [`BACKUP`]({% link {{ page.version.version }}/backup.md %}), [`RESTORE`]({% link {{ page.version.version }}/restore.md %}), [`IMPORT`]({% link {{ page.version.version }}/import-into.md %}), [`CHANGEFEED`](#show-changefeed-jobs), [`CREATE STATS`]({% link {{ page.version.version }}/create-statistics.md %}), [`ROW LEVEL TTL`]({% link {{ page.version.version }}/row-level-ttl.md %}), [`REPLICATION STREAM INGESTION`]({% link {{ page.version.version }}/physical-cluster-replication-monitoring.md %}), `REPLICATION STREAM PRODUCER`([physical cluster replication]({% link {{ page.version.version }}/physical-cluster-replication-monitoring.md %}) or [logical data replication]({% link {{ page.version.version }}/logical-data-replication-monitoring.md %})), [`LOGICAL REPLICATION`]({% link {{ page.version.version }}/logical-data-replication-monitoring.md %}). <br><br>For job types of automatic jobs, see [Show automatic jobs](#show-automatic-jobs).
64+
`job_type` | The type of job: [`SCHEMA CHANGE`]({% link {{ page.version.version }}/online-schema-changes.md %}), [`NEW SCHEMA CHANGE`]({% link {{ page.version.version }}/online-schema-changes.md %}), [`KEY VISUALIZER`]({% link {{ page.version.version }}/ui-key-visualizer.md %}), [`MIGRATION`]({% link {{ page.version.version }}/upgrade-cockroach-version.md %}#overview), [`BACKUP`]({% link {{ page.version.version }}/backup.md %}), [`RESTORE`]({% link {{ page.version.version }}/restore.md %}), [`IMPORT`]({% link {{ page.version.version }}/import-into.md %}), [`CHANGEFEED`](#show-changefeed-jobs), [`CREATE STATS`]({% link {{ page.version.version }}/create-statistics.md %}), [`ROW LEVEL TTL`]({% link {{ page.version.version }}/row-level-ttl.md %}), [`REPLICATION STREAM INGESTION`]({% link {{ page.version.version }}/physical-cluster-replication-monitoring.md %}), `REPLICATION STREAM PRODUCER`([physical cluster replication]({% link {{ page.version.version }}/physical-cluster-replication-monitoring.md %}) or [logical data replication]({% link {{ page.version.version }}/logical-data-replication-monitoring.md %})), [`LOGICAL REPLICATION`]({% link {{ page.version.version }}/logical-data-replication-monitoring.md %}). <br><br>For job types of automatic jobs, see [Show automatic jobs](#show-automatic-jobs).
6565
`description` | The statement that started the job, or a textual description of the job. When you run `SHOW JOBS`, the `description` field is limited to 100 characters. To view the full description for a job, run `SHOW JOB {job ID}`.
6666
`statement` | When `description` is a textual description of the job, the statement that started the job is returned in this column. Currently, this field is populated only for the automatic table statistics jobs.
6767
`user_name` | The name of the [user]({% link {{ page.version.version }}/security-reference/authorization.md %}#create-and-manage-users) who started the job.

0 commit comments

Comments
 (0)