- For a summary of the most significant changes in v24.1, refer to Feature highlights.
- Before , review the backward-incompatible changes, including key cluster setting changes and deprecations; as well as newly identified known limtiations.
- For details about the support window for this release type, review the .
- For details about all supported releases, the release schedule, and licenses, refer to .
- After downloading a supported CockroachDB binary, learn how to or .
v24.1.31
Release Date: June 26, 2026Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.31.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.31.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.31.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.31.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.31.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.31.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.31.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.31.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.31.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.31.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
- Security: Fixed an issue where a tenant-scoped client certificate could bypass tenant-scope checks and gain cluster-wide RPC access if its subject distinguished name (DN) matched the configured root or node DN.
v24.1.30
Release Date: June 11, 2026Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.30.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.30.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.30.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.30.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.30.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.30.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.30.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.30.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.30.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.30.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug where the view owner’s privileges on underlying tables were not checked when selecting from a view. A view would continue to work even after the owner lost access to the underlying tables. To enforce privilege checks on underlying tables, set the
sql.auth.skip_underlying_view_privilege_checks.enabledcluster setting tofalse. This setting defaults totrueto prevent backward-incompatible behavior.
Build changes
- Replaces bors with Trunk merge queue for better performance and reliability. Configuration-only change with no runtime impact - maintains same safety checks while improving CI workflow.
v24.1.29
Release Date: May 12, 2026Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.29.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.29.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.29.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.29.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.29.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.29.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.29.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.29.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.29.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.29.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug that would allow a race condition in foreign key cascades under
READ COMMITTEDandREPEATABLE READisolation levels. - Fixed a bug that allowed foreign-key violations to result from some combinations of concurrent
READ COMMITTEDandSERIALIZABLEtransactions. If bothSERIALIZABLEand weaker-isolation transactions will concurrently modify rows involved in foreign-key relationships, theSERIALIZABLEtransactions must have the following session variables set in order to prevent any possible foreign-key violations:SET enable_implicit_fk_locking_for_serializable = on;SET enable_shared_locking_for_serializable = on;SET enable_durable_locking_for_serializable = on;
v24.1.28
Release Date: April 22, 2026Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.28.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.28.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.28.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.28.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.28.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.28.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.28.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.28.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.28.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.28.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug where concurrent updates to a table using multiple column families during a partial index creation could result in data loss, incorrect
NULLvalues, or validation failures in the resulting index.
v24.1.27
Release Date: April 8, 2026Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.27.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.27.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.27.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.27.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.27.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.27.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.27.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.27.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.27.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.27.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug where generating a debug zip could trigger an out-of-memory (OOM) condition on a node if malformed log entries were present in logs using
jsonorjson-compactformatting. This bug was introduced in v24.1.
v24.1.26
Release Date: February 19, 2026Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.26.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.26.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.26.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.26.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.26.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.26.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.26.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.26.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.26.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.26.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a rare race condition between range splits and MVCC garbage collection where a GCRequest could target keys outside its declared span. In rare cases, this could result in data on the post-split right-hand side (RHS) being incorrectly garbage collected, potentially leading to lost writes. The system now detects and rejects such malformed GC requests.
- Fixed a bug where generating a debug zip could trigger an out-of-memory (OOM) condition on a node if malformed log entries were present in logs using json or json-compact formatting. Debug zip generation now safely handles malformed log lines and prevents excessive memory consumption.
v24.1.25
Release Date: October 17, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.25.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.25.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.25.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.25.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.25.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.25.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.25.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.25.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.25.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.25.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug where an
INSERTstatement could fail with a type checking error while adding aBIT(n)column. - Fixed a bug that caused panics when executing
COPYinto a table with hidden columns and expression indexes. The panic only occurred when the session settingexpect_and_ignore_not_visible_columns_in_copywas enabled. This bug was introduced withexpect_and_ignore_not_visible_columns_in_copyin v22.1.0. - Fixed a bug where the presence of duplicate temporary tables in a backup caused the restore to fail with an error containing the text
restoring table desc and namespace entries: table already exists.
v24.1.24
Release Date: September 22, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.24.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.24.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.24.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.24.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.24.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.24.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.24.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.24.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.24.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.24.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
- When
sql_safe_updatesis enabled, theALTER TABLE... LOCALITYstatement will be blocked when trying to convert an existing table toREGIONAL BY ROW, unless a region column has been added to the table. This protects against undesired behavior that causedUPDATEorDELETEstatements to fail against the table while the locality change was in progress.
Operational changes
- Updated TTL job replanning to be less sensitive by focusing specifically on detecting when nodes become unavailable rather than reacting to all plan differences. The cluster setting
sql.ttl.replan_flow_thresholdmay have been set to0to work around the TTL replanner being too sensitive; this fix will alleviate that and any instance that had setreplan_flow_thresholdto0can be reset back to the default.
Bug fixes
- Fixed a bug where
debug.zipfiles collected from clusters withdisallow_full_table_scansenabled were missing system table data. - Fixed a bug where updating column default expressions would incorrectly remove sequence ownerships for the affected column.
- Fixed a bug where views could not reference the
crdb_regioncolumn from their underlying tables in expressions.
Performance improvements
- Lookup joins can now be used on tables with virtual columns even if the type of the search argument is not identical to the column type referenced in the virtual column.
v24.1.23
Release Date: August 22, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.23.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.23.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.23.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.23.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.23.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.23.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.23.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.23.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.23.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.23.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:General changes
- Backporting detailed error logging logic gated behind a cluster setting. The cluster setting enables detailed error logging for messages exceeding Kafka v2 size limit.
- Changefeeds emitting to Kafka sinks that were created in CockroachDB v24.2.1+, or v23.2.10+ and v24.1.4+ with the
changefeed.new_kafka_sink.enabledcluster setting enabled now include the message key, size, and MVCC timestamp in “message too large” error logs.
Bug fixes
- Fixed an issue where the
mvcc_timestampfield was incorrectly returning zero values when used with CDC queries. The timestamp is now emitted correctly. - Fixed a bug that could cause some errors returned by attempts to upload backup data to external storage providers to be undetected, potentially causing incomplete backups.
Build changes
- Upgrade Go to consume security fixes
Miscellaneous
- Restore will now re-attempt
AdminSplitKV requests instead of immediately failing and pausing the job.
v24.1.22
Release Date: August 1, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.22.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.22.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.22.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.22.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.22.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.22.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.22.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.22.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.22.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.22.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug that could cause some errors returned by attempts to upload backup data to external storage providers to be undetected, potentially causing incomplete backups.
v24.1.21
Release Date: July 28, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.21.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.21.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.21.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.21.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.21.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.21.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.21.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.21.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.21.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.21.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a data race in the
cloudstoragesink. - Fixed a bug where
libpqclients using the async API could hang with large result sets (Python: psycopg; Ruby: ActiveRecord, ruby-pg).
v24.1.20
Release Date: June 25, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.20.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.20.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.20.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.20.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.20.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.20.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.20.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.20.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.20.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.20.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug that could potentially cause a changefeed to complete erroneously when one of its watched tables encounters a schema change.
- Fixed a bug that caused the SQL Activity > Statement Fingerprint page to fail to load details for statements run with application names containing a
#character. - Fixed a bug that could cause the
cockroachprocess tosegfaultwhen collecting runtime execution traces (typically collected via the Advanced Debug page in the Console). - Fixed a bug that could cause stable expressions to be folded in cached query plans. The bug could cause stable expressions like
current_settingto return the wrong result if used in a prepared statement. The bug was introduced in v23.2.22, v24.1.14, v24.3.9, v25.1.2, and the v25.2 alpha. - Fixed a bug where prepared statements on schema changes could fail with runtime errors.
- Fixed a bug where
ALTER TABLEwas modifying identity attributes on columns not backed by a sequence.
Performance improvements
- TTL jobs now respond to cluster topology changes by restarting and rebalancing across available nodes.
v24.1.19
Release Date: May 28, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.19.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.19.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.19.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.19.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.19.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.19.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.19.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.19.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.19.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.19.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Operational changes
- Changed the default value of the cluster setting
admission.l0_file_count_overload_thresholdto4000.
DB Console changes
- Schema insights that recommend replacing an index were previously a two-statement command consisting of a
CREATE INDEXand aDROP INDEXstatement. When these two DDL statements were run as a single batched command, it was possible for one statement to succeed and one to fail. This is because DDL statements do not have the same atomicity guarantees as other SQL statements in CockroachDB. Index-replacement insights are now a singleCREATE INDEXstatement followed by a comment with additional DDL statements to be run manually: anALTER INDEX... NOT VISIBLEstatement, which makes the old index invisible to the optimizer, followed by aDROP INDEXstatement that should only be run after making the old index invisible and verifying that workload performance is satisfactory.
Bug fixes
- Fixed a bug where CockroachDB could encounter a
cannot specify timestamp older than...error during table statistics collection in some cases (e.g., when the cluster is overloaded). The bug was present since v19.1. - Fixed a bug in the DB Console where tables with page size dropdowns failed to update when a new page size option was selected. Tables now update correctly.
- Fixed the following bugs in the Schedules page of the DB Console:
- Fixed a bug where the Schedules page displayed only a subset of a cluster’s schedules. The Schedules page now correctly displays all schedules.
- Fixed a bug where manually updating the
showorstatusparameters in the URL (e.g.,http://127.0.0.1:8080/#/schedules?status=ACTIVE&show=50) caused the Schedules page to fail to load.
- Fixed a bug in the SQL Activity Statements page where filtering by Statement Type returned no results. The filter now works as expected.
- Improved the performance of
SHOW CREATE TABLEon multi-region databases with large numbers of objects. - Fixed a bug that could lead to schema changes hanging after a cluster recovered from availability issues.
- Previously, on a table with multiple column families, CockroachDB could encounter a
Non-nullable column "‹×›:‹×›" with no valueerror in rare cases during table statistics collection. The bug was present since v19.2 and is now fixed. - Fixed a bug where orphaned leases were not properly cleaned up.
- Fixed an internal assertion failure that could occur during operations like
ALTER TYPEorALTER DATABASE... ADD REGIONwhen temporary tables were present. - Fixed a bug that could cause queries that perform work in parallel to ignore the requested quality-of-service level. Affected operations include lookup joins, DistSQL execution, and foreign-key checks.
- Fixed a bug that prevented
TRUNCATEfrom succeeding if any indexes on the table had back-reference dependencies, such as from a view or function referencing the index. \ - Fixed a rare corruption bug that impacts import and materialized views.
v24.1.18
Release Date: April 30, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.18.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.18.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.18.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.18.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.18.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.18.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.18.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.18.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.18.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.18.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
EXPLAIN ANALYZEstatements now display the number of transaction retries and time spent retrying, if non-zero, in the plan output.- Added the
WITH IGNORE_FOREIGN_KEYSoption toSHOW CREATE TABLEwhich omits foreign key constraints from the output schema. This option is also allowed inSHOW CREATE VIEW, but has no effect. It cannot be combined with theWITH REDACToption.
Bug fixes
- Fixed a rare corruption bug that impacts import and materialized views.
- Fixed a bug that caused changefeeds to fail on startup when scanning a single key.
- Fixed a bug in the client certificate expiration metrics
security.certificate.expiration.clientandsecurity.certificate.ttl.client. - Fixed a bug in v24.1.14, v24.3.7, v24.3.8, and v25.1 that could cause a nil-pointer error when a column’s default expression contained a volatile expression (like
nextval) as a UDF argument. - MVCC garbage collection is now fully subject to IO admission control. Previously, it was possible for MVCC GC to cause store overload (such as LSM inversion) when a large amount of data would become eligible for garbage collection. Should any issues arise from subjecting MVCC GC to admission control, the
kv.mvcc_gc.queue_kv_admission_control.enabledcluster setting can be set tofalseto restore the previous behavior. - Fixed a bug that could cause a stack overflow during execution of a prepared statement that invoked a PL/pgSQL routine with a loop. The bug existed in versions v23.2.22, v24.1.15, v24.3.9, v25.1.2, v25.1.3, and pre-release versions of v25.2 prior to v25.2.0-alpha.3.
- Fixed a bug where CockroachDB would encounter an internal error when decoding the gists of plans with
CALLstatements. The bug had been present since v23.2. - Fixed a bug where calling a stored procedure could drop the procedure if it had
OUTparameters that were not used by the calling routine. This bug had existed since PL/pgSQLCALLstatements were introduced in v24.1. - Previously, the fields
maximum memory usageandmax sql temp disk usagein theEXPLAIN ANALYZEoutput could be under-reported for distributed plans when memory-intensive operations were fully performed on the remote nodes. This is now fixed. The bug existed in v22.1 and later.
v24.1.17
Release Date: April 28, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.17.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.17.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.17.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.17.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.17.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.17.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.17.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.17.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.17.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.17.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a rare corruption bug that impacts import and materialized views.
v24.1.16
Release Date: April 9, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.16.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.16.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.16.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.16.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.16.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.16.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.16.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.16.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.16.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.16.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug that could cause a stack overflow during execution of a prepared statement that invoked a PL/pgSQL routine with a loop. The bug existed in versions v23.2.22, v24.1.15, v24.3.9, v25.1.2, v25.1.3, and pre-release versions of v25.2 prior to v25.2.0-alpha.3.
v24.1.15
Release Date: April 3, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.15.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.15.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.15.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.15.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.15.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.15.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.15.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.15.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.15.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.15.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Operational changes
- Added the
sql.statement_timeout.countmetric to track the number of SQL statements that fail due to exceeding the statement timeout. - Added the
sql.transaction_timeout.countmetric to track the number of SQL statements that fail due to exceeding the transaction timeout. - The
node decommissionCLI command now waits until the target node is fully drained before marking it as decommissioned. Previously, the command would start draining but not wait, leaving the node in an unstable state where it could still accept client requests while being unable to communicate with the cluster, causing those requests to hang or fail with unexpected errors.
Bug fixes
- Fixed a bug that could cause
SHOW TABLESand other introspection operations to encounter a “batch timestamp must be after replica GC threshold” error. - Fixed a bug that could cause gateway nodes to panic when performing an
UPSERTon a table with aBOOLprimary key column and a partial index using the primary key column as the predicate expression. - Fixed a bug where
CREATE SEQUENCEwithout concurrent DDL operations could hit a retry error due to incorrect schema modification. - Fixed a bug where CockroachDB could incorrectly evaluate casts to some OID types (e.g.,
REGCLASS). This issue had been present since at least v22.1. - Fixed a bug that could cause
nil pointer dereferenceerrors when executing statements with user-defined functions (UDFs) or certain built-in functions likeobj_description. - Fixed a bug where nodes drained during decommissioning could interrupt active SQL connections unexpectedly, even when drain was expected to wait for them to complete.
- Fixed a bug where the fraction completed and internal checkpoints during an index backfill operation would stop being written if any periodic fraction/checkpoint write failed. Progress is now additionally logged to aid debugging. This bug affected schema changes such as creating an index or adding a non-nullable column.
- Fixed a bug that could prevent
SHOW CREATE TABLEfrom working if a database was offline (e.g., due to aRESTORE). - Fixed a bug where tuple labels were sometimes disregarded, causing unexpected behavior, such as when converting a tuple to
JSONwithto_jsonb. This bug existed since v22.1.0 and became more likely to cause issues after changes in v24.1.7. - Fixed a bug where the declarative schema changer allowed
CREATE SEQUENCEoperations to proceed even while aDROP SCHEMAorDROP DATABASEwas in progress. Such operations now retry if the parent object has a schema change in progress. - Fixed a bug in
v24.1.14,v24.3.7,v24.3.8, andv25.1that could cause a nil-pointer error when a column’s default expression contained a volatile expression (likenextval) as a UDF argument.
Miscellaneous
- Configuring the
sql.ttl.default_delete_rate_limitcluster setting now displays a notice clarifying that the TTL rate limit is per leaseholder per table, with a link to the documentation.
v24.1.14
Release Date: March 6, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.14.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.14.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.14.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.14.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.14.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.14.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.14.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.14.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.14.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.14.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
- Since v23.2, table statistics histograms have been collected for non-indexed
JSONBcolumns. Histograms are no longer collected for these columns if thesql.stats.non_indexed_json_histograms.enabledcluster setting is set tofalse. This reduces memory usage during table statistics collection for both automatic and manual collection viaANALYZEandCREATE STATISTICS. - Added support for a new index hint,
AVOID_FULL_SCAN, which will prevent the optimizer from planning a full scan for the specified table if any other plan is possible. The hint can be used in the same way as other existing index hints. For example,SELECT * FROM table_name@{AVOID_FULL_SCAN};. This hint is similar toNO_FULL_SCAN, but will not error if a full scan cannot be avoided. Note that normally a full scan of a partial index would not be considered a “full scan” for the purposes of theNO_FULL_SCANandAVOID_FULL_SCANhints, but if the user has explicitly forced the partial index viaFORCE_INDEX=index_name, we do consider it a full scan. - Added the
optimizer_prefer_bounded_cardinalitysession setting, which instructs the optimizer to prefer query plans where every expression has a guaranteed upper-bound on the number of rows it will process. This may help the optimizer produce better query plans in some cases. This setting is disabled by default. - Added the
optimizer_min_row_countsession setting, which sets a lower bound on row count estimates for relational expressions during query planning. A value of0, which is the default, indicates no lower bound. Note that if this is set to a value greater than 0, a row count of zero can still be estimated for expressions with a cardinality of zero, e.g., for a contradictory filter. Setting this to a value higher than0, such as1, may yield better query plans in some cases, such as when statistics are frequently stale and inaccurate. - Fixed a bug existing only in pre-release versions of v25.1 which could cause unexpected errors during planning for
VALUESexpressions containing function calls with multiple overloads. - Added the
optimizer_check_input_min_row_countsession setting to control the minimum row count estimate for buffer scans of foreign key and uniqueness checks. It defaults to0.
Operational changes
- The
changefeed.max_behind_nanosmetric now supports scoping with metric labels.
Command-line changes
- Improved the performance of the debug zip query that collects
transaction_contention_eventsdata, reducing the chances of “memory budget exceeded” or “query execution canceled due to statement timeout” errors.
Bug fixes
- Fixed a bug that, under rare circumstances, could cause draining a node to fail with the error message “some sessions did not respond to cancellation within 1s”.
- Fixed a bug that prevented the
CREATEstatement for a routine from being shown in a statement bundle. This happened when the routine was created on a schema other thanpublic. The bug had existed since v23.1. - Fixed a memory leak that could previously occur when evaluating some memory-intensive queries via the vectorized engine in CockroachDB. The leak had been present since v20.2.
- Fixed a bug that could cause
SHOW TABLESand other introspection operations to encounter a “batch timestamp must be after replica GC threshold” error. - Removed duplicate columns in the Parquet output from changefeeds using CDC queries.
- Fixed a rare bug in which a query might fail with the error “could not find computed column expression for column in table” while dropping a virtual computed column from the table. This bug was introduced in v23.2.4.
- Fixed a bug that would cause an internal error when the result of a
RECORD-returning user-defined function (UDF) was wrapped by another expression (such asCOALESCE) within aVALUESclause. - The Data Distribution report on the Advanced Debug page will no longer crash if there are null values for
raw_sql_configincrdb_internal.zones. - Upgraded the Sarama Kafka client library to pick up a fix for a race condition bug that could occur when Kafka throttling was enabled.
v24.1.13
Release Date: February 19, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.13.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.13.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.13.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.13.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.13.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.13.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.13.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.13.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.13.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.13.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug that could cause
SHOW TABLESand other introspection operations to encounter a"batch timestamp... must be after replica GC threshold"error.
v24.1.12
Release Date: February 6, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.12.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.12.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.12.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.12.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.12.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.12.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.12.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.12.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.12.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.12.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:General changes
- The protected timestamp records of running changefeeds are now updated when the set of targets changes, such as when system tables are added to the protected tables list.
Backward-incompatible changes
- In v24.1.11, a bug was fixed that could cause
SHOW TABLESand other introspection operations to encounter a"batch timestamp... must be after replica GC threshold"error. This fix is not present in v24.1.12, but has been released in v24.1.13.
SQL language changes
- Since v23.2 table statistics histograms have been collected for non-indexed JSON columns. Histograms are no longer collected for these columns if the
sql.stats.non_indexed_json_histograms.enabledcluster setting is set tofalse. This reduces memory usage during table statistics collection, for both automatic and manual collection viaANALYZEandCREATE STATISTICS. - Added support for a new index hint,
AVOID_FULL_SCAN, which will prevent the optimizer from planning a full scan for the specified table if any other plan is possible. The hint can be used in the same way as other existing index hints. For example,SELECT * FROM table_name@{AVOID_FULL_SCAN};. This hint is similar toNO_FULL_SCAN, but will not error if a full scan cannot be avoided. Note that normally a full scan of a partial index would not be considered a “full scan” for the purposes of theNO_FULL_SCANandAVOID_FULL_SCANhints, but if the user has explicitly forced the partial index viaFORCE_INDEX=index_name, CockroachDB does consider it a full scan. - Added the
optimizer_prefer_bounded_cardinalitysession setting, which instructs the optimizer to prefer query plans where every expression has a guaranteed upper-bound on the number of rows it will process. This may help the optimizer produce better query plans in some cases. This setting is disabled by default. - Added the
optimizer_min_row_countsession setting, which sets a lower bound on row count estimates for relational expressions during query planning. A value of zero, which is the default, indicates no lower bound. Note that if this is set to a value greater than zero, a row count of zero can still be estimated for expressions with a cardinality of zero, e.g., for a contradictory filter. Setting this to a value higher than0, such as1, may yield better query plans in some cases, such as when statistics are frequently stale and inaccurate.
Operational changes
- Added new metrics that expose the TTL for various certificates.
- Introduced the metric
sql.schema_changer.object_countthat keeps track of the count of objects in the cluster.
Bug fixes
ALTER BACKUP SCHEDULEno longer fails on schedules with a collection URI that contains a space.- Previously,
SHOW CREATE TABLEwas showing incorrect data with regards to inverted indexes. It now shows the correct data that can be repeatedly entered back into CockroachDB to recreate the same table. - Fixed a bug where querying the
pg_catalog.pg_constrainttable while the schema changer was dropping a constraint could result in a query error. - Fixed a timing issue between
ALTER VIEW.. RENAMEandDROP VIEWthat caused repeated failures in theDROP VIEWjob. - Queries that perform a cast from the string representation of an array containing
GEOMETRYorGEOGRAPHYtypes to a SQL array type will now succeed. security.certificate.*metrics will now be updated if a node loads new certificates while running.- When the session variable
allow_role_memberships_to_change_during_transactionis set, it is now possible to create and drop users quickly even when there are contending transactions on thesystem.usersandsystem.role_optionssystem tables. - Fixed a bug where the error
batch timestamp... must be after replica GC thresholdcould occur during a schema change backfill operation, and cause the schema change job to retry infinitely. Now this error is treated as permanent, and will cause the job to enter thefailedstate. - 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. This has been present since before v19.2. Additionally, in v24.1.0, a bug was introduced that made this leak also apply toSTRING-like values.
v24.1.11
Release Date: January 31, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.11.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.11.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.11.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.11.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.11.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.11.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.11.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.11.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.11.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.11.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug that could cause
SHOW TABLESand other introspection operations to encounter a"batch timestamp... must be after replica GC threshold"error.
v24.1.10
Release Date: January 9, 2025Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.10.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.10.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.10.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.10.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.10.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.10.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.10.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.10.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.10.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.10.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
- The cluster setting
server.jwt_authentication.issuersnow takes the issuer’s configuration value apart from the URI.- This can be set to one of the following values:
- A string that Go can parse as a valid issuer URL, e.g.,
'https://accounts.google.com'. - A string that can be parsed as valid JSON array of issuer URLs, e.g.,
['example.com/adfs','https://accounts.google.com']. - A string that can be parsed as valid JSON and deserialized into a map of issuer URLs to corresponding JWKS URIs. In the third case, CockroachDB will override the JWKS URI present in the issuer’s well-known endpoint, e.g.,
'{ "issuer_jwks_map": { "https://accounts.google.com": "https://www.googleapis.com/oauth2/v3/certs", "example.com/adfs": "https://example.com/adfs/discovery/keys" }}'. Whenissuer_jwks_mapis set, CockroachDB directly uses the JWKS URI to get the key set. In all other cases whereJWKSAutoFetchEnabledis set, it obtains the JWKS URI first from the issuer’s well-known endpoint and then uses this endpoint.
- A string that Go can parse as a valid issuer URL, e.g.,
- This can be set to one of the following values:
General changes
- To improve the granularity of changefeed pipeline metrics, the changefeed metrics
changefeed.admit_latencyandchangefeed.commit_latencyhave histogram buckets from5msto60m(previously500msto5m). The following changefeed metrics have histogram buckets from5msto10m(previously500msto5m):changefeed.parallel_io_queue_nanoschangefeed.parallel_io_result_queue_nanoschangefeed.sink_batch_hist_nanoschangefeed.flush_hist_nanoschangefeed.kafka_throttling_hist_nanos
- Added support for multiple seed brokers in the new Kafka sink.
- Added a new metric (
distsender.rangefeed.catchup_ranges_waiting_client_side) that counts how many rangefeeds are waiting on the client-side limiter to start performing catchup scans. - Added changefeed support for the
mvcc_timestampoption with theavroformat. If both options are specified, the Avro schema includes anmvcc_timestampmetadata field and emits the row’s MVCC timestamp with the row data. - Added a no-op
AWS_USE_PATH_STYLEparameter for forward compatibility with v24.3.
SQL language changes
- Added the
legacy_varchar_typingsession setting, which reverts the changes of that caused the change in typing behavior described in. Specifically, it makes type-checking and overload resolution ignore the newly added “unpreferred” overloads. This setting defaults toon.
Operational changes
- Removed the
sql.auth.resolve_membership_single_scan.enabledcluster setting. This was added out of precaution in case it was necessary to revert back to the old behavior for looking up role memberships, but this escape hatch has never been needed in practice since this was added in v23.1. - Telemetry delivery is now considered successful even in cases where CockroachDB experiences a network timeout. This will prevent throttling in cases outside an operator’s control.
- When a schema change job is completed, rolls back, or encounters a failure, the time taken since the job began is now logged in a structured log in the
SQL_SCHEMAlog channel.
Bug fixes
- Fixed a bug where
ALTER COLUMN SET NOT NULLwas not enforced consistently when the table was created in the same transaction. - Fixed a bug where
CREATE RELATION / TYPEcould leave dangling namespace entries if the schema was concurrently being dropped. - The
idle_in_session_timeoutsetting now excludes the time spent waiting for schema changer jobs to complete, preventing unintended session termination during schema change operations. - Fixed a bug that caused the optimizer to use stale table statistics after altering an
ENUMtype used in the table. - Table statistics collection in CockroachDB could previously run into
no bytes in account to releaseerrors in some edge cases (when the SQL memory budget, configured via--max-sql-memoryflag, was close to being exhausted). The bug had been present since v21.2 and is now fixed. - CockroachDB now better respects the
statement_timeoutlimit on queries involving the top K sort and merge join operations. - Fixed an issue where license enforcement was not consistently disabled for single-node clusters started with
cockroach start-single-node. The fix ensures proper behavior on cluster restarts. - Fixed a bug that caused queries against tables with user-defined types to sometimes fail with errors after restoring those tables.
- Fixed a bug that caused an incorrect filesystem to be logged as part of the store information.
- Fixed a bug that had existed since v24.1 that would cause a set-returning UDF with
OUTparameters to return a single row. - Fixed a bug that could cause an internal error if a table with an implicit (
rowid) primary key was locked from within a subquery, e.g.:SELECT * FROM (SELECT * FROM foo WHERE x = 2) FOR UPDATE;. The error could occur either underREAD COMMITTEDisolation, or withoptimizer_use_lock_op_for_serializableenabled. - Fixed an issue where adding an existing column with the
IF NOT EXISTSoption could exit too early, skipping necessary handling of the abstract syntax tree (AST). This could lead to failure of theALTERstatement. - Fixed an issue where a schema change could incorrectly cause a changefeed to fail with an assertion error like
received boundary timestamp... of type... before reaching existing boundary of type.... - Internal scans are now exempt from the
sql.defaults.disallow_full_table_scans.enabledsetting, allowing index creation even when the cluster setting is active. - Using more than one
DECLAREstatement in the definition of a user-defined function (UDF) now correctly declares additional variables. - Fixed an issue where corrupted table statistics could cause the
cockroachprocess to crash. - Fixed a bug that could cause the password for the
rootuser to be deleted while upgrading to v24.1. This bug only affected clusters that were initially created with v22.2 or earlier. The same bug could also cause thedefaultdbandpostgresdatabases to be recreated during the upgrade to v24.1 if they had been previously deleted. CLOSE CURSORstatements are now allowed in read-only transactions, similar to PostgreSQL. The bug had been present since at least v23.1.
Performance improvements
- Improved the internal caching logic for role membership information. This reduces the latency impact of commands such as
DROP ROLE,CREATE ROLE, andGRANT role TO user, which cause the role membership cache to be invalidated.
v24.1.9
Release Date: December 26, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.9.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.9.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.9.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.9.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.9.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.9.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.9.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.9.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.9.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.9.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
- Added the
legacy_varchar_typingsession setting. When set toon, type-checking comparisons involvingVARCHARcolumns behave as they did in all previous versions. When set tooff, type-checking of these comparisons is more strict and queries that previously succeeded may now error with the messageunsupported comparison operator. These errors can be fixed by adding explicit type casts. Thelegacy_varchar_typingsession setting is on by default.
v24.1.8
Release Date: December 12, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.8.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.8.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.8.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.8.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.8.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.8.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.8.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.8.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.8.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.8.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
- All cluster settings that accept strings are now fully redacted when transmitted as part of our diagnostics telemetry. The transmitted payload includes a record of modified cluster settings and their values when they are not strings. If you previously applied the mitigations in , you can safely set the value of cluster setting
server.redact_sensitive_settings.enabledto false and turn on diagnostic reporting via thediagnostics.reporting.enabledcluster setting without leaking sensitive cluster settings values.
General changes
COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTINGis no longer mentioned in thecockroach democommand.- Added
system.usersto the list of system tables that changefeeds protect with protected timestamps (PTS). This table is required for change data capture queries. - Added changefeed support for the
mvcc_timestampoption with theavroformat. If both options are specified, theavroschema includes anmvcc_timestampmetadata field and emits the row’s MVCC timestamp with the row data.
Operational changes
- To prevent unnecessary queuing in admission control CPU queues, the
goschedstats.always_use_short_sample_period.enabledsetting should be set totruefor any production cluster. - A new cluster setting
ui.database_locality_metadata.enabled, when set totrue, disables loading database and table region information in the DB Console Database and Table pages. This information can cause significant CPU load on large clusters with many ranges. The Database and Table pages in v24.3 onwards do not have this problem. If you require this data, use theSHOW RANGES FROM {DATABASE|TABLE}SQL statement to compute this information on-demand. - The row-level TTL job now will periodically log progress by showing the number of table spans that have been processed so far.
Bug fixes
- Fixed a bug where CockroachDB could encounter an internal error
interface conversion: coldata.Column isin an edge case. The bug was present in v22.2.13+, v23.1.9+, and v23.2+. - Fixed an unhandled error that could occur when using
REVOKE... ON SEQUENCE... FROM useron an object that is not a sequence. - Fixed a bug that caused incorrect
NOT NULLconstraint violation errors onUPSERTandINSERT... ON CONFLICT... DO UPDATEstatements when those statements updated an existing row and a subset of columns that did not include aNOT NULLcolumn of the table. This bug had been present since at least v20.1.0. - Addressed a panic that could occur inside
CREATE TABLE ASif sequence builtin expressions had invalid function overloads. - String constants can now be compared against collated strings.
- Previously, when executing queries with index / lookup joins where ordering needed to be maintained, CockroachDB’s behavior could lead to increased query latency, potentially by several orders of magnitude. This bug was introduced in v22.2, and is now fixed.
- Fixed a bug where
DISCARD ALLstatements were counted under thesql.ddl.countmetric. Now these statements will be counted under thesql.misc.countmetric. - Fixed a bug where
DROP CASCADEwould occasionally panic with anun-dropped backrefmessage on partitioned tables. - Reduced the duration of partitions in the gossip network when a node crashes. This eliminates false positives in the
ranges.unavailablemetric. - As a non-admin user who runs
DROP ROLE IF EXISTSon a user that does not exist, you no longer get an error message. - Fixed a bug that caused quotes around the name of a routine to be dropped when the routine was called within another routine. This could prevent the correct routine name from being resolved if the nested routine name was case-sensitive. The bug has existed since v24.1, when nested routines were introduced.
- Fixed a bug that could cause incorrect query results when the optimizer planned a lookup join on an index containing a column of type
CHAR(N),VARCHAR(N),BIT(N),VARBIT(N), orDECIMAL(M, N), and the query held that column constant to a single value (for example, with an equality filter). - Fixed an unhandled error that would occur if
DROP SCHEMAwas executed on thepublicschema of thesystemdatabase, or on an internal schema, such aspg_catalogorinformation_schema. - Fixed a bug that caused incorrect evaluation of some binary expressions involving
CHAR(N)values and untyped string literals with trailing whitespace characters. For example, the expression'f'::CHAR = 'f 'now correctly evaluates totrue. CREATE SCHEMAnow returns the correct error if a the schema name is missing.
Performance improvements
- Unnecessary block loads of SSTable files are now avoided in some rare cases after a replica rebalance.
v24.1.7
Release Date: November 18, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.7.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.7.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.7.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.7.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.7.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.7.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.7.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.7.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.7.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.7.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
- You can now authenticate to the DB Console by passing a JWT as the bearer token.
General changes
- Changed the license
cockroachis distributed under to the new CockroachDB Software License. - Attempting to install a second Enterprise Trial license on the same cluster will now fail.
- The cluster setting
diagnostics.reporting.enabledis now ignored if the cluster has an Enterprise Trial or Enterprise Free license or if the license cannot be loaded. - The new metrics
changefeed.sink_errorsandchangefeed.internal_retry_message_countallow you to observe the rate of errors and internal retries for a sink, respectively. - Added a timer for inner sink client flushes.
DB Console changes
- Some charts on the Overview and Replication metrics dashboard pages have more terse legends to facilitate easier browsing.
- The DB Console now shows a warning if the cluster is throttled or will be throttled soon due to an expired Enterprise Free or Enterprise Trial license or missing telemetry data. Clusters with an Enterprise license are not throttled.
- The Range Count column on the Databases page is no longer shown due to performance issues. This data is still available via the
SHOW RANGEScommand.
Bug fixes
- Fixed a bug where timers were not correctly registered with the metric system.
- Fixed a bug where the command-line interface would not correctly escape JSON values that had double quotes inside a string when using the
--format=sqlflag. - Fixed an error that could occur if a
SETcommand used an aggregate function as the value. - Added automated clean-up and validation for dropped roles inside of default privileges.
- Fixed a bug that could cause
RESTOREto hang after encountering transient errors from the storage layer. - Fixed a rare bug that could prevent a backup from being restored and could cause the error
rewriting descriptor ids: missing rewrite for <id> in SequenceOwner.... This bug could occur only if aDROP COLUMNoperation dropped a sequence while the backup was running. - Fixed a bug that caused incorrect evaluation of a
CASE,COALESCE, orIFexpression with a branch that produced fixed-width string-like types, such asCHAR. - Fixed a bug that could cause the
BPCHARtype to incorrectly impose a length limit of 1. - Fixed a bug introduced before v23.1 that could cause incorrect results when a join evaluates columns with equivalent but non-identical types, such as
OIDandREGCLASS, for equality. The issue arises when the join performs an index lookup on an index that includes a computed column referencing one of the equivalent columns. - Fixed a bug introduced before v23.1 that could cause a composite sensitive expression to compare differently if comparing equivalent but non-identical input values, such as
2.0::DECIMALand2.00::DECIMAL. The issue arises when the join performs an index lookup on a table with a computed index column where the computed column expression is composite sensitive. - Fixed a bug where a span statistics request on a mixed-version cluster could result in a null pointer exception.
- Updated the
franz-golibrary to fix a potential deadlock when a changefeed restarts. - Fixed a bug where a changefeed could fail to update protected timestamp records after a retryable error.
- Fixed a bug where a changefeed that used change data capture queries could fail after a system table was garbage collected.
- Fixed a rare bug introduced in v22.2 where an update of a primary key column could fail to update the primary index if it is also the only column in a separate column family.
- Fixed a bug where the
proretsetcolumn of thepg_catalog.pg_proctable was incorrectly set tofalsefor builtin functions that return a set. - Fixed a bug that could cause incorrect evaluation of scalar expressions with
NULLvalues. - Fixed a rare bug in the query optimizer that could cause a node to crash if a query contained a filter in the form
col IN (elem0, elem1,..., elemN)whenNis very large, in the order of millions, and whencolexists in a hash-sharded index or when a table with an indexed computed column depends oncol. - Fixed a bug where an
ALTER DEFAULT PRIVILEGES FOR target_role...command could result in an erroneous privilege error when run by a user with theadminrole. - Fixed a bug where a
REASSIGN OWNED BYcommand would fail to transfer ownership of the public schema, even when the schema was owned by the target role. - Fixed a panic when resolving the types of an
AS OF SYSTEM TIMEexpression.
Performance improvements
- Reduced the write-amplification impact of rebalances by splitting snapshot sorted string table (SST) files into smaller ones before ingesting them into Pebble.
- Performance has been improved during periodic polling of table history when
schema_lockedis not used.
v24.1.6
Release Date: October 17, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.6.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.6.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.6.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.6.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.6.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.6.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.6.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.6.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.6.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.6.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Enterprise edition changes
- Updated the cluster setting with all the that support the setting.
- Added two network metrics,
changefeed.network.bytes_inandchangefeed.network.bytes_out. These metrics track the number of bytes sent by individual to the following sinks:- . If , the metric will have a
kafkalabel. - . If child metrics are enabled, the metric will have a
webhooklabel. - . If child metrics are enabled, the metric will have a
pubsublabel. - . If child metrics are enabled, the metric will have a
sqllabel.
- . If , the metric will have a
- Added a
changefeed.total_rangesmetric that can be used to monitor the number of ranges that are watched by aggregators. It shares the same polling interval aschangefeed.lagging_ranges, which is controlled by the existinglagging_ranges_polling_intervaloption. - Disambiguated and logs for the two buffers used by the KV feed. The following metrics now have a suffix indicating which buffer they correspond to:
changefeed.buffer_entries.*,changefeed.buffer_entries_mem.*,changefeed.buffer_pushback_nanos.*. The old versions are kept for backward compatibility, though using the new format is recommended. - Added timers around key parts of the pipeline to help debug feeds experiencing issues. The
changefeed.stage.{stage}.latencymetrics now emit latency histograms for each stage. The metric respects the changefeedscopelabel for debugging specific feeds.
General changes
- Beginning with v24.1.6, CockroachDB v24.1 is in .
Operational changes
- Added a
ranges.decommissioningrepresenting the number of ranges that have a replica on a . - You can now configure the log format for the by setting the
stderr.formatfield in the .
DB Console changes
- The will now show a notification alerting customers without an Enterprise license to upcoming license changes with a link to more information.
Bug fixes
- Fixed a bug in which
SHOW CLUSTER SETTING FOR VIRTUAL CLUSTERwould erroneously returnNULLfor some settings. - Addressed a bug in the pre-condition for repairing descriptor corruption, which could lead to upgrade finalization being stuck.
- Fixed a potential memory leak in using a . The memory leak could occur if both and
changefeed.cloudstorage.async_flush.enabledweretrue, and the changefeed received an error while attempting to write to the cloud storage sink. - Fixed a bug in which some or queries using
NOWAITcould still block on locked rows when using theoptimizer_use_lock_op_for_serializableunder isolation. This bug was introduced with in v23.2.0. - Fixed a bug that caused the to plan unnecessary post-query uniqueness checks during , , and statements on tables with , , . These unnecessary checks added overhead to execution of these statements, and caused the statements to error when executed under isolation.
- Previously, if a connection was attempting a while the same schema objects were being dropped, it was possible for the connection to be incorrectly dropped. This is now fixed.
- Fixed a bug that could result in the inability to garbage collect an range tombstone within a .
- Fixed a bug that could cause errors with the message
internal error: Non-nullable column...when executing statements under isolation that involved tables with virtual columns. - Fixed a bug that could cause incorrect results for queries containing a correlated subquery with a or operator referencing an outer column. This issue would occur if the correlated subquery was in the input of a or operator that had a filter equating the outer-column reference to a non-outer column in the grouping operator’s input, while the grouping column set did not include the replacement column but functionally determined it. This bug was introduced in v23.1.
- The AWS endpoint and cloud custom HTTP client configuration are now considered when is used for cloud storage. Previously, these were only considered when using explicit credentials.
- Fixed a bug where jobs created in sessions with non-zero session timezone offsets could hang before starting or report incorrect creation times when viewed in and the DB Console.
- Fixed a bug that could prevent a from being able to resume after being paused for a prolonged period of time.
- Fixed a bug where backup schedules could advance a protected timestamp too early, which caused incremental backups to fail.
Performance improvements
- The now plans limited, scans in more cases when the new session setting is set to
on.
Contributors
This release includes 85 merged PRs by 39 authors.v24.1.5
Release Date: September 25, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.5.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.5.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.5.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.5.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.5.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.5.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.5.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.5.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.5.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.5.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:General changes
- Upgraded the
grpcversion to v1.56.3.
Enterprise edition changes
- Introduced the new
changefeed.protect_timestamp.lag, which controls when a protected timestamp is updated. The will only be updated if the setchangefeed.protect_timestamp.lagvalue has passed between the last protected timestamp and the . - ,
SHOW CHANGEFEED JOBS, and no longer expose user-sensitive information likeclient_key. - Added two network metrics,
changefeed.network.bytes_inandchangefeed.network.bytes_out. These metrics track the number of bytes sent by individual to the following sinks:- . If are enabled, the metric will have a
kafkalabel. - . If are enabled, the metric will have a
webhooklabel. - . If are enabled, the metric will have a
pubsublabel. - . If are enabled, the metric will have a
sqllabel.
- . If are enabled, the metric will have a
SQL language changes
- The session setting can now be used to force to use query plans that are once, and reused in future executions without re-optimization, as long as it does not become stale due to or a collection of new . The setting takes effect during
EXECUTEcommands. includes aplan typefield. If a generic query plan is optimized for the current execution, theplan typewill begeneric, re-optimized. If a generic query plan is reused for the current execution without performing optimization, theplan typewill begeneric, reused. Otherwise, theplan typewill becustom. - The session setting can now be used to instruct the system to automatically determine whether to use
customorgenericquery plans for the execution of a . Custom query plans are optimized on every execution, while generic plans are once and reused on future executions as-is. Generic query plans are beneficial in cases where query optimization contributes significant overhead to the total cost of executing a query.
Operational changes
- There are now structured that report connection breakage during node shutdown. Previously, the logs existed, but were unstructured. The logs appear in the . There are two new events:
- The
node_shutdown_connection_timeoutevent is logged after the timeout defined by the cluster setting transpires, if there are still open SQL connections. - The
node_shutdown_transaction_timeoutevent is logged after the timeout defined by the cluster setting transpires, if there are still open transactions on those SQL connections.
- The
- Added a new configuration parameter
server.cidr_mapping_url, which maps IPv4 CIDR blocks to arbitrary tag names. - Modified the metrics
sql.bytesinandsql.bytesoutto work as aggregate metrics if are enabled. - Added three new network-tracking metrics.
rpc.connection.connectedis the number of rRPC TCP level connections established to remote nodes.rpc.client.bytes.egressis the number of TCP bytes sent via gRPC on connections CockroachDB initiates.rpc.client.bytes.ingressis the number of TCP bytes received via gRPC on connections CockroachDB initiated. - This commit adds two metrics:
changefeed.network.bytes_inandchangefeed.network.bytes_out. These metrics track the number of bytes sent by the individual to different .
DB Console changes
- The user experience for charges in the now has hover behavior that focuses on individual lines and shows values under the mouse pointer.
- Users with the privilege can download statement bundles from the .
- Users with the privilege can now request, view, and cancel statement bundles in the .
- The will show a notification alerting customers without an Enterprise license to upcoming license changes with a link to more information.
Bug fixes
- Previously, and legacy were incorrectly allowed to be run concurrently, which could lead to failing or hung schema change jobs.
- Fixed a bug that caused errors like
ERROR: column 'crdb_internal_idx_expr' does not existwhen accessing a table with an where the expression evaluates to anENUMtype, for example,CREATE INDEX ON t ((col::an_enum)). - Fixed a bug where
NaNorInfcould not be used as the default value for a parameter in statements. - Fixed a bug in which queries using and a could return incorrect results under isolation. This bug was present when support for
SKIP LOCKEDunderREAD COMMITTEDisolation was introduced in v24.1.0. - Fixed a bug in which some queries using could still block on locked rows when using under isolation. This bug was present when
optimizer_use_lock_op_for_serializablewas introduced in v24.1.0. - Function input parameters for can no longer be of the
VOIDtype, which matches the behavior of PostgreSQL. - Fixed a bug in the public preview of that could prevent a node from starting if it crashed during a failover.
- could fail with:
could not insert session...: unexpected value, if an ambiguous result error was encountered when inserting into thesqllivenesstable. - Internally issued queries that are not initiated within a no longer respect a . This includes: background , queries issued by the that perform introspection, and the .
- Fixed a rare bug in that could cause it to fail with an error like
timed out: value differs between local setting and KV. - Fixed a bug where the did not prevent a table from being referenced by a .
- Fixed a bug where the would aggressively prevent all statements from working.
- Fixed a slow-building memory leak when using .
- Fixed a potential memory leak in using a . The memory leak could occur if both the cluster settings and are set to
trueand the changefeed received an error while attempting to write to the cloud storage sink. - Fixed a bug that prevented buffered file sinks from being included when iterating over all file sinks. This led to problems such as the
debug zipcommand not being able to fetch logs for a cluster where buffering was enabled.
v24.1.4
Release Date: August 29, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.4.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.4.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.4.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.4.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.4.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.4.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.4.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.4.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.4.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.4.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
- URLs in the following SQL statements are now sanitized of any secrets before being written to .
Enterprise edition changes
- Added a new Kafka that uses the
franz-golibrary and CockroachDB’sbatching_sinkimplementation. The new Kafka sink can be enabled with thechangefeed.new_kafka_sink_enabled, which is disabled by default. - The new Kafka sink, enabled with , as well as the Google Cloud Pub/Sub sink, now display notices indicating the topics that a changefeed will emit to.
SQL language changes
- Added a new
sql.auth.grant_option_for_owner.enabledto prevent the from being given to the owner of an object by default. The cluster setting defaults totrue, retaining the existing behavior; when it is set tofalse, theGRANT OPTIONis not implicitly given to an object’s owner. The owner will still have all privileges on an object except the ability to grant privileges to other users.
Command-line changes
- A
--locality-fileflag is now available on the and commands. This allows specifying node (typically aregionvalue) as a file, rather than by using the .
DB Console changes
- The in the DB Console now show a loading state while loading information for databases and tables, including size and range counts.
- On the in the DB Console, table names will no longer appear with quotes around the schema and table name.
Bug fixes
- Fixed a bug introduced in v23.2.0 in which CockroachDB would hit an internal error when evaluating into tables where the source was a clause with a single row and at least one Boolean expression.
- Fixed a bug in which the statement was disallowed when the
default_transaction_read_onlywas set toon. - In the , events now display correctly even when no are included in the
ALTER ROLEstatement. - Fixed a formatting issue with the
sql_sequence_cached_nodevalue of the . This could lead to an error connecting to CockroachDB if this value was set as the default forserial_normalizationvia the cluster setting . - Fixed a bug where that were referenced by could fail with an error.
- Fixed a bug that caused a memory leak when executing SQL statements with , for example,
SELECT /* comment */ 1;. Memory owned by a SQL session would continue to grow as these types of statements were executed. The memory would only be released when closing the . This bug had been present since v23.1. - Fixed a bug where could hang if the lease rangefeed stopped receiving updates.
- Fixed small memory leaks that would occur during creation.
- Fixed a memory leak that could occur when specifying a non-existent name in the connection string.
- Fixed a bug where would not correctly short-circuit if the given index already existed.
- Fixed a bug in syntax validation, in which the
DESCENDINGclause was not allowed for non-terminal columns of an . Only the last column of an inverted index should be prevented from beingDESCENDING. This is now properly checked. - Fixed a bug where an could store a column in the primary index if that column had a mixed-case name.
- Setting or dropping a default value on a is now blocked, even for
NULLdefaults. Previously, setting or dropping a default value on a computed column was a no-op. - Fixed a bug that could cause spurious user permission errors when multiple databases shared a common schema with a routine referencing a table. The bug had existed since v22.2 when were introduced.
- Fixed a bug where would return an error while fetching unstructured/malformed logs.
- Fixed a bug where a hash-sharded could not be created if it referred to columns that had a backslash in the name.
- Fixed a bug in which the output of for various
CREATEstatements was not redacted. This bug had existed since was introduced in v23.1 and affects the following statements:EXPLAIN (OPT, REDACT) CREATE TABLEEXPLAIN (OPT, REDACT) CREATE VIEWEXPLAIN (OPT, REDACT) CREATE FUNCTION
v24.1.3
Release Date: August 1, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.3.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.3.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.3.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.3.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.3.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.3.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.3.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.3.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.3.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.3.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
- statements are now supported when executed via Cloud Console .
- Added the . The default value is
true, which maintains consistency with CockroachDB’s previous behavior: users granted a privilege with can in turn grant that privilege to others. Whensql.auth.grant_option_inheritance.enabledis set tofalse, theGRANT OPTIONis not inherited through role membership, thereby preventing descendant roles from granting the privilege to others. However, the privilege itself continues to be inherited through role membership.
Operational changes
crdb_internal.cluster_execution_insights.txtandcrdb_internal.cluster_txn_execution_insights.txthave been removed from the . These files contained cluster-wide insights for statements and transactions. Users can still rely on the insights incrdb_internal.node_execution_insights.txtandcrdb_internal.node_txn_execution_insights.txt.- For the , TCL
sampled_queryevents will now be sampled at the rate specified by the setting , which is already used to limit the rate of sampling DML statements.
Bug fixes
- Fixed a bug where collection of for very long-running could use excessive space in the
job_infosystem table and cause some interactions with the jobs system to become slow. - Fixed a bug where a change to a could cause queries against tables using that type to fail with an error:
histogram.go:694: span must be fully contained in the bucket. The change to the user-defined type could come directly from an statement, or indirectly from an or statement (which implicitly change the type). This bug has existed since UDTs were introduced in v20.2. - Fixed a bug in which constant patterns containing certain sequences of backslashes did not become constrained scans. This bug has been present since v21.1.13 when support for building constrained scans from
LIKEpatterns containing backslashes was added. - Fixed the statistics estimation code in the so it does not use the empty histograms produced if has been disabled during stats collection due to excessive memory utilization. Now the optimizer will rely on distinct counts instead of the empty histograms and should produce better plans as a result. This bug has existed since CockroachDB v22.1.
- Fixed a bug where statements with could hit undefined column errors on .
- Fixed a bug where CockroachDB would hit an internal error when evaluating into tables where the source is a with a single row and at least one boolean expression. The bug was introduced in v23.2.0.
- Fixed a bug in where the command fails when a custom SQL port is used and the flag is provided.
- Fixed a bug where a that shared a name with a would not be resolved, even if the UDF had higher precedence according to the variable.
- Fixed a bug that caused to incorrectly respect a statement timeout.
- Fixed a bug where could fail if any tables under the given database have .
- Fixed a PostgreSQL incompatibility bug when inputting
publicas user name for such ashas_database_privilegeandhas_schema_privilege. - Fixed a bug when a database with a .
- Fixed a bug where the page crashed if the range information was not available.
- Fixed a bug where CockroachDB could incorrectly evaluate an filter if it was applied to non-
NULLtuples that hadNULLelements, such as(1, NULL)or(NULL, NULL). This bug has existed since v20.2. - The
sql_sequence_cached_nodevalue of the was not correctly formatted. This could lead to errors while connecting to CockroachDB if the default value ofserial_normalizationwas set toserial_normalization. The formatting bug was fixed, which also fixes the errors when connecting.
Performance improvements
- Starting a
cockroachprocess will no longer flush buffered to configured unless the process is running undersystemd, where cockroach runs with theNOTIFY_SOCKETenvironment variable. - that cause a data backfill, such as adding a non-nullable column or changing the primary key, will now split and scatter the temporary indexes used to perform the change. This reduces the chance of causing a that can slow down foreground traffic.
Contributors
This release includes 122 merged PRs by 39 authors.v24.1.2
Release Date: July 2, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.2.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.2.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.2.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.2.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.2.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.2.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.2.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.2.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.2.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.2.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Enterprise edition changes
- Added error messages for unsupported Apache Pulsar sink parameters, e.g.
topic_prefix is not yet supported. - Fixed a bug that was present since v22.2 where with long-running might incorrectly restore checkpoint job progress and drop events during due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
- The
changefeed.shutdown_checkpoint.enabledwas enabled. - The cluster settings
changefeed.frontier_checkpoint_frequencyandlow changefeed.frontier_highwater_lag_checkpoint_thresholdwere set low, which resulted in the initial scan taking many multiples of the configured frequency to complete. - There were multiple target tables with significant differences in row counts in one changefeed.
- The changefeed target tables were large with many ranges.
- The initial scan took a long time to complete (an hour or longer).
- The
Operational changes
- Improved over volumes that dynamically change their size over the life of the
cockroachprocess. - The default values for the following were updated from
100000to7500. These settings control the maximum number of (distinct combinations of statements and ) CockroachDB can store in memory, with stats being flushed on a10mby default. You can increase these settings if your workload produces more unique fingerprints than this amount within the flush interval, and you notice that SQL stats are missing.
DB Console changes
- The favicon now renders properly for , along with other image files.
Bug fixes
- now includes . It had omitted those types ever since composite types were added in v23.1.
- Fixed a crash introduced in v24.1.0-beta.2 that could occur when planning collection on a table with a using a when the
sql.stats.virtual_computed_columns.enabled(introduced in v24.1.0-alpha.1) was set totrue. - Fixed handling in the when columns are included in the
STORING()clause of a statement. CockroachDB now checks if the column is virtual up-front, and properly detects when a column is already handled by an existing when the column name has UTF-8 characters. - Fixed a bug where a change to a could cause queries against tables using that type to fail with an error message like:
"histogram.go:694: span must be fully contained in the bucket". The change to the user-defined type could come directly from an statement, or indirectly from an or statement (which implicitly changes thecrdb_internal_regiontype). This bug had existed since UDTs were introduced in v20.2. - Fixed a bug where had the same ID for different SQL statements.
- Fixed an issue where with a default value of an empty would not succeed.
- will now fail with a well-formed error message and code
42601if a statement tries to add a on an expression. - Fixed a bug where the would be created with the wrong owner. Previously the would own the
publicschema. Now, the database owner is also the owner of thepublicschema. The owner can be altered after the schema is created. - Fixed a bug in v24.1, v23.2, and v23.1 where using the
changefeed.aggregator.flush_jitterwith the option set to0could cause panics. - The log message
"expiration of liveness record... is not greater than expiration of the previous lease... after liveness heartbeat"is no longer generated. - Fixed a bug introduced in v23.2.0 in which CockroachDB would hit an internal error when evaluating into tables where the source was a
VALUESclause with a single row and at least one boolean expression.
Performance improvements
- Improved the efficiency of error handling in the to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts.
- Some checks when scanning the
crdb_internal.system_jobsinternal table now happen once before the scan, instead of once for each row. This improves performance for queries that read fromcrdb_internal.system_jobs.
Miscellaneous
- A optimization to reduce duplicates during aggregator restarts has been disabled due to poor performance.
Contributors
This release includes 78 merged PRs by 35 authors.v24.1.1
Release Date: June 14, 2024Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.1.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.1.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.1.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.1.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.1.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.1.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.1.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.1.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.1.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.1.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Enterprise edition changes
- Fixed a bug introduced in v22.2 where a with a long-running might incorrectly restore checkpoint job progress and drop events during a due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
- The
changefeed.shutdown_checkpoint.enabledwas enabled (in clusters running v23.2 and later). - The cluster settings
changefeed.frontier_checkpoint_frequencyandlow changefeed.frontier_highwater_lag_checkpoint_thresholdwere set low, which resulted in the initial scan taking many multiples of the configured frequency to complete. - There were multiple target tables with significant differences in row counts in one changefeed.
- The changefeed target tables were large with many ranges.
- The initial scan took a long time to complete (an hour or longer).
- The
- History retention jobs created upon completion of no longer erroneously indicate that they failed when they expire.
SQL language changes
- The can now plan constrained scans over partial indexes in more cases, particularly on partial indexes with predicates referencing .
- The storage parameter
ttl_delete_rate_limit, which determines the rate limit for deleting expired rows, is now set to100by default. - CockroachDB no longer limits precision when converting to JSON.
- The
optimizer_push_offset_into_index_joinhas been added. When enabled, the will attempt to push offset expressions into index join expressions to produce more efficient query plans. The setting is enabled by default on v24.1 and later, and disabled on v23.2. - The default value of the
sql.defaults.results_buffer.sizehas been changed from 16KiB to 512KiB. This reduces the chance that clients using transactions will encounter errors that cannot automatically be retried within CockroachDB.
Operational changes
- The default values for the
sql.metrics.max_mem_stmt_fingerprintsandsql.metrics.max_mem_txn_fingerprintshave been changed from100000to5000, thus lowering the default limits for in-memory statement and transaction fingerprints. - The new
sql.pgwire.pipeline.countshows the number of wire protocol commands that have been received by the server, but have not yet begun processing. This metric will only grow if clients are using the “pipeline mode” of the PostgreSQL wire protocol. - The
client_authentication_okandclient_session_endmessages are now logged to theSESSIONSunconditionally. Previously, these would be logged only if theserver.auth_log.sql_sessions.enabledwas set totrue. All otherSESSIONSlog messages are logged only ifserver.auth_log.sql_sessions.enabledorserver.auth_log.sql_connections.enabledare set totrue. To prevent logging ofclient_authentication_okorclient_session_endmessages, you can optionally disable theSESSIONSlog channel.
DB Console changes
- Fixed a bug where the would falsely report high lag for multi-node clusters and on cutover.
- Fixed a bug that caused entries sorted by
% of Runtimeto be sorted incorrectly. - The “Admission Delay Rate”, “Admission Work Rate”, and “Requests Waiting For Flow Tokens” time-series charts have been removed from the DB Console. These charts can be difficult to interpret and provide little value for overload investigations.
- The now includes descriptions for all metrics.
- Metrics on the have been reordered to improve their categorization. The metrics are now roughly in the following order: 1. Metrics to help determine which resource is constrained (IO, CPU); 2. Metrics to narrow down which queues are seeing requests waiting; 3. More advanced metrics about system health (goroutine scheduler, L0 sublevels, etc.).
- New metrics
cr.store.storage.l0-sublevelsandcr.node.go.scheduler_latency-p99.9on the provide better visibility into overloaded resources. - There are now four separate graphs for Admission Queue Delay: 1. Foreground (regular) CPU work; 2. Store (IO) work; 3. Background (elastic) CPU work; 4. Replication Admission Control (store overload on replicas).
Bug fixes
- Fixed a bug that would occur when is followed by
DROP SCHEMA CASCADE...in the same transaction. Previously, theALTER TYPEschema change would get queued up to run at commit time, but by that point, the type may have already been removed, so the commit could fail. - Tables are now automatically repaired when the errors
invalid inbound foreign key... origin table ID should be...orinvalid outbound foreign key... reference table ID should be...occur. - Fixed a bug where a failed could not be retried without manual intervention.
- Fixed a bug introduced in alpha versions of v23.1 where calling a routine could result in an unexpected
function... does not existerror. The bug is triggered when the routine is called twice using the exact same SQL query, and either: (a) the routine has polymorphic arguments, or: (b) between the two calls, the routine is replaced by a routine with the same name and different parameters. - Fixed a rare bug where a lease transfer could lead to a
side-transport update saw closed timestamp regressionpanic. The bug could occur when a node was overloaded and . - Fixed a crash introduced in v24.1.0-beta.2 that could occur when planning statistics collection on a table with a using a when the newly-introduced
sql.stats.virtual_computed_columns.enabledis set totrue. (The setting was introduced in v24.1.0-alpha.1, and defaults totrue.) - Fixed a bug where an statement could hang if the table had any indexes that were referred to by or using the
FORCE INDEXclause. - Fixed a bug introduced in v24.1.0 where the
max_decimal_digitsargument of thest_geojsonwas ignored and the default was used instead. - Scattering a range with a replication factor of 1 now no longer erroneously up-replicates the range to two replicas. Leases will also no longer thrash between nodes when perturbed with a replication factor of 1.
- Fixed a bug where, if the
ttl_row_stats_poll_intervalstorage parameter was non-zero for a table with enabled, the queries issued to update row statistics could block the job from completing. Now, if the job completes, these statistics queries are cancelled. This means that thejobs.row_level_ttl.total_rowsandjobs.row_level_ttl.total_expired_rowsmetrics will report0if the job finishes before the row stats queries complete. - Fixed a bug where a or command could leave references behind inside types, which could prevent subsequent commands from working.
- Fixed a bug where the
results_buffer_sizecould not be configured by using the “options” query parameter in the connection string, but only as a top-level query parameter. Now,results_buffer_sizecan be configured in either part of the connection string. This variable still cannot be changed with the command after the session begins. - Fixed a bug introduced in v20.2 where a change to a could cause queries against tables using that type to fail with an error message like
histogram.go:694: span must be fully contained in the bucket. The change to the user-defined type could come directly from an statement, or indirectly from an or statement (which implicitly change thecrdb_internal_regiontype).
Performance improvements
- Improved the efficiency of error handling in the in order to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts.
- Due to its poor performance, a optimization that aimed to reduce duplicates during aggregator restarts due to its bad performance has been disabled.
Contributors
This release includes 173 merged PRs by 42 authors.v24.1.0
Release Date: May 20, 2024 With the release of CockroachDB v24.1, we’ve added new capabilities to help you migrate, build, and operate more efficiently. Refer to our summary of the most significant user-facing changes under Feature Highlights.Downloads
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Feature highlights
This section summarizes the most significant user-facing changes in v24.1.0 and other features recently made available to CockroachDB users across versions. For a complete list of features and changes in v24.1, including bug fixes and performance improvements, refer to the release notes for previous v24.1 testing releases. You can also search the docs for sections labeled .- Feature categories
- Additional information
In CockroachDB Self-Hosted, all available features are free to use unless their description specifies that an Enterprise license is required. For more information, refer to the .
Performance
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| WAL (Write-Ahead Logging) Failover When a CockroachDB node is configured to run with multiple stores, you can mitigate some effects of disk stalls by configuring the node to to another store’s data directory. This feature is in preview. | 24.1 | |||
| Autocommit DDL In 24.1 we have added the autocommit_before_ddl. When set to true, any schema change statement that is sent during an explicit transaction will cause the transaction to commit before executing the schema change. This setting can be used to improve compatibility with some tools that do not work well due to our limitations with schema changes in explicit transactions. It also can be used to use schema changes under READ COMMITTED more easily, without needing to teach the schema changer about READ COMMITTED. | 24.1 | |||
| Statistics for virtual computed columns CockroachDB now collects statistics for , making it possible to optimize query plans for tables that have these columns. Customers will see better query performance for queries that involve virtual computed columns. For more information, you can also view a video demo. | 24.1 | |||
| Write Amplification Improvements A number of improvements are now on by default, leading to a reduction in . Of particular note, a vast majority of range snapshots previously ingested into L0 are now ingested directly into L6 in the , reducing write and read amplification with positive effects to node stability and SQL performance. | 24.1 | |||
| Increased SLA for multi-region Dedicated clusters CockroachDB Dedicated multi-region clusters now offer a five-nines (99.999%) availability target. | All* | |||
Change Data Capture
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| Improved performance for changefeeds at scale is a subsystem that improves the performance of with scale. In v24.1, Mux rangefeeds are enabled by default. | 24.1 | |||
| Emit changefeed messages to an Azure Event Hub Changefeeds can emit messages to an , which is compatible with Apache Kafka. You can use the Kafka changefeed and sink configuration options. | 24.1 | |||
| Google Cloud Pub/Sub sink for changefeeds is now generally available The changefeed is GA. | 24.1 | |||
| Filter changefeed messages based on cluster, SQL session, or row-level TTL jobs Use the disable_changefeed_replication session variable to prevent changefeeds from emitting messages for any changes during that session. Also in v24.1, you can enable the ignore_disable_changefeed_replication option to ignore the storage parameter or cluster setting that disables changefeed replication. These can be useful to manage multiple changefeed use cases on the same table. | 24.1 | |||
| Set Kafka quotas per changefeed For , implement a resource usage limit per changefeed by setting a client ID and quota in your Kafka server’s configuration. | 24.1 | |||
Recovery
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| Physical Cluster Replication is now generally available is an asynchonous replication feature that allows your cluster to recover from full-cluster failure with a low RPO and RTO. In 24.1, it is a GA feature, requiring an Enterprise license, and only available for self-hosted CockroachDB deployments. For more information, refer to the and a blog post about Physical Cluster Replication. | 24.1 | |||
Security
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| Private connectivity in CockroachDB Dedicated with Google Cloud Private Service Connect using Private Service Connect is now available in preview for CockroachDB Dedicated clusters on GCP. For more information, refer to and a video about how to set it up. | All* | |||
| Support for matching against SUBJECT When using certificate based authentication, CockroachDB now supports mapping of SQL user roles to used for TLS authentication. Subject mapping is useful if: - You run your own Certificate Authority (CA) infrastructure. - You need to use your existing CA infrastructure to manage SQL user authentication. - You need to use the same CA for multiple CockroachDB clusters. | 24.1 | |||
Migrations
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| is GA. MOLT Fetch automatically imports data from a PostgreSQL, MySQL, or CockroachDB source to a target CockroachDB database. If the fetch process encounters an error, data import can be continued from the point where it was interrupted. MOLT Fetch can be configured to replicate ongoing changes on the source database to CockroachDB following the initial data load. | All* | |||
SQL
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| Stored Procedures and UDF Improvements Support for PL/pgSQL, user-defined functions, and stored procedures is now expanded: - parameters can be specified. - PL/pgSQL can be used together with conditions. - UDFs can . - Stored procedures can using a . - is possible using COMMIT, ROLLBACK, and SET TRANSACTION statements. For more information, you can also view a video demo. | 24.1 | |||
| Read Committed Isolation in GA Read Committed isolation is now GA. Under READ COMMITTED isolation, DDL operations can be auto-committed, and RETRY_SERIALIZABLE errors are absent. This offers a simpler migration path for applications and removes the need for client-side retry handling, which is necessary under SERIALIZABLE isolation.For more information, you can also view a video about using Read Committed isolation and the blog post Isolation levels without the anomaly table. | 24.1 | |||
| SELECT FOR SHARE updates A shared lock that is acquired explicitly using or implicitly by a read-committed transaction, can now be re-acquired with higher strength by either using a SELECT FOR UPDATE statement or by writing to the key. | 24.1 | |||
| SHOW DEFAULT SESSION VARIABLES FOR ROLE Previously, a database administrator could discover which session variables were set for a role only by switching into to that user or querying a system table. The new command shows the database administrator the default values for session variables applied to a given user. | 24.1 | |||
Operations
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| New Regions for CockroachDB Dedicated Cockroach Cloud is now available in additional Azure regions. This expansion enhances our global reach and offers more options for deploying resilient, distributed databases with low latency and high availability. With these , you can now select a geographical location that best fits your needs, reducing data latency and ensuring compliance with regional data residency regulations. Deploying in a region close to your service or customers means improved performance and a better user experience. | All* | |||
| Organize Cloud clusters using Folders help users organize and manage access for Clusters by projects, teams or business units. This feature is now in public preview and available to all Cloud organizations. For additional details, refer to the | All* | |||
| CockroachDB Cloud Terraform provider IAM enhancements The CockroachDB Cloud Terraform provider has new resources for User Role Grant and Service Accounts, and a new data source for Folders. These new features improve customers’ ability to manage secure access to data, API, and infrastructure on CockroachDB Cloud. | All* | |||
Observability
| Feature | Availability | |||
|---|---|---|---|---|
| Ver. | Self-Hosted | Dedicated | Serverless | |
| CockroachDB Dedicated supports a Prometheus-compatibile metric scrape endpoint. The for CockroachDB Dedicated is generally available. | All* | |||
| Export CockroachDB Dedicated metrics to Azure Monitor CockroachDB Dedicated supports in limited access. Contact your Cockroach Labs account team for access. | All* | |||
| Export CockroachDB Dedicated logs to Azure Monitor CockroachDB Dedicated supports in limited access. Contact your Cockroach Labs account team for access. | All* | |||
| Feature detail key | |
|---|---|
| * | Features marked “All*” were recently made available in the CockroachDB Cloud platform. They are available for all supported versions of CockroachDB, under the deployment methods specified in their row under Availability. |
| ** | Features marked “All**” were recently made available via migration tools maintained outside of the CockroachDB binary. They are available to use with all supported versions of CockroachDB, under the deployment methods specified in their row under Availability. |
| Feature is available for this deployment method of CockroachDB as specified in the icon’s column: CockroachDB Self-Hosted, CockroachDB Dedicated, or CockroachDB Serverless. | |
| Feature is not available for this deployment method of CockroachDB as specified in the icon’s column: CockroachDB Self-Hosted, CockroachDB Dedicated, or CockroachDB Serverless. | |
Backward-incompatible changes
Before , be sure to review the following backward-incompatible changes, as well as key cluster setting changes, and adjust your deployment as necessary.- queries can no longer use a timestamp followed by a question mark to signify a future-time value. This was an undocumented syntax.
- The isolation level now requires the cluster to have a valid enterprise license. Otherwise, transactions which are configured to run as
READ COMMITTEDwill be upgraded to , as described in the next note. - The
sql.txn.read_committed_isolation.enabledis nowtrueby default. As a result for enterprise users, transactions are not automatically upgraded to , and will run asREAD COMMITTEDby default. On v23.2, refer to the graph in the DB Console to check whether any transaction is being upgraded from a weaker isolation level toSERIALIZABLE, and could therefore run differently on v24.1.
Features that require upgrade finalization
During a major-version upgrade, certain features and performance improvements may not be available until the upgrade is finalized.- Splits no longer hold latches for time proportional to the range size while computing MVCC statistics. Instead, MVCC statistics are pre-computed before the critical section of the split. As a side effect, the resulting statistics are no longer 100% accurate because they may correctly distribute writes concurrent with the split. To mitigate against this potential inaccuracy, and to prevent the statistics from drifting after successive splits, the existing stored statistics are re-computed and corrected if needed during the non-critical section of the split.
Key Cluster Setting Changes
The following changes should be reviewed prior to upgrading. Default cluster settings will be used unless you have manually set a value for a setting. This can be confirmed by checking thesystem.settings table (select * from system.settings) to view the non-default settings.
sql.txn.read_committed_isolation.enabledis nowtrueby default. When set totrue, transactions use theREAD COMMITTEDisolation level if specified byBEGIN/SETcommands.- If the cluster setting is
false, as was the default in v23.2, suchREAD COMMITTEDtransactions will instead run asSERIALIZABLE. - To check whether any transactions are being upgraded to
SERIALIZABLE, see the graph in the DB Console.”
- If the cluster setting is
- The
changefeed.balance_range_distribution.enabledis now deprecated. Instead, use the new cluster settingchangefeed.default_range_distribution_strategy.changefeed.default_range_distribution_strategy='balanced_simple'has the same effect as settingchangefeed.balance_range_distribution.enabled=true. It does not requireinitial_scan='only', which was required by the old setting. - Added the
security.client_cert.subject_required.enabledwhich enforces a mandatory requirement for the client certificate’s role subject to be set. The subject can be defined through either the subject role option or by specifying theroot-cert-distinguished-nameandnode-cert-distinguished-nameproperties. This setting applies to both RPC access and login via authCert. - The
sql.contention.record_serialization_conflicts.enabledis nowonby default. As a result, any that contains conflicting transaction information will be recorded by the contention registry, improving the ability to troubleshoot. For more information, refer to the documentation. - The new
storage.sstable.compression_algorithmconfigures the compression algorithm used when compressing sstable blocks. Supported values are: “snappy” and “zstd” [snappy =1, zstd =2]. Changing the default of snappy to zstd can result in substantial performance improvement, however, the effects this change may be highly dependent on the workload and data, so experimentation is recommended before enabling zstd in production environments. - The new setting
storage.wal_failover.unhealthy_op_thresholdallows you to set the latency threshold at which a WAL (Write-Ahead Logging) write is considered unhealthy. When exceeded, the node will attempt to write WAL entries to a secondary store’s volume. For more information, refer to - The new
server.max_open_transactions_per_gateway, when set to a non-negative value, allows only admin users to execute a query if the number of open transactions on the current gateway node is already at the configured limit. - The new
server.redact_sensitive_settings.enabled(falseby default), when set totrue, redacts the values of the following settings in the output ofSHOWcommands or other introspection interfaces. In the future, newly-added sensitive cluster settings will be redacted as well. Users with theMODIFYCLUSTERSETTINGcan always view the unredacted settings. - The new boolean changefeed option , when set to
true, prevents the changefeed from filtering events even if CDC filtering is configured via thedisable_changefeed_replication,sql.ttl.changefeed_replication.disabled, or thettl_disable_changefeed_replication. - The provisioned-rate field, if specified, should no longer accept a disk-name or an optional bandwidth field. To use the disk bandwidth constraint the store-spec must contain
provisioned-rate=bandwidth=<bandwidth-bytes/s>, otherwise the cluster settingkvadmission.store.provisioned_bandwidthwill be used. When set to a non-zero value, this is used as the provisioned bandwidth (in bytes/s), for each store. It can be overridden on a per-store basis using the —store flag. Note that setting the provisioned bandwidth to a positive value may enable disk bandwidth based admission control, sinceadmission.disk_bandwidth_tokens.elastic.enableddefaults totrue. - Removed in v24.1:
sql.show_ranges_deprecated_behavior.enabledsql.trace.session_eventlog.enabledchangefeed.balance_range_distribution.enabled
Deprecations
changefeed.balance_range_distribution.enableis now deprecated. Instead, use the newchangefeed.default_range_distribution_strategy.changefeed.default_range_distribution_strategy='balanced_simple'has the same effect as settingchangefeed.balance_range_distribution.enable=true. It does not requireinitial_scan='only', which was required by the old setting.- The
cockroach connectcommand has been removed. This command was in CockroachDB v23.2.
Known limitations
For information about new and unresolved limitations in CockroachDB v24.1, with suggested workarounds where applicable, refer to .Additional resources
| Resource | Topic | Description |
|---|---|---|
| Cockroach University | Introduction to Distributed SQL and CockroachDB | This course introduces the core concepts behind distributed SQL databases and describes how CockroachDB fits into this landscape. You will learn what differentiates CockroachDB from both legacy SQL and NoSQL databases and how CockroachDB ensures consistent transactions without sacrificing scale and resiliency. You’ll learn about CockroachDB’s seamless horizontal scalability, distributed transactions with strict ACID guarantees, and high availability and resilience. |
| Cockroach University | Practical First Steps with CockroachDB | This course will give you the tools you need to get started with CockroachDB. During the course, you will learn how to spin up a cluster, use the Admin UI to monitor cluster activity, and use SQL shell to solve a set of hands-on exercises. |
| Cockroach University | Enterprise Application Development with CockroachDB | This course is the first in a series designed to equip you with best practices for mastering application-level (client-side) transaction management in CockroachDB. We’ll dive deep on common differences between CockroachDB and legacy SQL databases and help you sidestep challenges you might encounter when migrating to CockroachDB from Oracle, PostgreSQL, and MySQL. |
| Cockroach University | Building a Highly Resilient Multi-region Database using CockroachDB | This course is part of a series introducing solutions to running low-latency, highly resilient applications for data-intensive workloads on CockroachDB. In this course we focus on surviving large-scale infrastructure failures like losing an entire cloud region without losing data during recovery. We’ll show you how to use CockroachDB survival goals in a multi-region cluster to implement a highly resilient database that survives node or network failures across multiple regions with zero data loss. |
| Docs | This page summarizes the steps of migrating a database to CockroachDB, which include testing and updating your schema to work with CockroachDB, moving your data into CockroachDB, and testing and updating your application. | |
| Docs | This page provides a starting point for understanding the architecture and design choices that enable CockroachDB’s scalability and consistency capabilities. | |
| Docs | The page summarizes the standard SQL features CockroachDB supports as well as common extensions to the standard. | |
| Docs | This page summarizes CockroachDB’s data streaming capabilities. Change data capture (CDC) provides efficient, distributed, row-level changefeeds into a configurable sink for downstream processing such as reporting, caching, or full-text indexing. | |
| Docs | This page describes the backup job workflow with a high-level overview, diagrams, and more details on each phase of the job. |
v24.1.0-rc.2
Release Date: May 16, 2024Downloads
CockroachDB v24.1.0-rc.2 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-rc.2.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.2.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-rc.2.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.2.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-rc.2.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.2.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-rc.2.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.2.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-rc.2.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-rc.2.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Bug fixes
- Fixed a bug that was present since v22.2 where with long-running might incorrectly restore checkpoint job progress and drop events during due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
- The
changefeed.shutdown_checkpoint.enabledwas enabled (in clusters running v23.2 and later). - The cluster settings
changefeed.frontier_checkpoint_frequencyandlow changefeed.frontier_highwater_lag_checkpoint_thresholdwere set low, which resulted in the initial scan taking many multiples of the configured frequency to complete. - There were multiple target tables with significant differences in row counts in one changefeed.
- The changefeed target tables were large with many ranges.
- The initial scan took a long time to complete (an hour or longer).
- The
- Fixed a crash introduced in v24.1.0-beta.2 that could occur when planning on a table with a using a user-defined type and the
sql.stats.virtual_computed_columns.enabledis set totrue.sql.stats.virtual_computed_columns.enabledwas introduced in v24.1.0-alpha.1 astrueby default and introduced in v23.2.5 asfalseby default.
Contributors
This release includes 3 merged PRs by 3 authors.v24.1.0-rc.1
Release Date: May 8, 2024Downloads
CockroachDB v24.1.0-rc.1 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-rc.1.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.1.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-rc.1.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.1.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-rc.1.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.1.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-rc.1.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-rc.1.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-rc.1.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-rc.1.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
- Added a new
optimizer_use_improved_multi_column_selectivity_estimate, which if enabled, causes the to use an improved selectivity estimate for multi-column predicates. This setting will default totrueon v24.2 and later, andfalseon earlier versions.
Operational changes
- Added two new :
range.snapshots.upreplication.rcvd-bytescounts the number of recovery snapshot bytes received, andrange.snapshots.upreplication.sent-bytescounts the number of Raft recovery snapshot bytes sent. Also updatedrange.snapshots.recovery.rcvd-bytesandrange.snapshots.recovery.sent-bytesto only include Raft snapshots. A new line was added to the graph.
DB Console changes
- Added a Replication Lag graph to the dashboard to measure replication lag between primary and standby clusters using .
Bug fixes
- Fixed a bug that caused the and pages in the DB Console to display an incorrect value for Table Stats Last Updated.
- Fixed a bug in the DB Console’s tool where store-level metrics were displayed only for the first store ID associated with the node. Now data is displayed for all stores present on a node, and a single time series is shown for each store, rather than an aggregated value for all of the node’s stores. This allows finer-grained monitoring of store-level metrics.
- Fixed a bug introduced in v22.2 that could cause the internal error
attempting to append refresh spans after the tracked timestamp has moved forwardin some edge cases. - Fixed a bug where a
TYPEDESC SCHEMA CHANGEjob could retry forever if the descriptor it targeted was already dropped. - Fixed a bug where, if the legacy schema changer was enabled, the command would incorrectly require the user to have the
CREATEon the parent database rather than only on the parent schema. - Fixed a bug where a would fail if it reported an out-of-bound progress fraction. The error is now logged and no longer causes the job to fail.
Performance improvements
- Added a new
optimizer_use_improved_zigzag_join_costing. When enabled and when theenable_zigzag_joinis also enabled, the cost of zigzag joins is updated such that a zigzag join will be chosen over a scan only if it produces fewer rows than a scan. - Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the from choosing a bad query plan due to over-estimating the selectivity of a multi-column predicate.
- Improved the efficiency of error handling in the , to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts.
- Disabled a poorly-performing optimization that was intended to reduce duplicates during aggregator restarts.
Contributors
This release includes 57 merged PRs by 24 authors.v24.1.0-beta.3
Release Date: April 30, 2024Downloads
CockroachDB v24.1.0-beta.3 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
Full CockroachDB executable
SQL-only command-line client executable
- Windows (Experimental)
CockroachDB executable for Windows is experimental and not suitable for production deployments. Windows 8 or higher is required.
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
- Updated the responses to display the
object_typeandobject_name, which has replaced therelation_namecolumn. - Added granted privileges to the command.
- Introduced three new for controlling table statistics forecasting:
- is the minimum number of observed statistics required to produce a forecast.
- is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
- is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation.
Bug fixes
- Fixed a bug that could lead to descriptors having privileges to roles that no longer exist. Added an automated clean up for inside descriptors.
- Fixed a bug where combined with (
server.identity_map.configuration) did not work since v23.1. For the feature to work correctly, the client must specify a valid db user in the . - Fixed a bug where the could drop a clause when there was an clause, and the ordering was partially provided by an input operator. For example, this bug could occur with an ordering such as
ORDER BY a, bwhen the scanned index was only ordered on columna. The impact of this bug was that more rows may have been returned than specified by theLIMITclause. This bug is only present when not using the . That is, when running withSET vectorize = off;. This bug has existed since CockroachDB v22.1. - Previously, CockroachDB could run into an internal error when evaluating routines with nested blocks. The bug is only present in 24.1.0-beta versions. This bug is now fixed.
- Fixed a bug where and queries with a subquery were sometimes inappropriately using implicit locking within the subquery. This bug has existed since implicit
FOR UPDATElocking was introduced in v20.1. - and a column with the same name no longer results in a
"column already exists error". - Fixed a bug that could cause an internal error of the form
invalid datum type given:..., expected...when aRECORD-returning , used as a data source, was supplied a column definition list with mismatched types. This bug has existed since v23.1. - Fixed a bug that could result in an internal error when attempting to create a routine using the (unsupported)
%ROWTYPEsyntax for a variable declaration. Now, an expected syntax error is returned instead. - Fixed a bug that could result in an assertion error during evaluation of routines that invoke procedures while using
DEFAULTarguments. The bug was present in v24.1.0-beta releases and is now fixed. - Previously, privileges granted for were displaying in
SHOW SYSTEM GRANTSwith no associated object name. Now these privileges are no longer displayed. Instead, the statementSHOW GRANTS ON EXTERNAL CONNECTIONshould be used to view external connection privileges with their associated object name. - Statistics forecasts of zero rows can cause suboptimal . Forecasting will now avoid predicting zero rows for most downward-trending statistics.
- Fixed a bug introduced in v23.2 that could cause a variable assignment to not be executed if the variable was never referenced after the assignment.
Performance improvements
- More efficient are now generated for queries with text similarity filters, for example,
text_col % 'foobar'. These plans are generated if theoptimizer_use_trigram_similarity_optimizationis enabled. It is disabled by default. - The now costs
distinct-onoperators more accurately. It may produce more efficient query plans in some cases. - Improved the speed for optimization of some statements using
GROUP BYorDISTINCTorON CONFLICTby skipping the ruleSplitGroupByScanIntoUnionScanswhen it is not needed.
Contributors
This release includes 56 merged PRs by 25 authors.v24.1.0-beta.2
Release Date: April 24, 2024Downloads
CockroachDB v24.1.0-beta.2 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-beta.2.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.2.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-beta.2.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.2.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-beta.2.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.2.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-beta.2.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.2.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-beta.2.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-beta.2.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
- Added the
security.client_cert.subject_required.enabledthat enforces a mandatory requirement for the client certificate’s role subject to be set. The subject can be defined through either the subject role option or by specifying theroot-cert-distinguished-nameandnode-cert-distinguished-nameproperties. This setting applies to both RPC access and login via authCert.
Bug fixes
- Fixed a bug where table statistics were sometimes not collected on tables that have virtual of a user-defined type when the
sql.stats.virtual_computed_columns.enabledcluster setting is enabled. The setting was introduced in v23.2.4 and is disabled by default. Only clusters running v23.2.4 with the non-default setting are affected.
Contributors
This release includes 52 merged PRs by 28 authors.v24.1.0-beta.1
Release Date: April 17, 2024Downloads
CockroachDB v24.1.0-beta.1 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-beta.1.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.1.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-beta.1.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.1.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-beta.1.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.1.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-beta.1.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-beta.1.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-beta.1.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-beta.1.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:SQL language changes
- no longer displays some internal retry counter columns (
last_run,next_run,num_runs) and now only shows thestatement,trace_id, andexecution_errorscolumns when inspecting a specific job ID or IDs. - now shortens long job descriptions to 100 characters to make the table easier to read while the full description and statement can be inspected using
SHOW JOBorSHOW JOBSon specific job IDs. - Extended to include dependencies between UDFs.
- With set to
true, statements now return an error if they do not contain either aWHEREclause or aLIMITclause. Also,UPDATEandDELETEstatements withoutWHEREclauses but withLIMITclauses now bypasssql_safe_updates, which better matches MySQL behavior. - Added support for
CALLstatements. It is now possible to call a stored procedure from a PL/pgSQL routine. DEFAULTexpressions for input parameters of and stored procedures are now supported.
Command-line changes
- The flag now accepts the special value
path=*to apply the specified keys to all stores.
DB Console changes
- The Commit Latency chart in the now aggregates by max instead of by sum for multi-node . This more accurately reflects the amount of time for events to be acknowledged by the downstream sink.
- Introduced a license expiration message in the in the top-right corner of the primary header. This message indicates the remaining days before license expiration for clusters with an Enterprise or trial license.
- The page no longer includes two columns related to a deprecated internal implementation detail (last execution time and execution count).
- The timeseries graphs shown on the statement details page in the DB Console will now render properly, after fixing a bug related to setting the time range of the charts.
- in the DB Console will now function properly for indexes on tables or columns whose names contain quotation marks or whitespace. For example:
CREATE INDEX ON "my table" ("my col");.
Bug fixes
- Sequence options for
NO MINVALUEandNO MAXVALUEnow match PostgreSQL behavior. SequenceMINVALUEandMAXVALUEautomatically adjust to new types bounds mirroring behavior of PostgreSQL. - CockroachDB could previously “leak” reported memory usage as accounted by the internal memory accounting system, the limit for which is configured with the
--max-sql-memoryflag, on long-running sessions that issue many (hundreds of thousands or more) transactions. This, in turn, could result in"root: memory budget exceeded"errors for other queries. This bug was present in versions v23.1.17 and v23.2.3 and is now fixed. - CockroachDB could previously incorrectly evaluate
INexpressions that hadINT2orINT4type on the left side and values outside of the range of the left side on the right side. The bug has been present since at least v21.1 and is now fixed. - Fixed a slow memory leak in the deprecated , which can accumulate when restarting or canceling many deprecated Pub/Sub changefeeds. The bug had been present since the deprecated Pub/Sub changefeed was introduced in a testing release of v22.1.
Contributors
This release includes 134 merged PRs by 36 authors.v24.1.0-alpha.5
Release Date: April 1, 2024Downloads
CockroachDB v24.1.0-alpha.5 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-alpha.5.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.5.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.5.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.5.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-alpha.5.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.5.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.5.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.5.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-alpha.5.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-alpha.5.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Enterprise edition changes
- now default to evenly distributing their work across all replicas, including followers, regardless of leaseholder placement. On upgrade to v24.1, running changefeed jobs will be restarted automatically as part of the upgrade process and will default to distributing work across replicas. To disable this behavior, set the
changefeed.random_replica_selection.enabledtofalse. If disabled, changefeed planning reverts to its previous behavior for distributing work. - When is enabled, the output of the
SHOW VIRTUAL CLUSTER... WITH REPLICATION STATUScommand now displays replication lag. - When is enabled, the output of the
SHOW VIRTUAL CLUSTER WITH REPLICATION STATUS to 1command has changed:- The output no longer displays
replication_job_idorservice_modereturn fields. - The
data_statefield has been renamed tostatus. - The fields that are displayed are now ordered as follows:
retained_time,replicated_time,replication_lag,cutover_time,status.
- The output no longer displays
- You can now run from an , without enabled, to a standby cluster with cluster virtualization enabled.
SQL language changes
-
You can now specify a condition for the
EXITandCONTINUE. - A can now invoke another stored procedure using a .
-
You can now use a statement within a to configure the transaction isolation level, timestamp, or priority, or to set the transaction to read-only. A
SET TRANSACTIONstatement must immediately follow aCOMMITorROLLBACK, with no other statements or block boundaries between them. -
The new
optimizer_use_virtual_computed_column_stats, when enabled, configures the to use on virtual computed columns. -
An can now drop the
IDENTITYconstraint and related sequence using the following SQL statement:IF EXISTSis optional, and skips the command if the column is not an identity column. - A shared lock that is acquired explicitly using or implicitly by a , can now be re-acquired with higher strength by either using a statement or by writing to the key.
-
now support
OUTandINOUTparameter classes. -
The
EXITandCONTINUEstatements can now use labels to specify which loop or block is the target.
Operational changes
- You can now enable asynchronous buffering of
file-groupusing thebufferingeither by default or to an individualfile-group. Thebufferingconfiguration option is incompatible with thebuffered-writesconfiguration option. To try thebufferingoption, you must setbuffered-writes: false. Cockroach Labs recommends settingmax-stalenessto1sandflush-trigger-sizeto256KiB. - A minimum concurrency is now enforced per store so that nodes with many stores do not spread workers too thin. This helps to avoid high scheduler latency across replicas on a store when load is imbalanced.
- The new
kv.split.estimated_statsandkv.split.total_bytes_estimatestrack the number of splits that produce statistic estimates and the total bytes of estimates produced. - The new
storage.sstable.compression_algorithmconfigures the compression algorithm used when compressing sstable blocks. - The new
kv.dist_sender.proxy.enabled, which is enabled by default, causes proxy requests to be routed through a follower replica when the leaseholder is unavailable. - The new startup flag
--wal-failoverallows you to explicitly set the path for WAL failover of a single-store node. - Cluster virtualization is now enabled using either of the new startup flags
--virtualizedor--virtualized-emptyinstead of the--config-profileflag. - The following metrics, which track the SQL statistics subsystem’s task to flush in-memory statistics to persisted storage, are now more consistent with other metrics used in the subsystem.
sql.stats.flushes.successful: Number of times SQL statistics have been flushed successfully to persistent storage.sql.stats.flushes.failed: Number of attempted SQL statistics flushes that failed with errors.sql.stats.flush.latency: The latency of attempted SQL statistics flushes to persistent storage, including both successes and failures.
- The following new track the number and outcome of proxy requests when
kv.dist_sender.proxy.enabledis set totrue:-
distsender.rpc.proxy.sent -
distsender.rpc.proxy.err -
distsender.rpc.proxy.forward.sent -
distsender.rpc.proxy.forward.errCockroach Labs recommends monitoring and alerting ondistsender.rpc.proxy.sent, because it indicates a possible network partition.
-
- The
provisioned-ratefield of a node’s store specification can no longer be used to add constraints for the disk name or bandwidth. By default, bandwidth is constrained according to thekv.store.admission.provisioned_bandwidth. To override this setting for a specific node, the storage specification must containprovisioned-rate=bandwidth={bandwidth-bytes/s}. - Removal of the
kv.rangefeed.scheduler.enabled, which was announced in , has been reverted, and the cluster setting is reinstated.
DB Console changes
- In generated statement fingerprints in the DB Console , lists with only literals or placeholders or similar subexpressions are shortened to their first item followed by ” more ”.
Bug fixes
- Fixed a bug introduced in v23.2 that could cause a routine to return incorrect results when the routine included:
- At least one parameter.
- An
IFstatement with one leak-proof branch and one branch with side effects.
- Fixed a rare bug where a
BACKUPcommand issued shortly after an could exclude data from an unrelated table from the backup. - Fixed a behavior where a memory exhaustion error during a schema change was treated as a permanent failure and reverted. Such schema changes are now retried instead of reverted.
- Fixed a bug where the
attnamefor a dropped column was not correctly padded with 8.characters to be compatible with PostgreSQL.
Performance improvements
- Splits no longer hold latches for time proportional to the range size while computing MVCC statistics. Instead, MVCC statistics are pre-computed before the critical section of the split. As a side effect, the resulting statistics are no longer 100% accurate because they may correctly distribute writes concurrent with the split. To mitigate against this potential inaccuracy, and to prevent the statistics from drifting after successive splits, the existing stored statistics are re-computed and corrected if needed during the non-critical section of the split.
- The now generates more efficient query plans for some queries with
OFFSETclauses.
Contributors
This release includes 157 merged PRs by 44 authors. We would like to thank the following contributors from the CockroachDB community:- Andrew Delph
v24.1.0-alpha.4
Release Date: March 25, 2024Downloads
CockroachDB v24.1.0-alpha.4 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-alpha.4.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.4.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.4.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.4.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-alpha.4.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.4.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.4.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.4.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-alpha.4.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-alpha.4.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
- When ,
file-permissionsare now applied literally, such thatfile-permissions: 644will result in files with permissions matching644(instead of the previous behavior’s640). Previously, CockroachDB’sumask(which is always at least007) was being applied after thefile-permissionsfield was used to create files, meaning the resulting permissions did not match those specified in the log configuration.
General changes
- The following were added for observability of per-store disk events:
-
storage.disk.read.count -
storage.disk.read.bytes -
storage.disk.read.time -
storage.disk.write.count -
storage.disk.write.bytes -
storage.disk.write.time -
storage.disk.io.time -
storage.disk.weightedio.time -
storage.disk.iopsinprogressThe metrics match the definitions of thesys.host.disk.*system metrics.
-
Enterprise edition changes
server.controller.default_target_clustercan now be set to any virtual cluster name by default, including a virtual cluster yet to be created or have service started.- The isolation level now requires the cluster to have a valid enterprise license.
- The new boolean changefeed option , when set to
true, prevents the changefeed from filtering events even if CDC filtering is configured via thedisable_changefeed_replication,sql.ttl.changefeed_replication.disabled, or thettl_disable_changefeed_replication.
SQL language changes
- Added support for the
COMMITandROLLBACKstatements. - now support enhanced sequence management through the and commands. This update facilitates the fine-tuning of identity column sequences.
- It is now possible to use the
STRICToption with and in order to enforce that a SQL statement within a routine returns exactly one row. - Added a
plpgsql_use_strict_into, which causes PL/pgSQL and to require exactly one row from the SQL statement, similar to Oracle behavior. - Added a new
failure_count INT NOT NULLcolumn tocrdb_internal.node_statement_statistics. It represents the number of recorded statement execution failures for the given statement, as a new component of the overall statistics. - The
FORCE_INVERTED_INDEXhint causes the to prefer a query plan scan over any inverted index of the hinted table. An error is emitted if no such query plan can be generated. - The
REPAIRCLUSTERMETADATAprivilege has been aliased toREPAIRCLUSTER. Both names can be used interchangeably.
Operational changes
- The new option environment variable will configure a multi-store CockroachDB node to fail over a store’s write-ahead log (WAL) to another store’s data directory. Failing over the write-ahead log may allow some operations against a store to continue completing, even if the underlying storage is temporarily unavailable. This feature is in .
- The new
storage.wal_failover.unhealthy_op_thresholdallows configuring the latency threshold at which a WAL write is considered unhealthy. - Two new metrics track the status of the SQL Activity Update job, which pre-aggregates top K information within the SQL statistics subsytem and writes the results to
system.statement_activityandsystem.transaction_activity:sql.stats.activity.updates.successful: Number of successful updates made by the SQL activity updater job.sql.stats.activity.update.latency: The latency of updates made by the SQL activity updater job. Includes failed update attempts.
- Added a new counter metric,
sql.stats.flush.done_signals.ignored, that tracks the number of times the SQL activity update job has ignored the signal that indicates that a flush has completed. This metric may indicate that the SQL activity update job is taking longer than expected to complete. - Added a new counter metric,
sql.stats.activity.updates.failed, to measure the number of update attempts made by the SQL activity update job that failed with errors. - Added a new counter metric,
sql.stats.flush.fingerprint.count, that tracks the number of unique statement and transaction fingerprints included in the SQL stats flush. - The
/_status/storesendpoint now includesnode_id,dir, andwal_failover_pathfields to show the store’s node ID, data directory, and path to the configured WAL failover secondary, if configured.
Command-line changes
- The new
--go-gc-percentflag of the command controls the garbage collection target percentage of the Go runtime, mirroring the existingGOGCenvironment variable. A garbage collection is triggered when the ratio of freshly allocated data to live data remaining after the previous collection reaches this percentage. If left unspecified and if a Go soft memory limit is configured (i.e., not explicitly disabled via--max-go-memoryorGOMEMLIMIT), the garbage collection target percentage defaults to 300%. Setting the flag to a negative value disables the target percentage garbage collection heuristic, and only the soft memory limit heuristic triggers garbage collection. To monitor the impact of this change in the DB Console, look for an increase in Memory usage in the and an increase in Go total memory usage in the . This does not increase the risk of an out-of-memory exception (OOM), because the Go memory limit (controlled by the--max-go-memoryflag or theGOMEMLIMITenvironment variable) prevents Go from consuming too much memory.
DB Console changes
- The now includes lease queue metrics.
- The DB Console SQL Activity page has replaced the Failed? boolean column with a Failure Count column that shows the number of failed executions for the given statement fingerprint. In the SQL Activity table, the same statement fingeprint no longer appears in separate rows for failed executions and successful executions. Instead, they are combined into a single statement fingerprint.
- The DB Console now displays an alert message when a license has expired or will expire in fewer than 15 days.
Bug fixes
- Fixed a bug with that could lead to dangling function references in other schemas accessing any functions.
- Fixed a bug where a of a backup that itself contained a table created by the
RESTOREof a table with an in-progress would fail to restore all rows. - Fixed a bug where without any configured sequence options did not display the default values for identity attributes in
information_schema. - Fixed a bug where a statement could fail if sequences existed and they did not support a privilege (e.g.,
BACKUP). - Fixed a bug where an statement would generate event log entries for schema changes that were not executed.
Contributors
This release includes 153 merged PRs by 179 authors.v24.1.0-alpha.3
Release Date: March 18, 2024Downloads
CockroachDB v24.1.0-alpha.3 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-alpha.3.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.3.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.3.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.3.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-alpha.3.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.3.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.3.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.3.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-alpha.3.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-alpha.3.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Enterprise edition changes
- now accepts a
--version=2parameter. Version 2 keys activate a new encryption implementation with improved performance. This is expected to become the default in CockroachDB v24.2.
SQL language changes
-
Mutation statements such as and as well as locking statements such as are not allowed in read-only transactions or transactions. This fixes an oversight where CockroachDB was allowing mutation statements and locking statements in implicit single-statement transactions using
AS OF SYSTEM TIME. -
Added support for
RETURNstatements with no expression for routines withOUTparameters and routines with aVOIDreturn type. -
can now change columns to an identity column by using the syntax in one of the following:
Identity columns can have their identity type altered by using the syntax in one of the following statements:
-
Added support for the
NULLstatement. - is now behind the .
- blocks can now be nested in a block that has an exception handler.
DB Console changes
- Resolved an issue where clusters with multiple stores per node may list inaccurate region/node information in the page.
VIEWtype tables will no longer display in the DB Console pages. Previously these would be listed with no information, only displaying errors.- Fixed an intermittent page crash in the tab.
- Fixed a bug where the Rows written value was incorrectly showing the Rows read value on the page.
Bug fixes
- Fixed a bug that occurred when using to drop and re-add a with the same name.
- Fixed a bug in which it was possible to during an transaction.
- Fixed a bug that caused a slow memory leak that could accumulate when opening many new connections. The bug was present in v22.2.9+ and v23.1+ versions.
Contributors
This release includes 90 merged PRs by 35 authors. We would like to thank the following contributors from the CockroachDB community:- Andrew Delph
v24.1.0-alpha.2
Release Date: March 11, 2024Downloads
CockroachDB v24.1.0-alpha.2 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-alpha.2.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.2.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.2.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.2.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-alpha.2.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.2.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.2.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.2.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-alpha.2.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-alpha.2.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Security updates
-
sessioncookie is now markedHttpOnlyto prevent it from being read by any JavaScript code. - cookies are now marked
Securefor the browser when the cluster is running in secure mode.
General changes
- will now detect faulty or stalled and use other replicas instead, which can prevent them getting stuck in certain cases (e.g., with ). This behavior can be disabled via the
kv.dist_sender.circuit_breaker.enabled.
Enterprise edition changes
- Added a new . This role option can be set to a subject distinguished name in RFC 2253 or RFC 4514 format. If set, then during client certificate authentication, certs that do not match the configured distinguished name will be rejected.
- support a new scheme
azure-event-hub://for Kafka data streaming to Azure event hubs. ThesinkURLmust include mandatory parametersshared_access_key_nameandshared_access_key. By default and as required, the optionstls_enabled=true,sasl_handshake=true,sasl_enabled=true, andsasl_mechanism=PLAINare applied, as they are the only supported options. Other parameters such astopic_nameandtopic_prefixare also supported. An example URI is:azure-event-hub://myeventhubs.servicebus.windows.net:9093?shared_access_key_name=abc&shared_access_key=123.
SQL language changes
- Added an option for node-level caching. All the sessions on the node can share the same cache, which can be concurrently accessed. The
serial_normalizationcan now be set to the valuesql_sequence_cached_node. If this value is set, thesql.defaults.serial_sequences_cache_sizecan be used to control the number of values to cache in a node, with a default of 256. ThePER NODE CACHEsequence option (syntax is[ [ PER NODE ] CACHE # ]) is now fully implemented and will allow nodes to cache sequence numbers. A cache size of 1 means there is no cache, and cache sizes of less than 1 are not valid.
Bug fixes
- Fixed a bug that prevented the use of routines with complex variable names that require double quotes. This bug had existed since v23.2.
- Fixed a bug that could cause creation of a syntactically invalid routine to return the wrong error. This bug had existed since v23.2.
- Fixed a bug that could result in a syntax error if a routine was created with an escaped string constant in the routine body. This bug had existed since v23.2.
- Fixed a bug where running a that targets a table with a user-defined type column and with the set to any value other than
wrappedwould cause a node panic due to a nil dereference. - Fixed a bug where running on certain backups would open a very large number of connections to the backup storage provider.
- Previously, a user with the
VIEWACTIVITYREDACTEDcould see constants inside of queries that originated from other in the output. This information is now properly redacted. - Previously, the and commands incorrectly required the user to have the
VIEWACTIVITYorVIEWACTIVITYREDACTED. This is now fixed, as a user should always be able to view their own queries, even without this privilege.
Contributors
This release includes 1939 merged PRs by 109 authors.v24.1.0-alpha.1
Release Date: March 7, 2024Downloads
CockroachDB v24.1.0-alpha.1 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v24.1.0-alpha.1.linux-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.1.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.1.linux-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.1.linux-arm64.tgz (SHA256) | |
| Mac (Experimental) | Intel | cockroach-v24.1.0-alpha.1.darwin-10.9-amd64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.1.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v24.1.0-alpha.1.darwin-11.0-arm64.tgz (SHA256) | cockroach-sql-v24.1.0-alpha.1.darwin-11.0-arm64.tgz (SHA256) | |
| Windows (Experimental) | Intel | cockroach-v24.1.0-alpha.1.windows-6.2-amd64.zip (SHA256) | cockroach-sql-v24.1.0-alpha.1.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:Backward-incompatible changes
- queries can no longer use a timestamp followed by a question mark to signify a future-time value. This was an undocumented syntax.
Enterprise edition changes
- no longer removes a when modifying changefeed properties.
changefeed.balance_range_distribution.enableis now deprecated. Instead, use the newchangefeed.default_range_distribution_strategy.changefeed.default_range_distribution_strategy='balanced_simple'has the same effect as settingchangefeed.balance_range_distribution.enable=true. It does not requireinitial_scan='only', which was required by the old setting.- CDC queries now correctly handle the function.
- The new syntax
ALTER VIRTUAL CLUSTER virtual-cluster START REPLICATION OF virtual-cluster ON physical-clustercan now be used to reconfigure virtual clusters previously serving as sources for to become standbys to a promoted standby. This reverses the direction of replication while maximizing data reuse. - s now load range information that is used to avoid a spike in metadata lookups when backups begin.
- Clusters created to run no longer automatically disable the and cluster settings. Users who started using physical cluster replication on v23.1 or v23.2 may wish to manually reset these settings.
- Physical cluster replication is now always enabled, and the
physical_replication.enabledcluster setting has been removed.
SQL language changes
- can now be used to set the next scheduled execution of the backup schedule to the current time.
- Fixed the update job to avoid conflicts on update, reduced the amount of data cached to just what the overview page requires, and fixed the correctess of the top queries.
- Previously, user-defined composite types were not populated in two
pg_catalogtables:pg_class(whose row entries pertain to the type) andpg_attribute(whose row entries pertain to the “columns” of the type). This PostgreSQL-incompatible behavior is now fixed by populating the tables with user-defined composite types. In addition, thetyprelidcolumn in thepg_typetable has the properoidfor composite types. - The newly added
jsonb_array_to_string_arrayno longer removesNULLobjects. It now includes them in the resulting array. - Changed the display for RU estimates shown in from integer to float. This will prevent small estimates from being rounded to zero, which makes the estimate less confusing for cheap queries.
- The
information_schema._pg_char_octet_lengthis now supported, which improves compatibility with PostgreSQL. - The
pg_encoding_max_lengthis now supported, which improves compatibility with PostgreSQL. - The
information_schema._pg_datetime_precisionis now supported, which improves compatibility with PostgreSQL. - The
information_schema._pg_interval_typeis now supported, which improves compatibility with PostgreSQL. information_schema.user_defined_typesis now populated with information about , andinformation_schema.attributesis now populated with information about the attributes of .- The will no longer generate a constrained scan that only uses filters from a constraint. This prevents cases where a constrained scan actually scans the entire table because the constraints aren’t selective.
- Reads rolled back by savepoints are now refreshable, matching the PostgreSQL behavior and avoiding potential serializability violations.
- Implemented the postgis
ST_TileEnvelope. - Added support for a third argument in the
array_position. If provided, it gives the index from which to begin searching in the array. - Added the
bit_countfor and types. - Added a
pg_backend_pidcolumn tocrdb_internal.node_sessionsandcrdb_internal.cluster_sessions. This value corresponds to the numerical ID returned frompg_backend_pid. - Column type changes now require an explicit cast when automatic casting is not possible. This aligns with PostgreSQL’s behavior. Previously, certain type conversions, such as to , were allowed without an explicit cast.
- Added a new ,
optimizer_merge_joins_enabledthat, when true, instructs the to explore query plans with merge joins. The setting defaults totrue. - CockroachDB now supports parsing queries like that only produce the row count and do not output any columns.
- Added the
metaphone, which converts a string to its Metaphone code. - The new
EXPIRATION WINDOWoption for allows the user to override the default producer job expiration window of 24 hours. For example,ALTER VIRTUAL CLUSTER appTenant SET REPLICATION EXPIRATION WINDOW ='100ms'. The producer job expiration window determines how long the producer job stays alive without a heartbeat from the consumer job. - The clause is now allowed with
SELECT... FOR SHARE. - Added configurable for total TCP keep alive probes (
server.sql_tcp_keep_alive.count) and TCP probe intervals (server.sql_tcp_keep_alive.interval) for SQL connections. Removed theCOCKROACH_SQL_TCP_KEEP_ALIVEenvironment variable subsuming it. - Removed the
sql.trace.session_eventlog.enabledcluster setting and the associated event log tracing. The information in these traces is still available in the by enabling--vmodule=conn_executor=2with . - The
array_aggcan now support arrays as the input. Note that CockroachDB does not yet fully support nested arrays, andarray_aggdoes not support nested arrays as inputs. - An execution statistic that measures “client time” is now included in
plan.txtfiles of . Client time tracks how long the query execution was blocked on the client receiving the PGWire protocol messages. Note that when obtained via , client time does not make sense because in this variant the output rows are discarded and not communicated to the client. - Added the
trace_idcolumn to the response of the command. - Added support for the
ENCODINGoption ofCOPY, as long as the encoding of'utf8'is specified. - Added the
SHOW VARIABLES FOR ROLEcommand, which allows the database administrator to easily view the default values for applied to a given user. - The
sql.txn.read_committed_isolation.enabledis nowtrueby default. This means that any syntax and settings that configure the isolation level will now cause the transaction to use that isolation level, rather than automatically upgrading the transaction toSERIALIZABLE. - Added a new ,
sql.stats.virtual_computed_columns.enabled, which when set enables collection of table statistics on . - Added the
autocommit_before_ddl. When set totrue, any schema change statement that is sent during an explicit transaction will cause the transaction to commit before executing the schema change. - is now enabled by default in the declarative schema changer.
- now supports nested blocks, with the following limitations: variable shadowing is disallowed, and exception handlers cannot be used in a routine with nested blocks.
- The
sql.index_recommendation.drop_unused_durationis now public. - It is now possible to hint to the that it should plan a straight join by using the syntax
... INNER STRAIGHT JOIN.... If the hint is provided, the optimizer will now fix the join order as given in the query, even if it estimates that a different plan using join reordering would have a lower cost. - Add column
goroutine_idto the response of theSHOW SESSIONScommand. - Introduced a new ,
close_cursors_at_commit, which causes a cursor to remain open even after its calling transaction commits. Note that transaction rollback still closes any cursor created in that transaction. - Added the
server.max_open_transactions_per_gateway. When set to a non-negative value, non-adminusers cannot execute a query if the number of transactions open on the current gateway node is already at the configured limit. - Added the
setseed. It sets the seed for the random generator used by therandombuilt-in function. OUTandINOUTparameter classes are now supported in .- Out-of-process SQL servers will now start exporting a new
sql.aggregated_livebytes. This metric gets updated once every 60 seconds by default, and its update interval can be configured via thetenant_global_metrics_exporter_interval. - Added support for index hints with and statements. This allows
INSERT... ON CONFLICTandUPSERTqueries to use index hints in the same way they are already supported for and statements. - Added a new table storage parameter that can be used to disable changefeed replication for on a per-table basis.
Operational changes
- The internal versions that are reported during have been renamed for clarity. For example,
23.2-8is now named23.2-upgrading-to-24.1-step-008. - Introduced a new cluster setting,
server.jwt_authentication.jwks_auto_fetch.enabled, enabling automatic fetching of from an issuer’s remote endpoint. This prevents an administrator’s need to update the JWKS specified inserver.jwt_authentication.jwks- whether manually or by custom script - when the identity provider’s keys rotate. That direct specification of JWKS remains the default, as the new cluster setting defaults tofalse. - Updated the error message logged in the case of stalled disks to use the appropriate term “disk stall”, matching the term used in metrics and dashboards. This was previously “file write stall”.
- Introduced the
changefeed.emitted_batch_sizeshistogram metric that measures the batch sizes used when emitting data to . This metric supports . - Introduced metrics
log_fluent_sink_conn_attempts,log_fluent_sink_write_attempts, andlog_fluent_sink_write_errorsto enable more precise tracking of connection and write operations when . - The
sql.contention.record_serialization_conflicts.enabledis nowonby default. This means any that are returned containing conflicting transaction information will be recorded by the contention registry. - Removed the
kv.rangefeed.scheduler.enabledbecause the scheduler is now unconditionally enabled. - Removed the
kv.rangefeed.catchup_scan_concurrency. Catchup scans are throttled via on a per-node basis. - Removed the cluster setting because the functionality is enabled by default.
- The gossip status now includes information about the server’s high water timestamps for every other node it knows about in the gossip cluster.
- Removed the
cockroach_rangefeed_rpc_initial_window_sizeenvironment variable. The rangefeed connection now uses the same window size as other RPC connections. - for changes are now emitted to the
OPSchannel rather than theDEVchannel. - The new environment variable
cockroach_rpc_use_default_connection_classenables operators to switch back to the prior default behavior of sending most network/RPC workloads, except system traffic, through a single RPC/TCP connection, in case the environment does not tolerate multiple TCP connections. v24.1 defaults to using multiple connections, each dedicated to a particular types of traffic, specifically for or data. For more information, see additional release notes that reference this variable name. - In unredacted , the
crdb_internal.transaction_contention_eventstable file has two new columns:waiting_stmt_query: the query of the waiting statement.blocking_txn_queries_unordered: the unordered list of the blocking transaction’s queries.
- Transaction replay protection state is now passed between the outgoing and incoming for a range during a . This avoids cases where lease transfers can cause transactions to throw
TransactionAbortedError(ABORT_REASON_NEW_LEASE_PREVENTS_TXN)errors. - CockroachDB will now automatically generate if there is an increase in CPU utilization. This can help inform investigations into possible issues.
- Expanded the flag to include problem ranges. This flag still defaults to
true.
Command-line changes
- no longer include redundant
hex_columns for system tableBYTEScolumns. - Added the
--follower-read-percentflag, which determines the percent (0-100) of read operations that are follower reads, to the command. - The workload
schemachangenow writes a.otlp.ndjson.gzarchive containing OTLP trace bundles for debugging purposes. - creates a
tsdump.yamlfile. Thetsdumpraw format automatically creates the YAML file in the default location/tmp/tsdump.yaml. Added a new flag--yamlthat allows users to specify the path to createtsdump.yamlinstead of using the default location. For example,cockroach debug tsdump --host <host>:<port> \ --format raw --yaml=/some_path/tsdump.yaml > /some_path/tsdump.gob. - Removed the
cockroach connectcommand functionality. This was in CockroachDB v23.2. - Changed the SQL shell help URL to point to .
- Added a new
encode-uriutility to make generating connection strings for use with easier.
DB Console changes
- Store initialization now logs progress every 10 seconds showing the current and total number of initialized.
- Introduced a new Lease Preferences graph on the . The Lease Preferences graph will indicate when the current is not the first lease preference and where the current leaseholder satisfies no applied lease preference.
- Updated the to always show the entire selected period, instead of just the period that had data.
- Error messages displayed upon failure to load DB Console views now include information about the HTTP response status code, if one is present.
- The Full Table/Index Scans chart in the now shows the non-negative derivative of the number of full scans tracked.
- The now includes two additional graphs:
- Elastic CPU Utilization: displays the CPU utilization by elastic work, compared to the limit set for elastic work.
- Elastic CPU Exhausted Duration Per Second: displays the duration of CPU exhaustion by elastic work, in microseconds.
- The
txn.restarts.writetoooldmetric in the Transaction Restarts graph under the now includes all restarts previously categorized astxn.restarts.writetoooldmulti. The former is a now a superset of the latter. Thetxn.restarts.writetoooldmultimetric will be removed in a future release.
Bug fixes
- Fixed a bug that could cause an internal error during distributed execution for an expression like
CASEthat requires its inputs to be the same type with allNULLinputs. - Fixed
NULLinput handling for the geospatialst_pointfromgeohashandst_geomfromgeohash. - The geospatial
st_makeenvelopenow correctly supportsxminoryminto be greater thanxmaxorymax, respectively. - Fixed a bug that could cause v23.1 nodes in clusters that had not to use excessive CPU retrying expected errors related to the incomplete upgrade state.
- now does not fail on corrupted log files.
- Placeholder arguments can now be used in statements.
- Previously, when the session variable
use_declarative_schema_changerwas set tooff, would delete any comments associated with the old primary index and old primary key constraint. This is inconsistent with the behavior ofuse_declarative_schema_changer=on, which is the default setting, where those comments would be carried over to the new primary index. Furthermore, the old behavior also caused a bug that could prevent commandSHOW CREATE tfrom working. - Previously, when the session variable was set to
use_declarative_schema_changer=offand there was an attempt to on a table that has unique secondary indexes on new primary key columns, the unique secondary index would still incorrectly have old primary key columns as itskeySuffixColumnafter theALTER PRIMARY KEY. This was problematic because a subsequent dropping of the old primary key columns would unexpectedly drop those unique secondary indexes as well, even withoutCASCADE. - can now be used to set
updates_cluster_last_backup_time_metricwithout providing an explicit value, matching the behavior of the option when specified during . - Previously, if a table had that stored certain columns (
col) using the clause, followed by an tocol, an incorrect secondary index would persist. The secondary index would continue to have theSTORINGclause, despite the column being part of the primary key and the fact that CockroachDB does not permit secondary indexes to store any primary key columns. Now, after theALTER PRIMARY KEY, theSTORINGclause is dropped on those secondary indexes. - Fixed a bug that caused uploads to to fail because of the absence of an
MD5hash. - now preserves the name of the original primary index when the session variable is
use_declarative_schema_changer=off. - Fixed a bug where the added to a table would cause the
create_statementfromSHOW CREATE tto not be executable and error withunique constraint cannot be NOT VALID. - Fixed a bug where an empty followed by non-empty incremental backups taken inside an application tenant might not allow a due to the use of an incorrect SQL codec.
- Fixed a bug in the job that would cause it to skip expired rows if the primary key of the table included columns of the collated
STRINGorDECIMALtype. - Incorrectly labeled blocks now return an expected syntax error.
- no longer returns an error if the connection already exists.
- CockroachDB now correctly uses the histograms on columns of collated type. The bug has been present since before v22.1.
- Improved an interaction during range that could cause
RETRY_ASYNC_WRITE_FAILUREerrors to be returned to clients. - Backfilling tables for or could get into a retry loop if data was deleted and those jobs took longer than the GC TTL.
- that are part of a mis-replicated range will no longer get stuck on a rebalance operation that was falsely determined to be unsafe.
- A memory leak within the insights system was found to occur when was disabled, while leaving
sql.metrics.statement_details.enabledenabled. This patch fixes the memory leak by preventing the collection of further statement and transaction insights whensql.metrics.transaction_details.enabledis disabled. - Fixed a rare panic that could happen during a
pg_dumpimport that contains a function that has a subquery in one of its arguments, likeSELECT addgeometrycolumn(...). Now, attempting to import apg_dumpwith such a function results in an expected error. - jobs could previously lead to growth in an internal system table resulting in slower job-system related queries.
- Fixed an issue in CockroachDB where, if operating on a Linux system outside of a CPU cgroup, the system would repeatedly log the error
unable to get CPU capacityat 10-second intervals. - Fixed a bug where casts of to simply truncated the decimal portion. These casts now match the PostgreSQL behavior of rounding to the nearest integer, and in cases of a value halfway between two integers, rounding to the nearest even number. This aligns with the “round half to even” rule or “bankers’ rounding”, offering greater overall precision across a group of such cast operations.
- Fixed a bug where statements like
ADD COLUMN j INT, ADD UNIQUE WITHOUT INDEX (j), which with unique constraints without creating associated indexes, would fail with an internal error. - Previously, from a table to a table could cause leaseholders to never move to the database’s primary region. This is now fixed.
- Users with the privilege can now request statement bundles using
crdb_internal.request_statement_bundleor through the DB Console page. - Fixed an internal error with a message like:
LeafTxn... incompatible with locking requestthat occurs when performing an update under which cascades to a table with multiple other foreign keys. - Fixed a bug where could fail with an error
non-nullable column <x> with no value! Index scanned..when validating recreated . - Fixed a bug where a sequence name allocated by that conflicted with an existing type name would cause an error.
- Fixed a bug where statements could fail with an “unexpected value” error if multiple
COMMENTstatements were running concurrently. - Previously, in certain cases, using virtual tables such as
crdb_internal.system_jobscould result in the internal errorattempting to append refresh spans after the tracked timestamp has moved forward. This is now fixed. The bug was introduced in CockroachDB v23.1. - Fixed a bug where operations on the
crdb_internal.leasestable could cause a node to become unavailable due to a deadlock in the leasing subsystem. - If an individual ‘s circuit breaker had tripped but the range was otherwise functional, for example, because the replica was partially partitioned away from the , it was possible for a gateway to persistently error when contacting this replica instead of retrying against a functional leaseholder elsewhere. The will now retry such errors against other replicas once.
- Fixed a bug in changefeed where the HTTP request body may not be initialized on retries, resulting in the error
http: ContentLength=... with Body length 0. - Fixed a bug where rangefeed resolved timestamps could get stuck, continually emitting the log message
pushing old intents failed: range barrier failed, range split, typically following a . - Fixed a condition where some files were not closed when inspecting backup metadata during BACKUP and RESTORE. Epic: none.
- Fixed a bug where some backup metadata files opened during were not closed.
- Fixed a bug that caused internal errors when executing an statement where the query involved sorting by columns not explicitly included in the output, due to hidden columns in the input expression.
- Fixed a bug where a warning about the need to refresh data would remain displayed on the Active Executions view of the and pages despite enabling Auto Refresh.
Performance improvements
- for multi-region tables now default to prioritizing replicas in the same , when available, with node latency as a tie breaker. Previously, latency was the primary criteria. This can improve the performance and predictability of follower reads.
- During node startup, stores are now loaded in parallel by default, reducing start times for nodes with many stores.
- Improved the efficiency and performance of .
- Rangefeeds, the infrastructure used for , now use a more efficient engine that reduces the number of goroutines and the associated Go scheduler pressure and latency.
- Rangefeeds, the infrastructure used for , now use a more efficient multiplexing protocol.
- The now generates constrained scans on indexes containing boolean, computed expressions.
- A separate RPC connection class is now used for most traffic. This improves isolation and reduces interference with foreground SQL traffic, which reduces chances of head-of-line blocking caused by unrelated traffic under high-load conditions. The new
COCKROACH_RAFT_USE_DEFAULT_CONNECTION_CLASSenvironment variable can be set to use the default connection class instead (the previous behavior). - Rangefeed traffic (typically for ) is now separated into its own RPC connection class. This improves isolation and reduces interference with the foreground SQL traffic, which reduces chances of head-of-line blocking caused by unrelated traffic. The new
COCKROACH_RANGEFEED_USE_DEFAULT_CONNECTION_CLASSenvironment variable can be set to use the default connection class, the previous default choice for rangefeeds. - The initial scan traffic for , which can be significant, now uses a different RPC/TCP connection than the foreground SQL/KV traffic. This reduces interference between workloads, and reduces chances of head-of-line blocking issues.
- now supports specifying different client IDs for each changefeed, enabling users to define distinct Kafka quota configurations for each. For example,
CREATE CHANGEFEED FOR... WITH kafka_sink_config='{"ClientID": "clientID1"}' - Added the
changefeed.kafka_throttling_hist_nanosmetric, enhancing visibility into throttling times when CockroachDB operations exceed Kafka’s quota limits. - The now generates more efficient query plans for queries with comparisons of and columns, for example,
timestamp_col - '1 day'::INTERVAL > now(). - Statements from internal executors (use of SQL queries by the cluster itself) now correctly display when filtering by application name
$ internalon the Statements page in . Such statements are hidden when$ internalis not specified.
Contributors
This release includes 1851 merged PRs by 108 authors. We would like to thank the following contributors from the CockroachDB community:- Andrew Delph (first-time contributor)
- ChanYe East (first-time contributor)
- Charles (first-time contributor)
- Eric.Yang
- Harshit Vishwakarma (first-time contributor)
- HighPon
- Jasmine Sun (first-time contributor)
- Joshua Hildred (first-time contributor)
- Kevin Mingtarja (first-time contributor)
- Luis Pessoa (first-time contributor)
- Nikolai Vladimirov (first-time contributor)
- chavacava (first-time contributor)
- craig
- cty123
- da-ket (first-time contributor)
- lyang24 (first-time contributor)
- zach.graves (first-time contributor)
- zyf123123 (first-time contributor)

