Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/current/v26.1/online-schema-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ Schema changes consume additional resources, and if they are run when the cluste
CockroachDB [does not support schema changes within explicit transactions](#schema-changes-within-transactions) with full atomicity guarantees. CockroachDB only supports DDL changes within implicit transactions (individual statements). If a schema management tool uses transactions on your behalf, it should only execute one schema change operation per transaction. <br /><br /> Some tools and applications may be able to workaround CockroachDB's lack of transactional schema changes by [enabling a setting that automatically commits before running schema changes inside transactions](#enable-automatic-commit-before-running-schema-changes-inside-transactions).
{{site.data.alerts.end}}

{{site.data.alerts.callout_info}}
When the [`schema_locked` table storage parameter]({% link {{ page.version.version }}/with-storage-parameter.md %}#storage-parameter-schema-locked) is set to `true`, CockroachDB rejects any schema change statements that target the table.
<br><br>
The [`create_table_with_schema_locked` session variable]({% link {{ page.version.version }}/set-vars.md %}#create_table_with_schema_locked) (enabled by default in v26.1) automatically sets this storage parameter on every table created in the session.
<br><br>
Use these features to guarantee that no concurrent schema change is running, which can significantly improve [changefeed]({% link {{ page.version.version }}/change-data-capture-overview.md %}) commit-to-emit latency.
{{site.data.alerts.end}}

## How online schema changes work

At a high level, online schema changes are accomplished by using a bridging strategy involving concurrent uses of multiple versions of the schema. The process is as follows:
Expand Down
Loading