diff --git a/src/current/_data/releases.yml b/src/current/_data/releases.yml index 1b7a09d8231..5c350df0813 100644 --- a/src/current/_data/releases.yml +++ b/src/current/_data/releases.yml @@ -9984,3 +9984,30 @@ docker_arm_limited_access: false source: true previous_release: v25.4.0 + + +- release_name: v26.1.0-alpha.2 + major_version: v26.1 + release_date: '2025-12-10' + release_type: Testing + go_version: go1.25.3 + sha: 7991c17b6f2957e381666bf13d6405c8037f46c1 + has_sql_only: true + has_sha256sum: true + mac: + mac_arm: true + mac_arm_experimental: true + mac_arm_limited_access: false + windows: true + linux: + linux_arm: true + linux_arm_experimental: false + linux_arm_limited_access: false + linux_intel_fips: true + linux_arm_fips: false + docker: + docker_image: cockroachdb/cockroach-unstable + docker_arm: true + docker_arm_experimental: false + docker_arm_limited_access: false + source: true diff --git a/src/current/_data/versions.csv b/src/current/_data/versions.csv index ae340872cdd..9bbf47c67d6 100644 --- a/src/current/_data/versions.csv +++ b/src/current/_data/versions.csv @@ -20,4 +20,4 @@ v25.1,2025-02-18,2025-08-18,N/A,N/A,N/A,N/A,N/A,N/A,v24.3,release-25.1,2029-02-1 v25.2,2025-05-09,2026-05-12,2026-11-12,N/A,N/A,N/A,N/A,N/A,v25.1,release-25.2,2029-05-09 v25.3,2025-08-04,2026-02-04,N/A,N/A,N/A,N/A,N/A,N/A,v25.2,release-25.3,2029-08-04 v25.4,2025-11-03,2026-11-03,2027-05-03,N/A,N/A,N/A,N/A,N/A,v25.3,release-25.4,2029-11-03 -v26.1,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,v25.4,release-25.4,N/A +v26.1,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,v25.4,master,N/A diff --git a/src/current/_includes/releases/v26.1/v26.1.0-alpha.2.md b/src/current/_includes/releases/v26.1/v26.1.0-alpha.2.md new file mode 100644 index 00000000000..19192df416f --- /dev/null +++ b/src/current/_includes/releases/v26.1/v26.1.0-alpha.2.md @@ -0,0 +1,476 @@ +## v26.1.0-alpha.2 + +Release Date: December 10, 2025 + +{% include releases/new-release-downloads-docker-image.md release=include.release %} + +

Security updates

