Skip to content

Commit 0caec78

Browse files
Merge branch 'main' into 20251103-doc-15327-deprecation-incremental
2 parents 6f70f5c + cc2114c commit 0caec78

28 files changed

+139
-40
lines changed

src/current/_includes/releases/v25.2/v25.2.0-alpha.3.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ Release Date: April 7, 2025
2424
[#143588][#143588]
2525
- `like_regex` predicate evaluation is now supported in JSONPath queries. For example, `SELECT jsonb_path_query('{}', '"hello" like_regex "^he.*$"');`.
2626
[#143240][#143240]
27-
- Added the `EXPERIMENTAL COPY` option to `RESTORE`, which runs online `RESTORE`, but waits to publish the tables until all data is downloaded.
28-
[#143674][#143674]
2927

3028
<h3 id="v25-2-0-alpha-3-operational-changes">Operational changes</h3>
3129

src/current/_includes/releases/v25.4/backward-incompatible.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22

33
Removed the `bulkio.backup.deprecated_full_backup_with_subdir.enabled` cluster setting. This optional ability to specify a target subdirectory with the `BACKUP` command when creating a full backup was deprecated in v22.1. [#153628][#153628]
44

5-
[#153628]: https://github.com/cockroachdb/cockroach/pull/153628
5+
- `sql.schema.approx_max_object_count` (default: `20000`)
6+
7+
Added cluster setting `sql.schema.approx_max_object_count` to prevent creation of new schema objects when the limit is exceeded. The check uses cached table statistics for performance and is approximate - it may not be immediately accurate until table statistics are updated by the background statistics refreshing job. Clusters that have been running stably with a larger object count should raise the limit or disable the limit by setting the value to `0`. In future releases, the default value for this setting will be raised as more CockroachDB features support larger object counts. [#154576][#154576]
8+
9+
[#153628]: https://github.com/cockroachdb/cockroach/pull/153628
10+
[#154576]: https://github.com/cockroachdb/cockroach/pull/154576

src/current/_includes/releases/v25.4/cluster-setting-changes.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ Changes to [cluster settings]({% link v25.4/cluster-settings.md %}) should be re
2020

2121
Added a cluster setting (`sql.log.scan_row_count_misestimate.enabled`) that enables logging a warning on the gateway node when optimizer estimates for scans are inaccurate. The log message includes the table and index being scanned, the estimated and actual row counts, the time since the last table stats collection, and the table's estimated staleness. [#155123][#155123]
2222

23-
- `sql.schema.approx_max_object_count` (default: `20000`)
24-
25-
Added cluster setting `sql.schema.approx_max_object_count` (default: 20,000) to prevent creation of new schema objects when the limit is exceeded. The check uses cached table statistics for performance and is approximate - it may not be immediately accurate until table statistics are updated by the background statistics refreshing job. Clusters that have been running stably with a larger object count should raise the limit or disable the limit by setting the value to 0. In future releases, the default value for this setting will be raised as more CockroachDB features support larger object counts. [#154576][#154576]
26-
2723
- `sql.stats.error_on_concurrent_create_stats.enabled` (default: `true`)
2824

2925
Introduced the cluster setting `sql.stats.error_on_concurrent_create_stats.enabled`, which modifies how CockroachDB reacts to concurrent auto stats jobs. The default, `true`, maintains the previous behavior. Setting `sql.stats.error_on_concurrent_create_stats.enabled` to `false` will cause the concurrent auto stats job to be skipped with just a log entry and no increased error counters. [#149538][#149538]
@@ -80,6 +76,5 @@ Changes to [cluster settings]({% link v25.4/cluster-settings.md %}) should be re
8076
[#153628]: https://github.com/cockroachdb/cockroach/pull/153628
8177
[#154459]: https://github.com/cockroachdb/cockroach/pull/154459
8278
[#154491]: https://github.com/cockroachdb/cockroach/pull/154491
83-
[#154576]: https://github.com/cockroachdb/cockroach/pull/154576
8479
[#155123]: https://github.com/cockroachdb/cockroach/pull/155123
8580
[#155561]: https://github.com/cockroachdb/cockroach/pull/155561

src/current/_includes/v24.1/misc/session-vars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
| <a id="server-version-num"></a> `server_version_num` | The version of PostgreSQL that CockroachDB emulates. | Version-dependent | Yes | Yes |
7171
| <a id="session-id"></a> `session_id` | The ID of the current session. | Session-dependent | No | Yes |
7272
| <a id="session-user"></a> `session_user` | The user connected for the current session. | User in connection string | No | Yes |
73-
| <a id="sql-safe-updates"></a> `sql_safe_updates` | If `true`, the following potentially unsafe SQL statements are disallowed: [`DROP DATABASE`]({% link {{ page.version.version }}/drop-database.md %}) of a non-empty database and all dependent objects; [`DELETE`]({% link {{ page.version.version }}/delete.md %}) and [`UPDATE`]({% link {{ page.version.version }}/update.md %}) without a `WHERE` clause, unless a [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause is included; [`SELECT ... FOR UPDATE`]({% link {{ page.version.version }}/select-for-update.md %}) and [`SELECT ... FOR SHARE`]({% link {{ page.version.version }}/select-for-update.md %}) without a `WHERE` or [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause; and [`ALTER TABLE ... DROP COLUMN`]({% link {{ page.version.version }}/alter-table.md %}#drop-column).<br/>For more details, refer to [Allow potentially unsafe SQL statements]({% link {{ page.version.version }}/cockroach-sql.md %}#allow-potentially-unsafe-sql-statements). | `true` for interactive sessions from the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}), <br/>`false` for sessions from other clients | Yes | Yes |
73+
| <a id="sql-safe-updates"></a> `sql_safe_updates` | If `true`, the following potentially unsafe SQL statements are disallowed: [`DROP DATABASE`]({% link {{ page.version.version }}/drop-database.md %}) of a non-empty database and all dependent objects; [`DELETE`]({% link {{ page.version.version }}/delete.md %}) and [`UPDATE`]({% link {{ page.version.version }}/update.md %}) without a `WHERE` clause, unless a [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause is included; [`SELECT ... FOR UPDATE`]({% link {{ page.version.version }}/select-for-update.md %}) and [`SELECT ... FOR SHARE`]({% link {{ page.version.version }}/select-for-update.md %}) without a `WHERE` or [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause; [`ALTER TABLE ... DROP COLUMN`]({% link {{ page.version.version }}/alter-table.md %}#drop-column); and converting an existing table to [`REGIONAL BY ROW`]({% link {{ page.version.version }}/alter-table.md %}#set-the-table-locality-to-regional-by-row) using [`ALTER TABLE ... LOCALITY`]({% link {{ page.version.version }}/alter-table.md %}#regional-by-row), unless a [region column]({% link {{ page.version.version }}/alter-table.md %}#crdb_region) has already been added to the table.<br/>For more details, refer to [Allow potentially unsafe SQL statements]({% link {{ page.version.version }}/cockroach-sql.md %}#allow-potentially-unsafe-sql-statements). | `true` for interactive sessions from the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}), <br/>`false` for sessions from other clients | Yes | Yes |
7474
| <a id="statement-timeout"></a> `statement_timeout` | The amount of time a statement can run before being stopped. <br/>This value can be an `int` (e.g., `10`) and will be interpreted as milliseconds. It can also be an interval or string argument, where the string can be parsed as a valid interval (e.g., `'4s'`). <br/>A value of `0` turns it off. | The value set by the `sql.defaults.statement_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0s`, by default). | Yes | Yes |
7575
| <a id="stub-catalog-tables"></a> `stub_catalog_tables` | If `off`, querying an unimplemented, empty [`pg_catalog`]({% link {{ page.version.version }}/pg-catalog.md %}) table will result in an error, as is the case in v20.2 and earlier. If `on`, querying an unimplemented, empty `pg_catalog` table simply returns no rows. | `on` | Yes | Yes |
7676
| <a id="timezone"></a> `timezone` | The default time zone for the current session. | `UTC` | Yes | Yes |

src/current/_includes/v24.1/sql/sql-examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ In this example, we create a table and then use `\|` to programmatically insert
403403

404404
### Allow potentially unsafe SQL statements
405405

406-
The `--safe-updates` flag defaults to `true`. This prevents SQL statements that may have broad, undesired side effects. For example, by default, we cannot use `DELETE` without a `WHERE` clause to delete all rows from a table:
406+
The [`--safe-updates` flag](#flag-safe-updates) defaults to `true`. This prevents SQL statements that may have broad, undesired side effects. For example, by default, we cannot use `DELETE` without a `WHERE` clause to delete all rows from a table:
407407

408408
{% include_cached copy-clipboard.html %}
409409
~~~ shell
@@ -449,7 +449,7 @@ DELETE 10
449449
~~~
450450

451451
{{site.data.alerts.callout_info}}
452-
Potentially unsafe SQL statements can also be allowed/disallowed for an entire session via the `sql_safe_updates` [session variable]({% link {{ page.version.version }}/set-vars.md %}).
452+
Potentially unsafe SQL statements can also be allowed/disallowed for an entire session via the [`sql_safe_updates` session variable]({% link {{ page.version.version }}/set-vars.md %}#sql-safe-updates). For a complete list of these statements, refer to the session variable documentation.
453453
{{site.data.alerts.end}}
454454

455455
### Reveal the SQL statements sent implicitly by the command-line utility

src/current/_includes/v24.3/misc/session-vars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
| <a id="server-version-num"></a> `server_version_num` | The version of PostgreSQL that CockroachDB emulates. | Version-dependent | Yes | Yes |
7171
| <a id="session-id"></a> `session_id` | The ID of the current session. | Session-dependent | No | Yes |
7272
| <a id="session-user"></a> `session_user` | The user connected for the current session. | User in connection string | No | Yes |
73-
| <a id="sql-safe-updates"></a> `sql_safe_updates` | If `true`, the following potentially unsafe SQL statements are disallowed: [`DROP DATABASE`]({% link {{ page.version.version }}/drop-database.md %}) of a non-empty database and all dependent objects; [`DELETE`]({% link {{ page.version.version }}/delete.md %}) and [`UPDATE`]({% link {{ page.version.version }}/update.md %}) without a `WHERE` clause, unless a [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause is included; [`SELECT ... FOR UPDATE`]({% link {{ page.version.version }}/select-for-update.md %}) and [`SELECT ... FOR SHARE`]({% link {{ page.version.version }}/select-for-update.md %}) without a `WHERE` or [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause; and [`ALTER TABLE ... DROP COLUMN`]({% link {{ page.version.version }}/alter-table.md %}#drop-column).<br/>For more details, refer to [Allow potentially unsafe SQL statements]({% link {{ page.version.version }}/cockroach-sql.md %}#allow-potentially-unsafe-sql-statements). | `true` for interactive sessions from the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}), <br/>`false` for sessions from other clients | Yes | Yes |
73+
| <a id="sql-safe-updates"></a> `sql_safe_updates` | If `true`, the following potentially unsafe SQL statements are disallowed: [`DROP DATABASE`]({% link {{ page.version.version }}/drop-database.md %}) of a non-empty database and all dependent objects; [`DELETE`]({% link {{ page.version.version }}/delete.md %}) and [`UPDATE`]({% link {{ page.version.version }}/update.md %}) without a `WHERE` clause, unless a [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause is included; [`SELECT ... FOR UPDATE`]({% link {{ page.version.version }}/select-for-update.md %}) and [`SELECT ... FOR SHARE`]({% link {{ page.version.version }}/select-for-update.md %}) without a `WHERE` or [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause; [`ALTER TABLE ... DROP COLUMN`]({% link {{ page.version.version }}/alter-table.md %}#drop-column); and converting an existing table to [`REGIONAL BY ROW`]({% link {{ page.version.version }}/alter-table.md %}#set-the-table-locality-to-regional-by-row) using [`ALTER TABLE ... LOCALITY`]({% link {{ page.version.version }}/alter-table.md %}#regional-by-row), unless a [region column]({% link {{ page.version.version }}/alter-table.md %}#crdb_region) has already been added to the table.<br/>For more details, refer to [Allow potentially unsafe SQL statements]({% link {{ page.version.version }}/cockroach-sql.md %}#allow-potentially-unsafe-sql-statements). | `true` for interactive sessions from the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}), <br/>`false` for sessions from other clients | Yes | Yes |
7474
| <a id="statement-timeout"></a> `statement_timeout` | The amount of time a statement can run before being stopped. <br/>This value can be an `int` (e.g., `10`) and will be interpreted as milliseconds. It can also be an interval or string argument, where the string can be parsed as a valid interval (e.g., `'4s'`). <br/>A value of `0` turns it off. | The value set by the `sql.defaults.statement_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0s`, by default). | Yes | Yes |
7575
| <a id="stub-catalog-tables"></a> `stub_catalog_tables` | If `off`, querying an unimplemented, empty [`pg_catalog`]({% link {{ page.version.version }}/pg-catalog.md %}) table will result in an error, as is the case in v20.2 and earlier. If `on`, querying an unimplemented, empty `pg_catalog` table simply returns no rows. | `on` | Yes | Yes |
7676
| <a id="timezone"></a> `timezone` | The default time zone for the current session. | `UTC` | Yes | Yes |

src/current/_includes/v24.3/sql/sql-examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ In this example, we create a table and then use `\|` to programmatically insert
403403

404404
### Allow potentially unsafe SQL statements
405405

406-
The `--safe-updates` flag defaults to `true`. This prevents SQL statements that may have broad, undesired side effects. For example, by default, we cannot use `DELETE` without a `WHERE` clause to delete all rows from a table:
406+
The [`--safe-updates` flag](#flag-safe-updates) defaults to `true`. This prevents SQL statements that may have broad, undesired side effects. For example, by default, we cannot use `DELETE` without a `WHERE` clause to delete all rows from a table:
407407

408408
{% include_cached copy-clipboard.html %}
409409
~~~ shell
@@ -449,7 +449,7 @@ DELETE 10
449449
~~~
450450

451451
{{site.data.alerts.callout_info}}
452-
Potentially unsafe SQL statements can also be allowed/disallowed for an entire session via the `sql_safe_updates` [session variable]({% link {{ page.version.version }}/set-vars.md %}).
452+
Potentially unsafe SQL statements can also be allowed/disallowed for an entire session via the [`sql_safe_updates` session variable]({% link {{ page.version.version }}/set-vars.md %}#sql-safe-updates). For a complete list of these statements, refer to the session variable documentation.
453453
{{site.data.alerts.end}}
454454

455455
### Reveal the SQL statements sent implicitly by the command-line utility

src/current/_includes/v25.2/misc/session-vars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
| <a id="server-version-num"></a> `server_version_num` | The version of PostgreSQL that CockroachDB emulates. | Version-dependent | Yes | Yes |
7575
| <a id="session-id"></a> `session_id` | The ID of the current session. | Session-dependent | No | Yes |
7676
| <a id="session-user"></a> `session_user` | The user connected for the current session. | User in connection string | No | Yes |
77-
| <a id="sql-safe-updates"></a> `sql_safe_updates` | If `true`, the following potentially unsafe SQL statements are disallowed: [`DROP DATABASE`]({% link {{ page.version.version }}/drop-database.md %}) of a non-empty database and all dependent objects; [`DELETE`]({% link {{ page.version.version }}/delete.md %}) and [`UPDATE`]({% link {{ page.version.version }}/update.md %}) without a `WHERE` clause, unless a [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause is included; [`SELECT ... FOR UPDATE`]({% link {{ page.version.version }}/select-for-update.md %}) and [`SELECT ... FOR SHARE`]({% link {{ page.version.version }}/select-for-update.md %}) without a `WHERE` or [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause; and [`ALTER TABLE ... DROP COLUMN`]({% link {{ page.version.version }}/alter-table.md %}#drop-column).<br/>For more details, refer to [Allow potentially unsafe SQL statements]({% link {{ page.version.version }}/cockroach-sql.md %}#allow-potentially-unsafe-sql-statements). | `true` for interactive sessions from the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}), <br/>`false` for sessions from other clients | Yes | Yes |
77+
| <a id="sql-safe-updates"></a> `sql_safe_updates` | If `true`, the following potentially unsafe SQL statements are disallowed: [`DROP DATABASE`]({% link {{ page.version.version }}/drop-database.md %}) of a non-empty database and all dependent objects; [`DELETE`]({% link {{ page.version.version }}/delete.md %}) and [`UPDATE`]({% link {{ page.version.version }}/update.md %}) without a `WHERE` clause, unless a [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause is included; [`SELECT ... FOR UPDATE`]({% link {{ page.version.version }}/select-for-update.md %}) and [`SELECT ... FOR SHARE`]({% link {{ page.version.version }}/select-for-update.md %}) without a `WHERE` or [`LIMIT`]({% link {{ page.version.version }}/limit-offset.md %}) clause; [`ALTER TABLE ... DROP COLUMN`]({% link {{ page.version.version }}/alter-table.md %}#drop-column); and converting an existing table to [`REGIONAL BY ROW`]({% link {{ page.version.version }}/alter-table.md %}#set-the-table-locality-to-regional-by-row) using [`ALTER TABLE ... LOCALITY`]({% link {{ page.version.version }}/alter-table.md %}#regional-by-row), unless a [region column]({% link {{ page.version.version }}/alter-table.md %}#crdb_region) has already been added to the table.<br/>For more details, refer to [Allow potentially unsafe SQL statements]({% link {{ page.version.version }}/cockroach-sql.md %}#allow-potentially-unsafe-sql-statements). | `true` for interactive sessions from the [built-in SQL client]({% link {{ page.version.version }}/cockroach-sql.md %}), <br/>`false` for sessions from other clients | Yes | Yes |
7878
| <a id="statement-timeout"></a> `statement_timeout` | The amount of time a statement can run before being stopped. <br/>This value can be an `int` (e.g., `10`) and will be interpreted as milliseconds. It can also be an interval or string argument, where the string can be parsed as a valid interval (e.g., `'4s'`). <br/>A value of `0` turns it off. | The value set by the `sql.defaults.statement_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0s`, by default). | Yes | Yes |
7979
| <a id="stub-catalog-tables"></a> `stub_catalog_tables` | If `off`, querying an unimplemented, empty [`pg_catalog`]({% link {{ page.version.version }}/pg-catalog.md %}) table will result in an error, as is the case in v20.2 and earlier. If `on`, querying an unimplemented, empty `pg_catalog` table simply returns no rows. | `on` | Yes | Yes |
8080
| <a id="timezone"></a> `timezone` | The default time zone for the current session. | `UTC` | Yes | Yes |

src/current/_includes/v25.2/sql/sql-examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ In this example, we create a table and then use `\|` to programmatically insert
403403

404404
### Allow potentially unsafe SQL statements
405405

406-
The `--safe-updates` flag defaults to `true`. This prevents SQL statements that may have broad, undesired side effects. For example, by default, we cannot use `DELETE` without a `WHERE` clause to delete all rows from a table:
406+
The [`--safe-updates` flag](#flag-safe-updates) defaults to `true`. This prevents SQL statements that may have broad, undesired side effects. For example, by default, we cannot use `DELETE` without a `WHERE` clause to delete all rows from a table:
407407

408408
{% include_cached copy-clipboard.html %}
409409
~~~ shell
@@ -449,7 +449,7 @@ DELETE 10
449449
~~~
450450

451451
{{site.data.alerts.callout_info}}
452-
Potentially unsafe SQL statements can also be allowed/disallowed for an entire session via the `sql_safe_updates` [session variable]({% link {{ page.version.version }}/set-vars.md %}).
452+
Potentially unsafe SQL statements can also be allowed/disallowed for an entire session via the [`sql_safe_updates` session variable]({% link {{ page.version.version }}/set-vars.md %}#sql-safe-updates). For a complete list of these statements, refer to the session variable documentation.
453453
{{site.data.alerts.end}}
454454

455455
### Reveal the SQL statements sent implicitly by the command-line utility

0 commit comments

Comments
 (0)