+ +- We will be adding a new flag + `--disallow-root-login` to the cockroach start command to explicitly allow + restricting the root user from logging into the system. This change affects the + [unstated, unchangeable root access + rule](https://www.cockroachlabs.com/docs/stable/security-reference/authentication#the-unstated-unchangeable-root-access-rule) + as part of compliance requirements. This flag is currently experimental and also + needs an additional user setup for debug zip collection as disabling the root + user affects the debug zip service. We currently do not validate if this user is + set up or not. + + Note: Care must be taken to ensure none of the certificates that are in use by + the cluster or the SQL/RPC clients have a root in the SAN fields since the flag + will block access to that client. [#155216][#155216] +- A new `debug_user` certificate can now be used + for privileged RPC access to collect debug information. The debug_user must be + created manually using the `CREATE USER` command and can be audited using the + `SHOW USERS` command. This user has privileged access to `serverpb` admin and + status endpoints required for debug zip collection. [#155216][#155216] + +

General changes

+ +- Docker images now use UBI 10 as the base image. [#153990][#153990] +- The changefeed bulk + delivery setting was made optional. [#154870][#154870] + +

SQL language changes

+ +- Add new session variable `use_swap_mutations` + which controls whether the new update swap and delete swap operators are + enabled for use by UPDATE and DELETE statements. [#145019][#145019] +- Index acceleration is now supported for a subset of `jsonb_path_exists` filters used in the `WHERE` clause. + +Given `jsonb_path_exists(json_obj, json_path_expression)`, inverted indexes are supported only when the `json_path_expression` matches one of the following patterns: + +- The `json_path_expression` must not be in STRICT mode. +- Keychain mode: `$. [key|wildcard].[key|wildcard]...`. In this mode, a prefix span is generated for the inverted expression. +- Filter with end value mode, using an equality check: `$. [key|wildcard]? (@.[key|wildcard].[key|wildcard]... == [string|number|null|boolean])`. In this mode, since the end value is fixed, a single-value span is generated. + +The following cases are not supported: + +- `$` +- `$[*]` +- `$.a.b.c == 12`, `$.a.b.c > 12`, or `$.a.b.c < 12` (operation expressions) +- `$.a.b ? (@.a > 10)` (filter with an inequality check) [#150793][#150793] +- Added a new field to `SHOW CHANGEFEED JOBS`. + `database_name` gives the name of the database that a db-level changefeed + is on. For a table-level changefeed, the value is `null`. + + Modified `SHOW CHANGEFEED JOBS` field `full_table_names` for db-level + changefeeds. By default, the list of watched tables in `full_table_names` + is empty for a db-level changefeed, giving the total number of + watched tables. Added a new option `WITH WATCHED_TABLES` that makes + `SHOW CHANGEFEED JOBS` return the full list of target tables, like with + non-db level changefeeds. [#151131][#151131] +- Users can now manually create single-column partial statistics on boolean predicate expressions that can become simple index scans. These statistics can be created by adding a constraining `WHERE` expression to `CREATE STATISTICS`. + + For example: + + ~~~ sql + CREATE TABLE t (a INT PRIMARY KEY); + INSERT INTO t VALUES (1), (2), (3), (4), (5); + CREATE STATISTICS constrained_stat ON a FROM t WHERE a > 2; + ~~~ [#152469][#152469] +- Added a clamp on row-count estimates for very large tables to ensure the optimizer assumes at least one distinct value will be scanned. This reduces the risk of a catastrophic underestimate. The feature is off by default and controlled by the `optimizer_clamp_low_histogram_selectivity` session setting. [#153067][#153067] +- Added a clamp for the estimated selectivity of inequality predicates that are unbounded on one or both sides (e.g., `x > 5`). This reduces the risk of a catastrophic underestimate that causes the optimizer to choose a poorly-constrained scan. The feature is disabled by default and can be enabled with the session setting `optimizer_clamp_inequality_selectivity`. [#153067][#153067] +- The optimizer can now use table statistics that merge the latest full statistic with all newer partial statistics, including those over arbitrary constraints over a single span. [#153419][#153419] +- Added the `sql.catalog.allow_leased_descriptors.enabled` cluster setting, which is false by default. When set to true, queries that access the `pg_catalog` or `information_schema` can use cached leased descriptors to populate the data in those tables, with the tradeoff that some of the data could be stale. [#154051][#154051] +- Added a default-off 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. [#154370][#154370] +- Fixed a bug where the results of `ALTER SEQUENCE`'s increment and `SELECT nextval()` operations were not as expected. The value of a sequence after an `ALTER SEQUENCE` statement has executed on it is now consistent with a sequence created with those values. [#154489][#154489] +- Added changefeed setting + `range_distribution_strategy` with values `'default'` or `'balanced_simple'`. + This new per-changefeed setting overrides the cluster setting + `changefeed.default_range_distribution_strategy` where both exist. + + Example: + ~~~ sql + CREATE CHANGEFEED FOR x into 'null://' WITH + range_distribution_strategy='balanced_simple'; + ~~~ [#154744][#154744] +- Added the `INSPECT` command, which runs consistency validation check jobs against tables or databases and specified indexes. [#154873][#154873] +- Added support for collecting partial statistics when the given `WHERE` clause implies the predicate of a partial index with the requested column as the first key column. For example: + + ``` + CREATE TABLE t (a INT, INDEX idx_partial (a) WHERE a > 5); + CREATE STATISTICS pstat ON a FROM t WHERE a > 7; + ``` [#154892][#154892] +- The `row_security` session variable now + behaves like in postgres, allowing users to detect when RLS is applied. [#155110][#155110] +- Added the `bulkio.index_backfill.vector_merge_batch_size` cluster setting to control how many vectors to merge into a vector index per transaction during create operations. The setting defaults to `3`. [#155284][#155284] +- Updated the scan misestimate logging, which is controlled by the `sql.log.scan_row_count_misestimate.enabled` cluster setting, to use structured logging. The logs now include the scanned table and index, the estimated and actual row counts, the time since the last table statistics collection, and the table's estimated staleness. [#155454][#155454] +- Deprecated the `EXPERIMENTAL SCRUB` command is deprecated. Use the `INSPECT` command for data consistency validation. [#155485][#155485] +- Vector indexing is now enabled by default. `feature.vector_index.enabled` defaults to `true`. [#155536][#155536] +- `INSPECT` supports a `DETACHED` option to run the operation without waiting for it. [#155774][#155774] +- `ALTER TABLE ... DROP STORED` statements are now executed internally by the declarative schema changer. [#155778][#155778] +- Added a `sql.statements.rows_read.count` metric that counts the number of index rows read by SQL statements. [#155820][#155820] +- Added the `EXPLAIN (FINGERPRINT)` statement, which returns normalized statement fingerprints with constants replaced by underscores. For example, `EXPLAIN (FINGERPRINT) SELECT * FROM t WHERE a = 123` returns `SELECT * FROM t WHERE a = _`. [#156152][#156152] +- Introduced two new settings to control the use of canary statistics in query planning: + - Cluster setting `sql.stats.canary_fraction` (float, range [0, 1], default: 0): Controls what fraction of queries use "canary statistics" (newly collected stats within their canary window) versus "stable statistics" (previously proven stats). For example, a value of `0.2` means 20% of queries will use canary stats while 80% use stable stats. The selection is atomic per query: if a query is chosen for canary evaluation, it uses canary statistics for **all** tables it references (where available). A query never uses a mix of canary and stable statistics. + - Session variable `canary_stats_mode` (enum: {auto, off, on}, default: auto): + - `on`: All queries in the session use canary stats for planning. + - `off`: All queries in the session use stable stats for planning. + - `auto`: The system decides based on `sql.stats.canary_fraction` for each query execution. [#156307][#156307] +- Introduced a new table storage parameter, `sql_stats_canary_window`, to enable gradual rollout of newly collected table statistics. It takes a duration string as the value. When set with a positive duration, the new statistics remain in a "canary" state for the specified duration before being promoted to stable. This allows for controlled exposure and intervention opportunities before statistics are fully deployed across all queries. [#156307][#156307] +- Introduced `SHOW FINGERPRINTS FOR TABLE`, which produces an FNV hash for each index in a table. FNV is used for performance reasons and is sensitive to changes in the underlying data, including `NULL`s. [#156600][#156600] +- The `optimizer_clamp_low_histogram_selectivity` and `optimizer_clamp_inequality_selectivity` settings are now on by default. This causes the optimizer to assume that at least one distinct value "passes" each filter in a query, and that open-ended inequality filters select at least 1/10000 rows from the table. This reduces the chances of a catastrophic row count underestimate when stats are inaccurate. [#156610][#156610] +- SQL statements executed in stored procedures and user-defined functions now record SQL statistics, including latencies and execution metrics. These statistics appear on the **SQL Activity** and **Insights** pages of the DB Console. Limitation: SQL statements within a stored procedure or user-defined function are not collected for active statement diagnostics requests. Statement diagnostics remain available for top-level statement executions. [#156905][#156905] +- The `ALTER TABLE ... SET/ADD GENERATED AS IDENTITY` statement is supported by the declarative schema changer in v26.1 and later. [#157144][#157144] +- The **Plan Details** in the **Statement Activity** page of the DB Console now show whether any hints from `system.statement_hints` were applied to the statement execution. [#157160][#157160] +- `EXPLAIN` and `EXPLAIN ANALYZE` will now display the number of hints from `system.statement_hints` applied to the executed statement. [#157160][#157160] +- The `cumulative time spent waiting in admission control` is now displayed in `EXPLAIN ANALYZE` output when it is non-zero. This helps identify delays caused by admission control during query execution. [#158055][#158055] +- Restarting a sequence with an updated increment has the expected initial value. [#158065][#158065] +- The `cumulative time spent waiting in admission control` reported in `EXPLAIN ANALYZE` now includes the time spent in quorum replication flow control. This update enhances the precision of wait time analysis, offering a more accurate depiction of query execution time by considering additional wait durations within the quorum replication processes. [#158076][#158076] +- A new "hint injection" ability has been + added, which allows operators to dynamically inject inline hints into + statements, without modifying the text of those statements. Hints can be + injected using the builtin function `crdb_internal.inject_hint` with the + target statement fingerprint to rewrite. For example, to add an index + hint to the statement `SELECT * FROM my_table WHERE col = 3`, use: + + ``` + SELECT crdb_internal.inject_hint( + 'SELECT * FROM my_table WHERE col = _', + 'SELECT * FROM my_table@my_table_col_idx WHERE col = _' + ); + ``` + + Whenever a statement is executed matching statement fingerprint `SELECT + * FROM my_table WHERE col = _`, it will first be rewritten to include + the injected index hint. [#158096][#158096] +- `ALTER TABLE ... SET SCHEMA` is supported by the declarative schema changer. [#158141][#158141] +- `kv cpu time` is now displayed in `EXPLAIN ANALYZE`, providing insights into the CPU resources used by KV operations during query execution. [#158499][#158499] +- CockroachDB now negotiates the pgwire protocol version with PostgreSQL 18+ clients that request protocol version 3.2. Previously, connections from these clients would fail with an "unknown protocol version" error. The server now sends a `NegotiateProtocolVersion` message to indicate it supports version 3.0, allowing the connection to proceed normally. [#158636][#158636] + +

Operational changes

+ +- The metrics `sql.select.started.count`, `sql.insert.started.count`, `sql.update.started.count`, and `sql.delete.started.count` are now emitted with labels under the common metric name `sql.started.count`, using a `query_type` label to distinguish each operation. [#151946][#151946] +- Added the cluster setting `storage.unhealthy_write_duration` (defaults to 20s), which is used to indicate to the allocator that a store's disk is unhealthy. The cluster setting `kv.allocator.disk_unhealthy_io_overload_score` controls the overload score assigned to a store with an unhealthy disk, where a higher score results in preventing lease or replica transfers to the store, or shedding of leases by the store. The default value of that setting is 0, so the allocator behavior is unaffected. [#153364][#153364] +- In an upcoming release, we're deprecating the + bespoke restore and import event logs. For any customer that relies on those + logs, we can maintain UX parity by plumbing the sql user that owns the + job to the status change event log. [#153889][#153889] +- Added two new changefeed metrics for tracking + the max skew between a changefeed's slowest and fastest span/table. The metrics are gauge metrics with the names + `changefeed.progress_skew.{span}` and `changefeed.progress_skew.{table}`. [#153975][#153975] +- Added the cluster setting `storage.snapshot.recreate_iter_duration` (default 20s), which controls how frequently a long-lived storage engine iterator, backed by an engine snapshot, will be closed and recreated. Currently, it is only used for iterators used in rangefeed catchup scans. [#154412][#154412] +- 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. [#154495][#154495] +- Cleaned up + redundant and misleading metrics. [#154545][#154545] +- Added a metric called `changefeed.parallel_io_workers` to + track the number of workers in ParallelIO. [#154552][#154552] +- Fixed the `changefeed.parallel_io_pending_rows` metric's + y-axis label to match the metric's definition. [#154552][#154552] +- Events related to changefeed operations are now routed to the `CHANGEFEED` channel, while sampled queries and transactions, along with certain SQL performance events, are logged to `SQL_EXEC`. To continue using the previous logging channels, set `log.channel_compatibility_mode.enabled` to `true`. [#154670][#154670] +- Successfully completed automatic SQL stats collecton jobs are now automatically purged rather than being retained for the full default job retention period. [#155848][#155848] +- The cluster setting `storage.snapshot.recreate_iter_duration` (default `20s`) controls how frequently a long-lived engine iterator, backed by an engine snapshot, will be closed and recreated. Currently, it is only used for iterators used in rangefeed catchup scans. [#156303][#156303] +- Add support for `CREATE LOGICAL REPLICATION STREAM` in situations where the source table has a column with a sequence expression. [#156975][#156975] +- All queries to system and crdb_internal by + default will begin failing, notifying users that they must override the + access gate if they wish to use those namespaces. + +The `allow_unsafe_internals` setting now defaults to `false`, restricting access to the `system` and `crdb_internal` namespaces. Queries to these namespaces will now fail unless access is manually enabled. Usage is also audited. [#158085][#158085] +- Jobs that are paused due to a specific reason, including jobs which pause themselves when encountering errors such as running out of disk space, now record that reason in their displayed status field of `SHOW JOBS`. [#158350][#158350] +- The following metrics will be marked as essential + because they are needed for end user troubleshooting: + - auth.jwt.conn.latency + - auth.cert.conn.latency + - auth.password.conn.latency + - auth.ldap.conn.latency + - auth.gss.conn.latency + - auth.scram.conn.latency + - auth.ldap.conn.latency.internal [#158424][#158424] + +

Command-line changes

+ +- `cockroach workload run` commands now offer + a `--with-changefeed` flag to additionally run a changefeed that watches for + writes to the workload's tables. + + Co-authored-by: Steven Danna [#155516][#155516] + +

DB Console changes

+ +- The log of messages and events recorded by a job is now shown to non-admin users on the DB Console Jobs page. [#152853][#152853] +- The **SQL** dashboard has been enhanced with additional insights. The **Transaction Restarts** dashboard now displays `txn.restarts.txnpush` and `txn.restarts.unknown` metrics. A new **Failed SQL Connections** graph shows failed SQL connection attempts. A new **SQL Queries Within Routines Per Second** dashboard reports on `SELECT`, `UPDATE`, `INSERT`, and `DELETE` operations executed within routines. A new **Table Statistics Collections** dashboard provides information on auto, auto partial, and manual statistics collections. [#155203][#155203] +- The background (elastic) store graphs for exhausted duration, and the wait duration histogram, have been separated from the foreground (regular) graphs. [#156801][#156801] +- The DB Console now accurately displays **vCPU** counts on the **Overview** page instead of operating system CPU counts. This update uses cgroups to provide a correct vCPU measurement, reflecting reserved compute resources in Kubernetes and other virtualized environments. [#158219][#158219] +- Jobs which are paused for a specific reason now show that reason, and are highlighted in the UI. [#158364][#158364] +- KV CPU Time is now recorded to statement_statistics + and transaction_statistics and is displayed in the SQL Activity page. [#158398][#158398] +- The `admissionWaitTime` is now recorded in `crdb_internal.statement_statistics` and `crdb_internal.transaction_statistics`. In the DB Console, an **Admission Wait Time** column is now displayed in the **SQL Activity** > **Statements** and **Transactions** pages. [#158500][#158500] + +

Bug fixes

+ +- Previously, CockroachDB would omit execution statistics in `EXPLAIN ANALYZE` output for mutation nodes when a `RETURNING` clause was used. The bug was present since before v21.1 and is now fixed. [#145934][#145934] +- Fixed a bug where CockroachDB could encounter a `vector encoder doesn't support ForcePut yet` error when executing `COPY` commands concurrently with certain schema changes. The bug had existed since before v23.2. [#148549][#148549] +- Fixed a bug causing a `READ COMMITTED` or `SNAPSHOT` isolation transaction to be committed despite returning a non-ambiguous error. [#152010][#152010] +- Fixed `IMPORT` progress reporting to show the correct row counts when concurrent job state changes occur. [#152745][#152745] +- Fixed a bug in type-checking placeholders with `UNKNOWN` types. It could cause incorrect results in some cases. [#152882][#152882] +- Fixed a bug where `EXPORT CSV` and `EXPORT PARQUET` could cause a node crash when their result rows were used as input to a mutation, such as an `INSERT`, within the same SQL statement. This bug had been present since before v22.1. [#153951][#153951] +- **Idle latency** on the **Transaction Details** page in the DB Console is now reported more accurately. Previously, transactions that used prepared statements (e.g., with placeholders) overcounted idle time, while those that included observer statements (common in the SQL CLI) undercounted it. [#154028][#154028] +- Fixed a bug that caused panics when executing `COPY` into a table with hidden columns and expression indexes. The panic only occurred when the session setting `expect_and_ignore_not_visible_columns_in_copy` was enabled. This bug was introduced with `expect_and_ignore_not_visible_columns_in_copy` in v22.1.0. [#154162][#154162] +- Vector index backfill jobs now correctly report progress in the `SHOW JOBS` output. [#154209][#154209] +- Fixed a bug where `RESTORE` of a database with a `SECONDARY REGION` did not apply the lease preferences for that region. [#154522][#154522] +- Fixed a bug where a changefeed could perform + many unnecessary job progress saves during an initial scan. [#154598][#154598] +- Fixed a bug where CockroachDB would not log events for `TxnRowsRead` and `TxnRowsWritten` guardrails for internal queries into the `SQL_INTERNAL_PERF` logging channel. The bug was present since v21.2. [#154670][#154670] +- Fixed a bug that caused internal errors for `INSERT .. ON CONFLICT .. DO UPDATE` statements when the target table had both a computed column and a `BEFORE` trigger. This bug was present since triggers were introduced in v24.3.0. [#154789][#154789] +- Fixed a bug where a changefeed targeting only a subset + of a table's column families could become stuck. [#154802][#154802] +- Fixed a bug where CockroachDB would hit an internal error when performing an inverted join using an inverted index in which the first prefix column had `DESC` direction. The bug was present since v21.1. [#154914][#154914] +- Fixed a bug where the `kvflowcontrol.send_queue.scheduled.force_flush` metric was missing a decrement, resulting in a value of greater than `0` even when there was no ongoing force flush. [#154960][#154960] +- Fixed a bug that would cause `WITH READ VIRTUAL CLUSTER` to be ignored if any other options were passed when running `CREATE VIRTUAL CLUSTER FROM REPLICATION`. [#154963][#154963] +- Fixed a bug in which range counts in table statistics histograms were not handled correctly after a user-defined `ENUM` type was modified. [#155035][#155035] +- Internal assertions that verify `NumRange = 0` in the first histogram bucket, used to catch malformed statistics, now run only in test builds to avoid crashing production queries. [#155035][#155035] +- Fixed a bug in the `cockroach node drain` command where draining a node using virtual clusters (such as clusters running Physical Cluster Replication (PCR)) could return before the drain was complete, possibly resulting in shutting down the node while it still had active SQL clients and range leases. [#155063][#155063] +- Fixed a bug where a race condition in range splits could result in a regressed Raft state on a post-split range. This condition was extremely rare, and only observed during internal testing. [#155143][#155143] +- Corrected a potential deadlock during vector index creation. [#155192][#155192] +- Fixed a bug that would result in a node crash if a + PCR or LDR URI used `sslinline=true` with `sslmode=disable`. [#155232][#155232] +- Fixed a bug where CockroachDB could corrupt the first bucket of table statistic histograms in certain cases, causing underestimates for range counts near the lower end of the domain. [#155242][#155242] +- Added proper dependency handling when adding a constraint with `NOT VALID` that references a user-defined function (UDF). [#155404][#155404] +- Fixed a bug that prevented the optimizer from recognizing correlated filters when one of the filtered columns had a single distinct value across all rows. This could lead to suboptimal query plans in some cases. [#155407][#155407] +- The username remapping functionality specified by the `server.identity_map.configuration` cluster setting now matches identities and usernames with a case-insensitive comparison. [#155531][#155531] +- Previously, the forecasted statistics shown in `SHOW STATISTICS ... WITH FORECAST` could be inconsistent with those in the stats cache, depending on whether `WITH MERGE` was specified. Forecasted statistics are now displayed consistently, regardless of the `WITH MERGE` clause. [#155615][#155615] +- Fixed a bug where CockroachDB could crash when executing `EXPLAIN ANALYZE` statements using the pausable portal model. This would occur when the query was executed via the extended PGWire protocol (`Parse`, `Bind`, `Execute`) with the `multiple_active_portals_enabled` session variable set. The bug was present since v23.2. [#155655][#155655] +- `INSPECT` can now be run on tables with indexes that store `REFCURSOR`-typed columns. [#155772][#155772] +- Fixes a bug where `DROP SCHEMA CASCADE` could run into an error with complex references from triggers. [#155777][#155777] +- Fixed a bug where the job responsible for compacting stats for the SQL activity state could enter an unschedulable state. Fixes: #155165 [#155809][#155809] +- Fixed a bug where reads and writes performed by routines (user-defined functions and stored procedures) and apply joins were not included in `bytes read`, `rows read`, and `rows written` statement execution statistics. This bug had been present since before v23.2. [#155824][#155824] +- `INSPECT` now correctly checks index consistency at the historical timestamp when using `AS OF SYSTEM TIME`, even for spans with no current data. [#155837][#155837] +- The `INSPECT` statement now detects dangling secondary index entries even when the primary index spans contain no data. [#155844][#155844] +- Fixed an internal error that could occur when replacing a user-defined function or stored procedure using `CREATE OR REPLACE`, if the existing signature included multiple `DEFAULT` expressions. This bug was introduced in v24.2, when support for `DEFAULT` expressions was added. [#155867][#155867] +- `INSPECT` no longer fails when checking index consistency on indexes with virtual key columns. Such indexes will now be skipped. [#155956][#155956] +- Fixed a bug where DML statements on regional by row tables with unique indexes that do not reference the region could sometimes fail under `READ COMMITTED` isolation. [#156105][#156105] +- Fixed a bug where Zone Config Extensions incorrectly prevented users from removing non-voting read replicas from multi-region databases. Users can now set `num_replicas` equal to `num_voters` to remove read replicas while maintaining the required number of voting replicas for their database's survival goal. This allows reducing storage costs without compromising availability guarantees. [#156228][#156228] +- Fixed a bug in the `ltree2text` built-in function where the returned `TEXT` value was incorrectly wrapped in single quotes. This bug had been present since the `ltree2text` function was introduced in v25.4.0. [#156485][#156485] +- Fixed a bug that caused incorrect results for queries that filter indexed `LTREE` columns with the `<@` (contained-by) operator. This bug was present since v25.4.0. [#156573][#156573] +- Fixed a bug where the "atomic" `COPY` command (controlled via the `copy_from_atomic_enabled` session setting, `true` by default) could encounter `RETRY_COMMIT_DEADLINE_EXCEEDED` transaction errors if the whole command took 1 minute or more. This bug occurred only when the vectorized engine was used for `COPY`. [#156584][#156584] +- Fixed a bug that caused transactions to fail with the following error message: + + failed indeterminate commit recovery: programming error: timestamp change by + implicitly committed transaction [#156722][#156722] +- Fixed a bug in JSONPath index acceleration where queries using `jsonb_path_exists` with a root key (e.g., `$.b`) incorrectly returned no results when the queried JSON was an array. This fix enables unwrapping a single array layer at the root, allowing the path to be evaluated against each element. Only v25.4.0 releases were affected. [#156828][#156828] +- Fixed a bug that prevents large `TRUNCATE` operations from completing due to `command is too large` errors. [#156867][#156867] +- Fixed a bug that could cause an internal error + in some cases for PL/pgSQL routines that perform database reads within + an exception block. [#156902][#156902] +- Fixed a bug that caused incorrect `gossip.callbacks.pending_duration` metric values to be recorded. [#156939][#156939] +- Fixed a bug where transactions running concurrently with a `GRANT` or `REVOKE` on virtual tables or via external connections could observe modifications incorrectly. [#156949][#156949] +- Fixed a bug where CockroachDB could encounter an internal error when evaluating a `COPY FROM` command in a transaction after it was rolled back to a savepoint. The bug was present since before v23.2. [#156959][#156959] +- Fixed a bug that could cause internal errors for queries using generic query plans with `NULL` placeholder values. [#156962][#156962] +- Fixed a bug existing since SQL statements with + INTO clause were introduced for PL/pgSQL routines in v23.2. The bug could + cause a SQL statement with side effects (e.g. INSERT) to be dropped if + none of the target variables from the INTO clause were referenced. [#156966][#156966] +- Fixed a bug that could cause a schema change to be stuck in the reverting state if the `infer_rbr_region_col_using_constraint` storage parameter was being set at the same time as adding a constraint that had a foreign key violation. [#157834][#157834] +- Fixed a bug where renaming a column that participated in multiple hash-sharded indexes would fail. [#158045][#158045] +- Fixed a bug where `ORDER BY` clauses in user-defined set-returning SQL functions with `OUT` parameters were ignored when the function was called directly in a `SELECT` list (e.g., `SELECT f()`). The ordering is now properly preserved and enforced. [#158162][#158162] +- The pgwire server now exits promptly on context cancellation. [#158269][#158269] +- CockroachDB could previously hit a bounded + memory leak when collecting table statistics on a table that had both + very wide (10KiB or more) and relatively small (under 400B) BYTES-like + values within the same row as well as virtual computed columns. This + has been present since introduction of stats collection on virtual + computed columns in 24.1. [#158370][#158370] +- Temporary schema cleanup no longer retries after poisoned transaction errors, reducing log noise. [#158396][#158396] +- When changing the time interval on the **Metrics** page, the DB Console previously sent duplicate requests for metrics data. This has been fixed, and the UI now issues a single, efficient request when updating the time interval. [#158595][#158595] + +

Performance improvements

+ +- Add new `update swap` and + `delete swap` operators which allow some UPDATE and DELETE statements to + execute in 1 round trip instead of 2 round trips. For now, these + operators can be used when: + + - all columns in the primary index are constrained to a single exact value + by the WHERE clause; + - only a single row is modified; + - there are no FK checks or cascades; + - there are no uniqueness checks; + - there are no check constraints; + - there are no vector indexes modified; + - there are no passthrough columns to RETURNING; + - there are no triggers; + - the table only uses a single column family; + - there are no mutation columns or mutation indexes (i.e. the table is + not undergoing an ALTER); + - there are no columns using composite encoding (e.g. DECIMAL, FLOAT, + JSON, etc). + + We may lift some of these restrictions in future releases. [#145019][#145019] +- The cost of generic query plans is now calculated based on worst-case selectivities for placeholder equalities (e.g., `x = $1`). This reduces the chance of suboptimal generic query plans being chosen when `plan_cache_mode=auto`. [#151409][#151409] +- TTL jobs now checkpoint their progress, allowing them to resume without reprocessing already completed spans after a restart. [#152618][#152618] +- Queries with filters in the form `a LIKE b ESCAPE '\'` are now index-accelerated in certain cases where they were not before. [#155064][#155064] +- The optimizer now chooses suboptimal generic query plans in fewer cases. It will no longer choose a generic query plan with unbounded cardinality over a custom query plan with bounded cardinality, +regardless of `optimizer_prefer_bounded_cardinality`. [#155163][#155163] +- Optimized validation queries during `ALTER PRIMARY KEY` to avoid counting the primary key multiple times. [#156889][#156889] +- The optimizer now splits disjunctions on the same column into unions when there are multiple partial indexes with different predicates referencing that column. [#157083][#157083] +- The optimizer now collapses + repeated "%" wildcard characters in LIKE patterns. This may improve + performance of queries with theses types of LIKE patterns. + + Co-authored-by: Daniel Hix + Co-authored-by: Sriram + Co-authored-by: Marcus Gartner + Co-authored-by: dils2k [#158025][#158025] +- More of the CPU usage of LDR jobs is subject to background job admission control limits. [#158361][#158361] + +

Build changes

+ +- Upgraded to Go version 1.25.3 [#156000][#156000] + +

Miscellaneous

+ +- Added initial and catchup scan metrics to PCR under + `physical_replication.scanning_ranges` and + `physical_replication.catchup_ranges`. [#153893][#153893] +- Added a retry policy for Azure Blob Storage with a default of 60 seconds to mitigate occasional stuck operations. Retry policy is configurable with the `cloudstorage.azure.try.timeout` setting. Fixes: #154085 [#154149][#154149] +- LDR now updates the `logical_replication.scanning_ranges` + and `logical_replication.catchup_ranges` metrics during fast initial + scan. [#155274][#155274] +- Added `jobs.registry.max_adoptions_per_loop` cluster setting to configure the maximum number of jobs a node can adopt per adoption loop. [#155385][#155385] +- Fixed a bug that prevented admin users from having full access to external connections created by other users. [#155657][#155657] +- LDR no longer requires the database name to be specified + in the external connection URI when setting up a bidirectional stream. [#155729][#155729] +- Span config reconciliation jobs no longer fail on the + destination after failover from a PCR stream of a system virtual cluster. [#156003][#156003] +- Added support of partial indexes to Logical Data Replication, tolerant of mismatched column IDs in the source and destination tables. + + Epic: CRDB-51533 [#156935][#156935] +- Display whether build is FIPS-enabled in + `cockroach version` [#157223][#157223] + + +[#155216]: https://github.com/cockroachdb/cockroach/pull/155216 +[#155454]: https://github.com/cockroachdb/cockroach/pull/155454 +[#158065]: https://github.com/cockroachdb/cockroach/pull/158065 +[#156228]: https://github.com/cockroachdb/cockroach/pull/156228 +[#156939]: https://github.com/cockroachdb/cockroach/pull/156939 +[#151131]: https://github.com/cockroachdb/cockroach/pull/151131 +[#154522]: https://github.com/cockroachdb/cockroach/pull/154522 +[#155777]: https://github.com/cockroachdb/cockroach/pull/155777 +[#156962]: https://github.com/cockroachdb/cockroach/pull/156962 +[#153893]: https://github.com/cockroachdb/cockroach/pull/153893 +[#155657]: https://github.com/cockroachdb/cockroach/pull/155657 +[#155274]: https://github.com/cockroachdb/cockroach/pull/155274 +[#155385]: https://github.com/cockroachdb/cockroach/pull/155385 +[#154873]: https://github.com/cockroachdb/cockroach/pull/154873 +[#155778]: https://github.com/cockroachdb/cockroach/pull/155778 +[#154802]: https://github.com/cockroachdb/cockroach/pull/154802 +[#156949]: https://github.com/cockroachdb/cockroach/pull/156949 +[#157834]: https://github.com/cockroachdb/cockroach/pull/157834 +[#154051]: https://github.com/cockroachdb/cockroach/pull/154051 +[#158055]: https://github.com/cockroachdb/cockroach/pull/158055 +[#154670]: https://github.com/cockroachdb/cockroach/pull/154670 +[#154209]: https://github.com/cockroachdb/cockroach/pull/154209 +[#156959]: https://github.com/cockroachdb/cockroach/pull/156959 +[#156966]: https://github.com/cockroachdb/cockroach/pull/156966 +[#156152]: https://github.com/cockroachdb/cockroach/pull/156152 +[#154598]: https://github.com/cockroachdb/cockroach/pull/154598 +[#154960]: https://github.com/cockroachdb/cockroach/pull/154960 +[#156105]: https://github.com/cockroachdb/cockroach/pull/156105 +[#154744]: https://github.com/cockroachdb/cockroach/pull/154744 +[#155284]: https://github.com/cockroachdb/cockroach/pull/155284 +[#156801]: https://github.com/cockroachdb/cockroach/pull/156801 +[#156867]: https://github.com/cockroachdb/cockroach/pull/156867 +[#158269]: https://github.com/cockroachdb/cockroach/pull/158269 +[#156600]: https://github.com/cockroachdb/cockroach/pull/156600 +[#157160]: https://github.com/cockroachdb/cockroach/pull/157160 +[#158396]: https://github.com/cockroachdb/cockroach/pull/158396 +[#156889]: https://github.com/cockroachdb/cockroach/pull/156889 +[#158025]: https://github.com/cockroachdb/cockroach/pull/158025 +[#158636]: https://github.com/cockroachdb/cockroach/pull/158636 +[#148549]: https://github.com/cockroachdb/cockroach/pull/148549 +[#154789]: https://github.com/cockroachdb/cockroach/pull/154789 +[#156573]: https://github.com/cockroachdb/cockroach/pull/156573 +[#153889]: https://github.com/cockroachdb/cockroach/pull/153889 +[#151409]: https://github.com/cockroachdb/cockroach/pull/151409 +[#157083]: https://github.com/cockroachdb/cockroach/pull/157083 +[#154149]: https://github.com/cockroachdb/cockroach/pull/154149 +[#155232]: https://github.com/cockroachdb/cockroach/pull/155232 +[#156000]: https://github.com/cockroachdb/cockroach/pull/156000 +[#156935]: https://github.com/cockroachdb/cockroach/pull/156935 +[#153990]: https://github.com/cockroachdb/cockroach/pull/153990 +[#145019]: https://github.com/cockroachdb/cockroach/pull/145019 +[#155820]: https://github.com/cockroachdb/cockroach/pull/155820 +[#158141]: https://github.com/cockroachdb/cockroach/pull/158141 +[#154545]: https://github.com/cockroachdb/cockroach/pull/154545 +[#155485]: https://github.com/cockroachdb/cockroach/pull/155485 +[#158370]: https://github.com/cockroachdb/cockroach/pull/158370 +[#155655]: https://github.com/cockroachdb/cockroach/pull/155655 +[#154489]: https://github.com/cockroachdb/cockroach/pull/154489 +[#158096]: https://github.com/cockroachdb/cockroach/pull/158096 +[#154552]: https://github.com/cockroachdb/cockroach/pull/154552 +[#158085]: https://github.com/cockroachdb/cockroach/pull/158085 +[#155615]: https://github.com/cockroachdb/cockroach/pull/155615 +[#153951]: https://github.com/cockroachdb/cockroach/pull/153951 +[#155192]: https://github.com/cockroachdb/cockroach/pull/155192 +[#155404]: https://github.com/cockroachdb/cockroach/pull/155404 +[#155844]: https://github.com/cockroachdb/cockroach/pull/155844 +[#155064]: https://github.com/cockroachdb/cockroach/pull/155064 +[#157144]: https://github.com/cockroachdb/cockroach/pull/157144 +[#153975]: https://github.com/cockroachdb/cockroach/pull/153975 +[#158045]: https://github.com/cockroachdb/cockroach/pull/158045 +[#154412]: https://github.com/cockroachdb/cockroach/pull/154412 +[#152745]: https://github.com/cockroachdb/cockroach/pull/152745 +[#154963]: https://github.com/cockroachdb/cockroach/pull/154963 +[#158076]: https://github.com/cockroachdb/cockroach/pull/158076 +[#156303]: https://github.com/cockroachdb/cockroach/pull/156303 +[#156975]: https://github.com/cockroachdb/cockroach/pull/156975 +[#155867]: https://github.com/cockroachdb/cockroach/pull/155867 +[#155956]: https://github.com/cockroachdb/cockroach/pull/155956 +[#154870]: https://github.com/cockroachdb/cockroach/pull/154870 +[#155163]: https://github.com/cockroachdb/cockroach/pull/155163 +[#158595]: https://github.com/cockroachdb/cockroach/pull/158595 +[#156610]: https://github.com/cockroachdb/cockroach/pull/156610 +[#152882]: https://github.com/cockroachdb/cockroach/pull/152882 +[#155035]: https://github.com/cockroachdb/cockroach/pull/155035 +[#156722]: https://github.com/cockroachdb/cockroach/pull/156722 +[#156828]: https://github.com/cockroachdb/cockroach/pull/156828 +[#150793]: https://github.com/cockroachdb/cockroach/pull/150793 +[#155203]: https://github.com/cockroachdb/cockroach/pull/155203 +[#158162]: https://github.com/cockroachdb/cockroach/pull/158162 +[#154370]: https://github.com/cockroachdb/cockroach/pull/154370 +[#155063]: https://github.com/cockroachdb/cockroach/pull/155063 +[#155143]: https://github.com/cockroachdb/cockroach/pull/155143 +[#155531]: https://github.com/cockroachdb/cockroach/pull/155531 +[#156902]: https://github.com/cockroachdb/cockroach/pull/156902 +[#158350]: https://github.com/cockroachdb/cockroach/pull/158350 +[#155242]: https://github.com/cockroachdb/cockroach/pull/155242 +[#158499]: https://github.com/cockroachdb/cockroach/pull/158499 +[#151946]: https://github.com/cockroachdb/cockroach/pull/151946 +[#152853]: https://github.com/cockroachdb/cockroach/pull/152853 +[#154028]: https://github.com/cockroachdb/cockroach/pull/154028 +[#156584]: https://github.com/cockroachdb/cockroach/pull/156584 +[#155729]: https://github.com/cockroachdb/cockroach/pull/155729 +[#158500]: https://github.com/cockroachdb/cockroach/pull/158500 +[#155772]: https://github.com/cockroachdb/cockroach/pull/155772 +[#155837]: https://github.com/cockroachdb/cockroach/pull/155837 +[#156485]: https://github.com/cockroachdb/cockroach/pull/156485 +[#158361]: https://github.com/cockroachdb/cockroach/pull/158361 +[#155774]: https://github.com/cockroachdb/cockroach/pull/155774 +[#156905]: https://github.com/cockroachdb/cockroach/pull/156905 +[#158424]: https://github.com/cockroachdb/cockroach/pull/158424 +[#155809]: https://github.com/cockroachdb/cockroach/pull/155809 +[#152618]: https://github.com/cockroachdb/cockroach/pull/152618 +[#156003]: https://github.com/cockroachdb/cockroach/pull/156003 +[#157223]: https://github.com/cockroachdb/cockroach/pull/157223 +[#153419]: https://github.com/cockroachdb/cockroach/pull/153419 +[#155536]: https://github.com/cockroachdb/cockroach/pull/155536 +[#155516]: https://github.com/cockroachdb/cockroach/pull/155516 +[#154162]: https://github.com/cockroachdb/cockroach/pull/154162 +[#154914]: https://github.com/cockroachdb/cockroach/pull/154914 +[#155407]: https://github.com/cockroachdb/cockroach/pull/155407 +[#153067]: https://github.com/cockroachdb/cockroach/pull/153067 +[#154892]: https://github.com/cockroachdb/cockroach/pull/154892 +[#155110]: https://github.com/cockroachdb/cockroach/pull/155110 +[#155848]: https://github.com/cockroachdb/cockroach/pull/155848 +[#158219]: https://github.com/cockroachdb/cockroach/pull/158219 +[#158364]: https://github.com/cockroachdb/cockroach/pull/158364 +[#158398]: https://github.com/cockroachdb/cockroach/pull/158398 +[#155824]: https://github.com/cockroachdb/cockroach/pull/155824 +[#152469]: https://github.com/cockroachdb/cockroach/pull/152469 +[#156307]: https://github.com/cockroachdb/cockroach/pull/156307 +[#153364]: https://github.com/cockroachdb/cockroach/pull/153364 +[#145934]: https://github.com/cockroachdb/cockroach/pull/145934 +[#152010]: https://github.com/cockroachdb/cockroach/pull/152010 +[#154495]: https://github.com/cockroachdb/cockroach/pull/154495