CockroachDB v24.1 is a required Regular Release.
Refer to Major release types before installing or upgrading for release timing and support details. To learn what’s new in this release, refer to its Feature Highlights.
On this page, you can read about changes and find downloads for all production and testing releases of CockroachDB v24.1
- For key feature enhancements in v24.1 and other upgrade considerations, refer to the notes for v24.1.0.
- For details about release types, naming, and licensing, refer to the Releases page.
- Be sure to also review the Release Support Policy.
- After downloading a supported CockroachDB binary, learn how to install CockroachDB or upgrade your cluster.
Get future release notes emailed to you:
v24.1.6
Release Date: October 17, 2024
Downloads
This version is currently available only for select CockroachDB Cloud clusters. To request to upgrade a CockroachDB self-hosted cluster to this version, contact support.
Changelog
View a detailed changelog on GitHub: v24.1.5...v24.1.6
Enterprise edition changes
- Updated the cluster setting
changefeed.sink_io_workers
with all the changefeed sinks that support the setting. #130373 - Added two network metrics,
changefeed.network.bytes_in
andchangefeed.network.bytes_out
. These metrics track the number of bytes sent by individual changefeeds to the following sinks:- Kafka sinks. If child metrics are enabled, the metric will have a
kafka
label. - Webhook sinks. If child metrics are enabled, the metric will have a
webhook
label. - Pub/Sub sinks. If child metrics are enabled, the metric will have a
pubsub
label. - SQL sink. If child metrics are enabled, the metric will have a
sql
label. #130583
- Kafka sinks. If child metrics are enabled, the metric will have a
- Added a
changefeed.total_ranges
metric that can be used to monitor the number of ranges that are watched by changefeed aggregators. It shares the same polling interval aschangefeed.lagging_ranges
, which is controlled by the existinglagging_ranges_polling_interval
option. #130983 - Disambiguated metrics 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. #131418 - Added timers around key parts of the changefeed pipeline to help debug feeds experiencing issues. The
changefeed.stage.{stage}.latency
metrics now emit latency histograms for each stage. The metric respects the changefeedscope
label for debugging specific feeds. #131429
Operational changes
- Added a
ranges.decommissioning
metric representing the number of ranges that have a replica on a decommissioning node. #130248 - You can now configure the log format for the
stderr
log sink by setting thestderr.format
field in the YAML configuration. #131534
DB Console changes
- The DB Console will now show a notification alerting customers without an Enterprise license to upcoming license changes with a link to more information. #130426
Bug fixes
- Fixed a bug in which
SHOW CLUSTER SETTING FOR VIRTUAL CLUSTER
would erroneously returnNULL
for some settings. #128783 - Addressed a bug in the upgrade pre-condition for repairing descriptor corruption, which could lead to upgrade finalization being stuck. #130518
- Fixed a potential memory leak in changefeeds using a cloud storage sink. The memory leak could occur if both
changefeed.fast_gzip.enabled
andchangefeed.cloudstorage.async_flush.enabled
weretrue
, and the changefeed received an error while attempting to write to the cloud storage sink. #130601 - Fixed a bug in which some
SELECT FOR UPDATE
orSELECT FOR SHARE
queries usingNOWAIT
could still block on locked rows when using theoptimizer_use_lock_op_for_serializable
session setting underSERIALIZABLE
isolation. This bug was introduced withoptimizer_use_lock_op_for_serializable
in v23.2.0. #130429 - Fixed a bug that caused the optimizer to plan unnecessary post-query uniqueness checks during
INSERT
,UPSERT
, andUPDATE
statements on tables with partial, unique, hash-sharded indexes. These unnecessary checks added overhead to execution of these statements, and caused the statements to error when executed underREAD COMMITTED
isolation. #130569 - Previously, if a connection was attempting a schema change while the same schema objects were being dropped, it was possible for the connection to be incorrectly dropped. This is now fixed. #130961
- Fixed a bug that could result in the inability to garbage collect an MVCC range tombstone within a global table. #130950
- Fixed a bug that could cause errors with the message
internal error: Non-nullable column ...
when executing statements underREAD COMMITTED
isolation that involved tables withNOT NULL
virtual columns. #131064 - Fixed a bug that could cause incorrect results for queries containing a correlated subquery with a
GROUP BY
orDISTINCT ON
operator referencing an outer column. This issue would occur if the correlated subquery was in the input of aSELECT
orJOIN
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. #130989 - The AWS endpoint and cloud custom HTTP client configuration are now considered when implicit authentication is used for cloud storage. Previously, these were only considered when using explicit credentials. #131202
- 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
SHOW JOBS
and the DB Console. #131406 - Fixed a bug that could prevent a changefeed from being able to resume after being paused for a prolonged period of time. #130920
Performance improvements
- The query optimizer now plans limited, partial index scans in more cases when the new session setting
optimizer_push_limit_into_project_filtered_scan
is set toon
. #130336
Contributors
This release includes 85 merged PRs by 39 authors.
v24.1.5
Release Date: September 25, 2024
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.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:
docker pull cockroachdb/cockroach:v24.1.5
Source tag
To view or download the source code for CockroachDB v24.1.5 on Github, visit v24.1.5 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.3-261-gf629e9a3a88...v24.1.5
General changes
- Upgraded the
grpc
version to v1.56.3. #130046
Enterprise edition changes
- Introduced the new cluster setting
changefeed.protect_timestamp.lag
, which controls when a changefeed's protected timestamp is updated. The protected timestamp will only be updated if the setchangefeed.protect_timestamp.lag
value has passed between the last protected timestamp and the changefeed high watermark. #129686 SHOW CHANGEFEED JOB
,SHOW CHANGEFEED JOBS
, andSHOW JOBS
no longer expose user-sensitive information likeclient_key
. #122636- Added two network metrics,
changefeed.network.bytes_in
andchangefeed.network.bytes_out
. These metrics track the number of bytes sent by individual changefeeds to the following sinks:- Kafka sinks. If child metrics are enabled, the metric will have a
kafka
label. - Webhook sinks. If child metrics are enabled, the metric will have a
webhook
label. - Pub/Sub sinks. If child metrics are enabled, the metric will have a
pubsub
label. - SQL sink. If child metrics are enabled, the metric will have a
sql
label. #130584
- Kafka sinks. If child metrics are enabled, the metric will have a
SQL language changes
- The session setting
plan_cache_mode=force_generic_plan
can now be used to force prepared statements to use query plans that are optimized once, and reused in future executions without re-optimization, as long as it does not become stale due to schema changes or a collection of new table statistics. The setting takes effect duringEXECUTE
commands.EXPLAIN ANALYZE
includes aplan type
field. If a generic query plan is optimized for the current execution, theplan type
will begeneric, re-optimized
. If a generic query plan is reused for the current execution without performing optimization, theplan type
will begeneric, reused
. Otherwise, theplan type
will becustom
. #128085 - The session setting
plan_cache_mode=auto
can now be used to instruct the system to automatically determine whether to usecustom
orgeneric
query plans for the execution of a prepared statement. Custom query plans are optimized on every execution, while generic plans are optimized 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. #128085
Operational changes
- There are now structured logging events that report connection breakage during node shutdown. Previously, the logs existed, but were unstructured. The logs appear in the
OPS
logging channel. There are two new events:- The
node_shutdown_connection_timeout
event is logged after the timeout defined by theserver.shutdown.connections.timeout
cluster setting transpires, if there are still open SQL connections. - The
node_shutdown_transaction_timeout
event is logged after the timeout defined by theserver.shutdown.transactions.timeout
cluster setting transpires, if there are still open transactions on those SQL connections. #128711
- The
- Added a new configuration parameter
server.cidr_mapping_url
, which maps IPv4 CIDR blocks to arbitrary tag names. #130051 - Modified the metrics
sql.bytesin
andsql.bytesout
to work as aggregate metrics if child metrics are enabled. #130051 - Added three new network-tracking metrics.
rpc.connection.connected
is the number of rRPC TCP level connections established to remote nodes.rpc.client.bytes.egress
is the number of TCP bytes sent via gRPC on connections CockroachDB initiates.rpc.client.bytes.ingress
is the number of TCP bytes received via gRPC on connections CockroachDB initiated. #130050 - This commit adds two metrics:
changefeed.network.bytes_in
andchangefeed.network.bytes_out
. These metrics track the number of bytes sent by the individual changefeeds to different sinks. #130584
DB Console changes
- The user experience for metrics charges in the DB Console now has hover behavior that focuses on individual lines and shows values under the mouse pointer. #128867
- Users with the
VIEWACTIVITY
privilege can download statement bundles from the DB Console. #129503 - Users with the
VIEWACTIVITY
privilege can now request, view, and cancel statement bundles in the DB Console. #129805 - The DB Console will show a notification alerting customers without an Enterprise license to upcoming license changes with a link to more information. #130510
Bug fixes
- Previously, declarative and legacy schema changes were incorrectly allowed to be run concurrently, which could lead to failing or hung schema change jobs. #128805
- Fixed a bug that caused errors like
ERROR: column 'crdb_internal_idx_expr' does not exist
when accessing a table with an expression index where the expression evaluates to anENUM
type, for example,CREATE INDEX ON t ((col::an_enum))
. #129093 - Fixed a bug where
NaN
orInf
could not be used as the default value for a parameter inCREATE FUNCTION
statements. #129086 - Fixed a bug in which
SELECT ... FOR UPDATE
andSELECT ... FOR SHARE
queries usingSKIP LOCKED
and aLIMIT
and/or anOFFSET
could return incorrect results underREAD COMMITTED
isolation. This bug was present when support forSKIP LOCKED
underREAD COMMITTED
isolation was introduced in v24.1.0. #128101 - Fixed a bug in which some
SELECT ... FOR UPDATE
orSELECT ... FOR SHARE
queries usingSKIP LOCKED
could still block on locked rows when usingoptimizer_use_lock_op_for_serializable
underSERIALIZABLE
isolation. This bug was present whenoptimizer_use_lock_op_for_serializable
was introduced in v24.1.0. #128101 - Function input parameters for user-defined functions can no longer be of the
VOID
type, which matches the behavior of PostgreSQL. #129280 - Fixed a bug in the public preview of Write Ahead Log (WAL) Failover that could prevent a node from starting if it crashed during a failover. #129367
- Starting nodes could fail with:
could not insert session ...: unexpected value
, if an ambiguous result error was encountered when inserting into thesqlliveness
table. #129234 - Internally issued queries that are not initiated within a SQL session no longer respect a statement timeout. This includes: background jobs, queries issued by the DB Console that perform introspection, and the Cloud SQL shell. #129515
- Fixed a rare bug in
SHOW CLUSTER SETTING
that could cause it to fail with an error liketimed out: value differs between local setting and KV
. #129756 - Fixed a bug where the
schema_locked
table parameter did not prevent a table from being referenced by a foreign key. #129754 - Fixed a bug where the
require_explicit_primary_keys
session variable would aggressively prevent allCREATE TABLE
statements from working. #129907 - Fixed a slow-building memory leak when using Kerberos authentication. #130318
- Fixed a potential memory leak in changefeeds using a cloud storage sink. The memory leak could occur if both the cluster settings
changefeed.fast_gzip.enabled
andchangefeed.cloudstorage.async_flush.enabled
are set totrue
and the changefeed received an error while attempting to write to the cloud storage sink. #130626
v24.1.4
Release Date: August 29, 2024
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.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:
docker pull cockroachdb/cockroach:v24.1.4
Source tag
To view or download the source code for CockroachDB v24.1.4 on Github, visit v24.1.4 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.3...v24.1.4
Security updates
- URLs in the following SQL statements are now sanitized of any secrets before being written to unredacted logs. #127506
Enterprise edition changes
- Added a new Kafka changefeed sink that uses the
franz-go
library and CockroachDB'sbatching_sink
implementation. The new Kafka sink can be enabled with thechangefeed.new_kafka_sink_enabled
cluster setting, which is disabled by default. #128018 - The new Kafka sink, enabled with
changefeed.new_kafka_sink_enabled
, as well as the Google Cloud Pub/Sub sink, now display notices indicating the topics that a changefeed will emit to. #128333
SQL language changes
- Added a new
sql.auth.grant_option_for_owner.enabled
cluster setting to prevent theGRANT OPTION
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 OPTION
is 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. #126959
Command-line changes
- A
--locality-file
flag is now available on thecockroach start
andcockroach start-single-node
commands. This allows specifying node locality (typically aregion
value) as a file, rather than by using the--locality
flag. #127475
DB Console changes
- The Databases and Tables pages in the DB Console now show a loading state while loading information for databases and tables, including size and range counts. #127748
- On the Databases page in the DB Console, table names will no longer appear with quotes around the schema and table name. #127766
Bug fixes
- Fixed a bug introduced in v23.2.0 in which CockroachDB would hit an internal error when evaluating
INSERT
s intoREGIONAL BY ROW
tables where the source was aVALUES
clause with a single row and at least one Boolean expression. #127277 - Fixed a bug in which the
DISCARD
statement was disallowed when the session settingdefault_transaction_read_only
was set toon
. #127363 - In the DB Console event log,
ALTER ROLE
events now display correctly even when no role options are included in theALTER ROLE
statement. #126568 - Fixed a formatting issue with the
sql_sequence_cached_node
value of theserial_normalization
session setting. This could lead to an error connecting to CockroachDB if this value was set as the default forserial_normalization
via the cluster settingsql.defaults.serial_normalization
. #127673 - Fixed a bug where dropping
ENUM
values that were referenced by index expressions could fail with an error. #127454 - Fixed a bug that caused a memory leak when executing SQL statements with comments, 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 SQL session. This bug had been present since v23.1. #127759 - Fixed a bug where schema changes could hang if the lease rangefeed stopped receiving updates. #127487
- Fixed small memory leaks that would occur during changefeed creation. #128018
- Fixed a memory leak that could occur when specifying a non-existent virtual cluster name in the connection string. #128106
- Fixed a bug where
CREATE INDEX IF NOT EXISTS
would not correctly short-circuit if the given index already existed. #128311 - Fixed a bug in syntax validation, in which the
DESCENDING
clause was not allowed for non-terminal columns of an inverted index. Only the last column of an inverted index should be prevented from beingDESCENDING
. This is now properly checked. #128311 - Fixed a bug where an index could store a column in the primary index if that column had a mixed-case name. #128311
- Setting or dropping a default value on a computed column is now blocked, even for
NULL
defaults. Previously, setting or dropping a default value on a computed column was a no-op. #128466 - 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 user-defined functions (UDFs) were introduced. #126412
- Fixed a bug where
debug zip
would return an error while fetching unstructured/malformed logs. #128605 - Fixed a bug where a hash-sharded constraint could not be created if it referred to columns that had a backslash in the name. #128521
- Fixed a bug in which the output of
EXPLAIN (OPT, REDACT)
for variousCREATE
statements was not redacted. This bug had existed sinceEXPLAIN (REDACT)
was introduced in v23.1 and affects the following statements:EXPLAIN (OPT, REDACT) CREATE TABLE
EXPLAIN (OPT, REDACT) CREATE VIEW
EXPLAIN (OPT, REDACT) CREATE FUNCTION
#128489
v24.1.3
Release Date: August 1, 2024
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.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:
docker pull cockroachdb/cockroach:v24.1.3
Source tag
To view or download the source code for CockroachDB v24.1.3 on Github, visit v24.1.3 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.2...v24.1.3
SQL language changes
EXPLAIN ANALYZE
statements are now supported when executed via Cloud Console SQL shell. #125563- Added the
sql.auth.grant_option_inheritance.enabled
cluster setting. The default value istrue
, which maintains consistency with CockroachDB's previous behavior: users granted a privilege withWITH GRANT OPTION
can in turn grant that privilege to others. Whensql.auth.grant_option_inheritance.enabled
is set tofalse
, theGRANT OPTION
is 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. #126300
Operational changes
crdb_internal.cluster_execution_insights.txt
andcrdb_internal.cluster_txn_execution_insights.txt
have been removed from the debug zip. These files contained cluster-wide insights for statements and transactions. Users can still rely on the per-node execution insights incrdb_internal.node_execution_insights.txt
andcrdb_internal.node_txn_execution_insights.txt
. #125807- For the TELEMETRY logging channel, TCL
sampled_query
events will now be sampled at the rate specified by the settingsql.telemetry.query_sampling.max_event_frequency
, which is already used to limit the rate of sampling DML statements. #126729
Bug fixes
- Fixed a bug where collection of debug information for very long-running jobs could use excessive space in the
job_info
system table and cause some interactions with the jobs system to become slow. #126122 - Fixed a bug where a change to a user-defined type (UDT) 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 anALTER TYPE
statement, or indirectly from anALTER DATABASE ADD REGION
orDROP REGION
statement (which implicitly change thecrdb_internal_region
type). This bug has existed since UDTs were introduced in v20.2. #125800 - Fixed a bug in which constant
LIKE
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 fromLIKE
patterns containing backslashes was added. #125539 - Fixed the statistics estimation code in the optimizer so it does not use the empty histograms produced if histogram collection 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. #126153
- Fixed a bug where
CREATE TABLE
statements with index expressions could hit undefined column errors on transaction retries. #125967 - Fixed a bug where CockroachDB would hit an internal error when evaluating
INSERT
s intoREGIONAL BY ROW
tables where the source is aVALUES
clause with a single row and at least one boolean expression. The bug was introduced in v23.2.0. #125505 - Fixed a bug in
cockroach debug tsdump
where the command fails when a custom SQL port is used and the--format=raw
flag is provided. #125980 - Fixed a bug where a user-defined function (UDF) that shared a name with a built-in function would not be resolved, even if the UDF had higher precedence according to the
search_path
variable. #126296 - Fixed a bug that caused background jobs to incorrectly respect a statement timeout. #126820
- Fixed a bug where
ALTER DATABASE ... DROP REGION
could fail if any tables under the given database have indexes on expressions. #126599 - Fixed a PostgreSQL incompatibility bug when inputting
public
as user name for built-in functions such ashas_database_privilege
andhas_schema_privilege
. #126851 - Fixed a bug when restoring a database with a composite type. #126428
- Fixed a bug where the Databases page crashed if the range information was not available. #127092
- Fixed a bug where CockroachDB could incorrectly evaluate an
IS NOT NULL
filter if it was applied to non-NULL
tuples that hadNULL
elements, such as(1, NULL)
or(NULL, NULL)
. This bug has existed since v20.2. #126938 - The
sql_sequence_cached_node
value of theserial_normalization
setting was not correctly formatted. This could lead to errors while connecting to CockroachDB if the default value ofserial_normalization
was set toserial_normalization
. The formatting bug was fixed, which also fixes the errors when connecting. #127675
Performance improvements
- Starting a
cockroach
process will no longer flush buffered logs to configured logging sinks unless the process is running undersystemd
, where cockroach runs with theNOTIFY_SOCKET
environment variable. #126305 - Schema changes 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 write hotspot that can slow down foreground traffic. #126684
Contributors
This release includes 122 merged PRs by 39 authors.
v24.1.2
Release Date: July 2, 2024
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.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:
docker pull cockroachdb/cockroach:v24.1.2
Source tag
To view or download the source code for CockroachDB v24.1.2 on Github, visit v24.1.2 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.1...v24.1.2
Enterprise edition changes
- Added error messages for unsupported Apache Pulsar changefeed sink parameters, e.g.
topic_prefix is not yet supported
. #124666 - Fixed a bug that was present since v22.2 where changefeeds with long-running initial scans might incorrectly restore checkpoint job progress and drop events during changefeed restarts 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.enabled
cluster setting was enabled. - The cluster settings
changefeed.frontier_checkpoint_frequency
andlow changefeed.frontier_highwater_lag_checkpoint_threshold
were 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). #124996
- The
Operational changes
- Improved disk usage metric reporting over volumes that dynamically change their size over the life of the
cockroach
process. #125050 - The default values for the following cluster settings were updated from
100000
to7500
. These settings control the maximum number of fingerprints (distinct combinations of statements and transactions) CockroachDB can store in memory, with stats being flushed on a10m
interval by 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. cockroachdb/cockroach#125554
DB Console changes
- The favicon now renders properly for DB Console, along with other image files. #122706
Bug fixes
SHOW TYPES
now includes user-defined composite types. It had omitted those types ever since composite types were added in v23.1. #124817- Fixed a crash introduced in v24.1.0-beta.2 that could occur when planning statistics collection on a table with a virtual computed column using a user-defined type when the cluster setting
sql.stats.virtual_computed_columns.enabled
(introduced in v24.1.0-alpha.1) was set totrue
. #124996 - Fixed handling in the declarative schema changer when columns are included in the
STORING()
clause of aCREATE INDEX
statement. CockroachDB now checks if the column is virtual up-front, and properly detects when a column is already handled by an existingINDEX
when the column name has UTF-8 characters. #125153 - Fixed a bug where a change to a user-defined type 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 anALTER TYPE
statement, or indirectly from anALTER DATABASE ... ADD REGION
orDROP REGION
statement (which implicitly changes thecrdb_internal_region
type). This bug had existed since UDTs were introduced in v20.2. #124810 - Fixed a bug where telemetry logs had the same statement fingerprint ID for different SQL statements. #125000
- Fixed an issue where adding a column with a default value of an empty array would not succeed. #125325
ALTER TABLE ... ADD CONSTRAINT UNIQUE
will now fail with a well-formed error message and code42601
if a statement tries to add a unique constraint on an expression. #125417- Fixed a bug where the
public
schema would be created with the wrong owner. Previously theadmin
role would own thepublic
schema. Now, the database owner is also the owner of thepublic
schema. The owner can be altered after the schema is created. #125533 - Fixed a bug in v24.1, v23.2, and v23.1 where using the
changefeed.aggregator.flush_jitter
cluster setting with themin_checkpoint_frequency
option set to0
could cause panics. #125459 - The log message
"expiration of liveness record ... is not greater than expiration of the previous lease ... after liveness heartbeat"
is no longer generated. #125449 - Fixed a bug introduced in v23.2.0 in which CockroachDB would hit an internal error when evaluating
INSERT
s intoREGIONAL BY ROW
tables where the source was aVALUES
clause with a single row and at least one boolean expression. #126209
Performance improvements
- Improved the efficiency of error handling in the vectorized execution engine to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts. #124996
- Some privilege checks when scanning the
crdb_internal.system_jobs
internal table now happen once before the scan, instead of once for each row. This improves performance for queries that read fromcrdb_internal.system_jobs
. #125250
Miscellaneous
- A changefeed optimization to reduce duplicates during aggregator restarts has been disabled due to poor performance. #124996
Contributors
This release includes 78 merged PRs by 35 authors.
v24.1.1
Release Date: June 14, 2024
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.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:
docker pull cockroachdb/cockroach:v24.1.1
Source tag
To view or download the source code for CockroachDB v24.1.1 on Github, visit v24.1.1 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0...v24.1.1
Enterprise edition changes
- Fixed a bug introduced in v22.2 where a changefeed with a long-running initial scan might incorrectly restore checkpoint job progress and drop events during a changefeed restart 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.enabled
cluster setting was enabled (in clusters running v23.2 and later). - The cluster settings
changefeed.frontier_checkpoint_frequency
andlow changefeed.frontier_highwater_lag_checkpoint_threshold
were 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). #123967
- The
- History retention jobs created upon completion of cluster replication no longer erroneously indicate that they failed when they expire. #124055
SQL language changes
- The optimizer can now plan constrained scans over partial indexes in more cases, particularly on partial indexes with predicates referencing virtual computed columns. #123468
- The storage parameter
ttl_delete_rate_limit
, which determines the rate limit for deleting expired rows, is now set to100
by default. #124354 - CockroachDB no longer limits precision when converting spatial data types to JSON. #124536
- The
optimizer_push_offset_into_index_join
session setting has been added. When enabled, the optimizer 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. #124490 - The default value of the
sql.defaults.results_buffer.size
cluster setting has been changed from 16KiB to 512KiB. This reduces the chance that clients usingREAD COMMITTED
transactions will encounter errors that cannot automatically be retried within CockroachDB. #124633
Operational changes
- The default values for the cluster settings
sql.metrics.max_mem_stmt_fingerprints
andsql.metrics.max_mem_txn_fingerprints
have been changed from100000
to5000
, thus lowering the default limits for in-memory statement and transaction fingerprints. #123430 - The new
sql.pgwire.pipeline.count
gauge metric shows 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. #124256 - The
client_authentication_ok
andclient_session_end
messages are now logged to theSESSIONS
log channel unconditionally. Previously, these would be logged only if theserver.auth_log.sql_sessions.enabled
cluster setting was set totrue
. All otherSESSIONS
log messages are logged only ifserver.auth_log.sql_sessions.enabled
orserver.auth_log.sql_connections.enabled
are set totrue
. To prevent logging ofclient_authentication_ok
orclient_session_end
messages, you can optionally disable theSESSIONS
log channel. #124369
DB Console changes
- Fixed a bug where the replication lag metric would falsely report high lag for multi-node clusters and on cutover. #123585
- Fixed a bug that caused SQL Activity entries sorted by
% of Runtime
to be sorted incorrectly. #123903 - 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. #124509
- The Overload dashboard now includes descriptions for all metrics. #124509
- Metrics on the Overload dashboard 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 admission control queues are seeing requests waiting; 3. More advanced metrics about system health (goroutine scheduler, L0 sublevels, etc.). #124509
- New metrics
cr.store.storage.l0-sublevels
andcr.node.go.scheduler_latency-p99.9
on the Overload dashboard provide better visibility into overloaded resources. #124509 - 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). #124509
Bug fixes
- Fixed a bug that would occur when
ALTER TYPE ... DROP VALUE
is followed byDROP SCHEMA CASCADE ...
in the same transaction. Previously, theALTER TYPE
schema 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. #123577 - 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. #123668 - Fixed a bug where a failed
RESTORE
could not be retried without manual intervention. #123205 - Fixed a bug introduced in alpha versions of v23.1 where calling a routine could result in an unexpected
function ... does not exist
error. 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. #123516 - Fixed a rare bug where a lease transfer could lead to a
side-transport update saw closed timestamp regression
panic. The bug could occur when a node was overloaded and failing to heartbeat its node liveness record. #123533 - Fixed a crash introduced in v24.1.0-beta.2 that could occur when planning statistics collection on a table with a virtual computed column using a user-defined type when the newly-introduced cluster setting
sql.stats.virtual_computed_columns.enabled
is set totrue
. (The setting was introduced in v24.1.0-alpha.1, and defaults totrue
.) #124060 - Fixed a bug where an
ALTER TABLE ... ALTER PRIMARY KEY
statement could hang if the table had any indexes that were referred to by views or functions using theFORCE INDEX
clause. #124323 - Fixed a bug introduced in v24.1.0 where the
max_decimal_digits
argument of thest_geojson
builtin function was ignored and the default was used instead. #124502 - 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. #124453
- Fixed a bug where, if the
ttl_row_stats_poll_interval
storage parameter was non-zero for a table with row-level TTL 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_rows
andjobs.row_level_ttl.total_expired_rows
metrics will report0
if the job finishes before the row stats queries complete. #124627 - Fixed a bug where a
DROP ROLE
orDROP USER
command could leave references behind inside types, which could prevent subsequentSHOW GRANTS
commands from working. #124619 - Fixed a bug where the
results_buffer_size
session variable could not be configured by using the "options" query parameter in the connection string, but only as a top-level query parameter. Now,results_buffer_size
can be configured in either part of the connection string. This variable still cannot be changed with theSET
command after the session begins. #124775 - Fixed a bug introduced in v20.2 where a change to a user-defined type 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 anALTER TYPE
statement, or indirectly from anALTER DATABASE ... ADD REGION
orDROP REGION
statement (which implicitly change thecrdb_internal_region
type). #124856
Performance improvements
- Improved the efficiency of error handling in the vectorized execution engine in order to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts. #123499
- Due to its poor performance, a changefeed optimization that aimed to reduce duplicates during aggregator restarts due to its bad performance has been disabled. #123595
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:
docker pull cockroachdb/cockroach:v24.1.0
Source tag
To view or download the source code for CockroachDB v24.1.0 on Github, visit v24.1.0 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-rc.2...v24.1.0
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 New in v24.1.
- 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 Licensing FAQ.
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 failover the store's write-ahead log (WAL) to another store's data directory. This feature is in preview. |
24.1 | |||
Autocommit DDL In 24.1 we have added the |
24.1 | |||
Statistics for virtual computed columns CockroachDB now collects statistics for virtual computed columns, 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 Pebble improvements are now on by default, leading to a reduction in write amplification. Of particular note, a vast majority of range snapshots previously ingested into L0 are now ingested directly into L6 in the LSM, 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 Mux rangefeed is a subsystem that improves the performance of rangefeeds 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 Azure Event Hub, 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 sink for Google Cloud Pub/Sub is GA. |
24.1 | |||
Filter changefeed messages based on cluster, SQL session, or row-level TTL jobs Use the |
24.1 | |||
Set Kafka quotas per changefeed For Kafka sinks, 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 Physical Cluster Replication 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 Physical Cluster Replication overview 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 Private connectivity using Private Service Connect is now available in preview for CockroachDB Dedicated clusters on GCP. For more information, refer to Establish Private Connectivity 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 values in the Subject field of the X.509 certificate used for TLS authentication. Subject mapping is useful if:
|
24.1 |
Migrations
Feature | Availability | |||
---|---|---|---|---|
Ver. | Self-Hosted | Dedicated | Serverless | |
MOLT Fetch 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:
For more information, you can also view a video demo. |
24.1 | |||
Read Committed Isolation in GA Read Committed isolation is now GA. Under 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 |
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 |
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 new regions, 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 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 release note. |
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 Prometheus-compatibile metric scrape endpoint for CockroachDB Dedicated is generally available. |
All* | |||
Export CockroachDB Dedicated metrics to Azure Monitor CockroachDB Dedicated supports exporting metrics to Azure Monitor in limited access. Contact your Cockroach Labs account team for access. |
All* | |||
Export CockroachDB Dedicated logs to Azure Monitor CockroachDB Dedicated supports exporting logs to Azure Monitor 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 upgrading to CockroachDB v24.1, be sure to review the following backward-incompatible changes, as well as key cluster setting changes, and adjust your deployment as necessary.
AS OF SYSTEM TIME
queries can no longer use a timestamp followed by a question mark to signify a future-time value. This was an undocumented syntax. #116830- The
READ COMMITTED
isolation level now requires the cluster to have a valid enterprise license. Otherwise, transactions which are configured to run asREAD COMMITTED
will be upgraded toSERIALIZABLE
, as described in the next note. #120154 - The
sql.txn.read_committed_isolation.enabled
cluster setting is nowtrue
by default. As a result for enterprise users,READ COMMITTED
transactions are not automatically upgraded toSERIALIZABLE
, and will run asREAD COMMITTED
by default. On v23.2, refer to the Upgrades of SQL Transaction Isolation Level 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. #118479
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 the system.settings
table (select * from system.settings
) to view the non-default settings.
sql.txn.read_committed_isolation.enabled
is nowtrue
by default. When set totrue
, transactions use theREAD COMMITTED
isolation level if specified byBEGIN
/SET
commands.- If the cluster setting is
false
, as was the default in v23.2, suchREAD COMMITTED
transactions will instead run asSERIALIZABLE
. - To check whether any transactions are being upgraded to
SERIALIZABLE
, see the Upgrades of SQL Transaction Isolation Level graph in the DB Console."
- If the cluster setting is
- The
changefeed.balance_range_distribution.enabled
cluster setting is 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. #115166 - Added the cluster setting
security.client_cert.subject_required.enabled
which 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-name
andnode-cert-distinguished-name
properties. This setting applies to both RPC access and login via authCert. #122368 - The cluster setting
sql.contention.record_serialization_conflicts.enabled
is nowon
by default. As a result, any40001
error that contains conflicting transaction information will be recorded by the contention registry, improving the ability to troubleshoot. For more information, refer to the Insights page documentation. #116664 - The new cluster setting
storage.sstable.compression_algorithm
configures 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_threshold
allows 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#120509 - The new
server.max_open_transactions_per_gateway
cluster setting, 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. #118781 - The new
server.redact_sensitive_settings.enabled
cluster setting (false
by default), when set totrue
, redacts the values of the following settings in the output ofSHOW
commands or other introspection interfaces. In the future, newly-added sensitive cluster settings will be redacted as well. Users with theMODIFYCLUSTERSETTING
privilege can always view the unredacted settings. #117729 - The new boolean changefeed option
ignore_disable_changefeed_replication
, when set totrue
, prevents the changefeed from filtering events even if CDC filtering is configured via thedisable_changefeed_replication
session variable,sql.ttl.changefeed_replication.disabled
cluster setting, or thettl_disable_changefeed_replication
table storage parameter. #120255 - 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_bandwidth
will 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.enabled
defaults totrue
. - Removed in v24.1:
sql.show_ranges_deprecated_behavior.enabled
sql.trace.session_eventlog.enabled
changefeed.balance_range_distribution.enabled
Deprecations
changefeed.balance_range_distribution.enable
is 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.enable=true
. It does not requireinitial_scan='only'
, which was required by the old setting. #115166- The
cockroach connect
command has been removed. This command was deprecated in CockroachDB v23.2. #113893
Known limitations
For information about new and unresolved limitations in CockroachDB v24.1, with suggested workarounds where applicable, refer to Known Limitations.
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 | Migration Overview | 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 | Architecture Overview | This page provides a starting point for understanding the architecture and design choices that enable CockroachDB's scalability and consistency capabilities. |
Docs | SQL Feature Support | The page summarizes the standard SQL features CockroachDB supports as well as common extensions to the standard. |
Docs | Change Data Capture Overview | 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 | Backup Architecture | 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, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-rc.2
Source tag
To view or download the source code for CockroachDB v24.1.0-rc.2 on Github, visit v24.1.0-rc.2 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-rc.1...v24.1.0-rc.2
Bug fixes
- Fixed a bug that was present since v22.2 where changefeeds with long-running initial scans might incorrectly restore checkpoint job progress and drop events during changefeed restarts 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.enabled
cluster setting was enabled (in clusters running v23.2 and later). - The cluster settings
changefeed.frontier_checkpoint_frequency
andlow changefeed.frontier_highwater_lag_checkpoint_threshold
were 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). #123968
- The
- Fixed a crash introduced in v24.1.0-beta.2 that could occur when planning statistics collection on a table with a virtual computed column using a user-defined type and the
sql.stats.virtual_computed_columns.enabled
cluster setting is set totrue
.sql.stats.virtual_computed_columns.enabled
was introduced in v24.1.0-alpha.1 astrue
by default and introduced in v23.2.5 asfalse
by default. #124064
Contributors
This release includes 3 merged PRs by 3 authors.
v24.1.0-rc.1
Release Date: May 8, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-rc.1
Source tag
To view or download the source code for CockroachDB v24.1.0-rc.1 on Github, visit v24.1.0-rc.1 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-beta.3...v24.1.0-rc.1
SQL language changes
- Added a new session setting
optimizer_use_improved_multi_column_selectivity_estimate
, which if enabled, causes the optimizer to use an improved selectivity estimate for multi-column predicates. This setting will default totrue
on v24.2 and later, andfalse
on earlier versions. #123106
Operational changes
- Added two new metrics:
range.snapshots.upreplication.rcvd-bytes
counts the number of Raft recovery snapshot bytes received, andrange.snapshots.upreplication.sent-bytes
counts the number of Raft recovery snapshot bytes sent. Also updatedrange.snapshots.recovery.rcvd-bytes
andrange.snapshots.recovery.sent-bytes
to only include Raft snapshots. A new line was added to the Snapshot Data Received graph. #123055
DB Console changes
- Added a Replication Lag graph to the Physical Cluster Replication dashboard to measure replication lag between primary and standby clusters using physical cluster replication. #123285
Bug fixes
- Fixed a bug that caused the Tables and Table Details pages in the DB Console to display an incorrect value for Table Stats Last Updated. #122816
- Fixed a bug in the DB Console's Custom Chart 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. #122705
- Fixed a bug introduced in v22.2 that could cause the internal error
attempting to append refresh spans after the tracked timestamp has moved forward
in some edge cases. #123136 - Fixed a bug where a
TYPEDESC SCHEMA CHANGE
job could retry forever if the descriptor it targeted was already dropped. #123273 - Fixed a bug where, if the legacy schema changer was enabled, the
CREATE SEQUENCE
command would incorrectly require the user to have theCREATE
privilege on the parent database rather than only on the parent schema.#123289 - Fixed a bug where a job would fail if it reported an out-of-bound progress fraction. The error is now logged and no longer causes the job to fail. #122965
Performance improvements
- Added a new session setting
optimizer_use_improved_zigzag_join_costing
. When enabled and when the cluster settingenable_zigzag_join
is 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.#123106 - Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the optimizer from choosing a bad query plan due to over-estimating the selectivity of a multi-column predicate. #123106
- Improved the efficiency of error handling in the vectorized execution engine, to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts. #123501
- Disabled a poorly-performing changefeed optimization that was intended to reduce duplicates during aggregator restarts. #123597
Contributors
This release includes 57 merged PRs by 24 authors.
v24.1.0-beta.3
Release Date: April 30, 2024
Downloads
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
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-beta.3
Changelog
View a detailed changelog on GitHub: v24.1.0-beta.2...v24.1.0-beta.3
SQL language changes
- Updated the
SHOW GRANTS
responses to display theobject_type
andobject_name
, which has replaced therelation_name
column. #122823 - Added external connection granted privileges to the
SHOW GRANTS
command. #122823 - Introduced three new cluster settings for controlling table statistics forecasting:
sql.stats.forecasts.min_observations
is the minimum number of observed statistics required to produce a forecast.sql.stats.forecasts.min_goodness_of_fit
is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.sql.stats.forecasts.max_decrease
is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation. #122459
Bug fixes
- Fixed a bug that could lead to descriptors having privileges to roles that no longer exist. Added an automated clean up for dropped roles inside descriptors. #122701
- Fixed a bug where client certificate authentication combined with identity maps (
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 connection string. #122738 - Fixed a bug where the row-based execution engine could drop a
LIMIT
clause when there was anORDER BY
clause, and the ordering was partially provided by an input operator. For example, this bug could occur with an ordering such asORDER BY a, b
when the scanned index was only ordered on columna
. The impact of this bug was that more rows may have been returned than specified by theLIMIT
clause. This bug is only present when not using the vectorized execution engine. That is, when running withSET vectorize = off;
. This bug has existed since CockroachDB v22.1. #122837 - Previously, CockroachDB could run into an internal error when evaluating PL/pgSQL routines with nested blocks. The bug is only present in 24.1.0-beta versions. This bug is now fixed. #122939
- Fixed a bug where
UPDATE
andUPSERT
queries with a subquery were sometimes inappropriately using implicitFOR UPDATE
locking within the subquery. This bug has existed since implicitFOR UPDATE
locking was introduced in v20.1. #121391 - Dropping and adding a column with the same name no longer results in a
"column already exists error"
. #122631 - Fixed a bug that could cause an internal error of the form
invalid datum type given: ..., expected ...
when aRECORD
-returning user-defined function, used as a data source, was supplied a column definition list with mismatched types. This bug has existed since v23.1. #122305 - Fixed a bug that could result in an internal error when attempting to create a PL/pgSQL routine using the (unsupported)
%ROWTYPE
syntax for a variable declaration. Now, an expected syntax error is returned instead. #122966 - Fixed a bug that could result in an assertion error during evaluation of PL/pgSQL routines that invoke procedures while using
DEFAULT
arguments. The bug was present in v24.1.0-beta releases and is now fixed. #122943 - Previously, privileges granted for external connections were displaying in
SHOW SYSTEM GRANTS
with no associated object name. Now these privileges are no longer displayed. Instead, the statementSHOW GRANTS ON EXTERNAL CONNECTION
should be used to view external connection privileges with their associated object name. #122857 - Statistics forecasts of zero rows can cause suboptimal query plans. Forecasting will now avoid predicting zero rows for most downward-trending statistics. #122459
- Fixed a bug introduced in v23.2 that could cause a PL/pgSQL variable assignment to not be executed if the variable was never referenced after the assignment. #123045
Performance improvements
- More efficient query plans are now generated for queries with text similarity filters, for example,
text_col % 'foobar'
. These plans are generated if theoptimizer_use_trigram_similarity_optimization
session setting is enabled. It is disabled by default. #122838 - The optimizer now costs
distinct-on
operators more accurately. It may produce more efficient query plans in some cases. #122850 - Improved the speed for optimization of some statements using
GROUP BY
orDISTINCT
orON CONFLICT
by skipping the optimizer ruleSplitGroupByScanIntoUnionScans
when it is not needed. #123034
Contributors
This release includes 56 merged PRs by 25 authors.
v24.1.0-beta.2
Release Date: April 24, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-beta.2
Source tag
To view or download the source code for CockroachDB v24.1.0-beta.2 on Github, visit v24.1.0-beta.2 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-beta.1...v24.1.0-beta.2
Security updates
- Added the cluster setting
security.client_cert.subject_required.enabled
that 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-name
andnode-cert-distinguished-name
properties. This setting applies to both RPC access and login via authCert. #122368
Bug fixes
- Fixed a bug where table statistics were sometimes not collected on tables that have virtual computed columns of a user-defined type when the
sql.stats.virtual_computed_columns.enabled
cluster 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. #122320
Contributors
This release includes 52 merged PRs by 28 authors.
v24.1.0-beta.1
Release Date: April 17, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-beta.1
Source tag
To view or download the source code for CockroachDB v24.1.0-beta.1 on Github, visit v24.1.0-beta.1 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-alpha.5...v24.1.0-beta.1
SQL language changes
SHOW JOBS
no longer displays some internal retry counter columns (last_run
,next_run
,num_runs
) and now only shows thestatement
,trace_id
, andexecution_errors
columns when inspecting a specific job ID or IDs. #121286SHOW JOBS
now shortens long job descriptions to 100 characters to make the table easier to read while the full description and statement can be inspected usingSHOW JOB
orSHOW JOBS
on specific job IDs. #121286- Extended
pg_depend
to include dependencies between UDFs. #121313 - With
sql_safe_updates
set totrue
,SELECT FOR UPDATE
andSELECT FOR SHARE
statements now return an error if they do not contain either aWHERE
clause or aLIMIT
clause. Also,UPDATE
andDELETE
statements withoutWHERE
clauses but withLIMIT
clauses now bypasssql_safe_updates
, which better matches MySQL behavior. #121466 - Added support for PL/pgSQL
CALL
statements. It is now possible to call a stored procedure from a PL/pgSQL routine. #121743 DEFAULT
expressions for input parameters of user-defined functions and stored procedures are now supported. #121811
Command-line changes
- The
--enterprise-encryption
flag now accepts the special valuepath=*
to apply the specified keys to all stores. #121111
DB Console changes
- The Commit Latency chart in the Changefeeds dashboard now aggregates by max instead of by sum for multi-node changefeeds. This more accurately reflects the amount of time for events to be acknowledged by the downstream sink. #120787
- Introduced a license expiration message in the DB Console 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. #120830
- The Jobs table page no longer includes two columns related to a deprecated internal implementation detail (last execution time and execution count). #121286
- The timeseries graphs shown on the SQL Activity statement details page in the DB Console will now render properly, after fixing a bug related to setting the time range of the charts. #121461
- Index recommendations 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");
. #122120
Bug fixes
- Sequence options for
NO MINVALUE
andNO MAXVALUE
now match PostgreSQL behavior. SequenceMINVALUE
andMAXVALUE
automatically adjust to new types bounds mirroring behavior of PostgreSQL. #121310 - 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-memory
flag, 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. #121873 - CockroachDB could previously incorrectly evaluate
IN
expressions that hadINT2
orINT4
type 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. #121954 - Fixed a slow memory leak in the deprecated Pub/Sub changefeeds, 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. #121867
Contributors
This release includes 134 merged PRs by 36 authors.
v24.1.0-alpha.5
Release Date: April 1, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-alpha.5
Source tag
To view or download the source code for CockroachDB v24.1.0-alpha.5 on Github, visit v24.1.0-alpha.5 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-alpha.4...v24.1.0-alpha.5
Enterprise edition changes
- Changefeeds 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 cluster setting
changefeed.random_replica_selection.enabled
tofalse
. If disabled, changefeed planning reverts to its previous behavior for distributing work. #120077 - When physical cluster replication is enabled, the output of the
SHOW VIRTUAL CLUSTER ... WITH REPLICATION STATUS
command now displays replication lag. #120782 - When physical cluster replication is enabled, the output of the
SHOW VIRTUAL CLUSTER WITH REPLICATION STATUS to 1
command has changed:- The output no longer displays
replication_job_id
orservice_mode
return fields. - The
data_state
field has been renamed tostatus
. - The fields that are displayed are now ordered as follows:
retained_time
,replicated_time
,replication_lag
,cutover_time
,status
. #120782
- The output no longer displays
- You can now run physical cluster replication from an existing CockroachDB cluster, without cluster virtualization enabled, to a standby cluster with cluster virtualization enabled. #122001
SQL language changes
- You can now specify a condition for the PL/pgSQL statements
EXIT
andCONTINUE
. #120686 - A stored procedure can now invoke another stored procedure using a
CALL
statement. #120674 - You can now use a
SET TRANSACTION
statement within a PL/pgSQL stored procedure to configure the transaction isolation level, timestamp, or priority, or to set the transaction to read-only. ASET TRANSACTION
statement must immediately follow aCOMMIT
orROLLBACK
, with no other statements or block boundaries between them. #120456 - The new session variable
optimizer_use_virtual_computed_column_stats
, when enabled, configures the cost-based optimizer to use table statistics on virtual computed columns. #120668 An identity column can now drop the
IDENTITY
constraint and related sequence using the following SQL statement:ALTER TABLE {table_name} ALTER COLUMN {column_name} DROP IDENTITY [IF EXISTS];
IF EXISTS
is optional, and skips the command if the column is not an identity column. #119263A shared lock that is acquired explicitly using
SELECT FOR SHARE
or implicitly by a read-committed transaction, can now be re-acquired with higher strength by either using aSELECT FOR UPDATE
statement or by writing to the key. #119671Stored procedures now support
OUT
andINOUT
parameter classes. #120851The PL/pgSQL
EXIT
andCONTINUE
statements can now use labels to specify which loop or block is the target. #120733
Operational changes
- You can now enable asynchronous buffering of
file-group
log sinks using thebuffering
configuration options either by default or to an individualfile-group
. Thebuffering
configuration option is incompatible with thebuffered-writes
configuration option. To try thebuffering
option, you must setbuffered-writes: false
. Cockroach Labs recommends settingmax-staleness
to1s
andflush-trigger-size
to256KiB
. #120428 - A minimum Raft scheduler 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. #120162
- The new metrics
kv.split.estimated_stats
andkv.split.total_bytes_estimates
track the number of splits that produce MVCC statistic estimates and the total bytes of estimates produced. #119894 - The new cluster setting
storage.sstable.compression_algorithm
configures the compression algorithm used when compressing sstable blocks. #120784 - The new cluster setting
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. #117340 - The new startup flag
--wal-failover
allows you to explicitly set the path for WAL failover of a single-store node. #120783 - Cluster virtualization is now enabled using either of the new startup flags
--virtualized
or--virtualized-empty
instead of the--config-profile
flag. #120813 - 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. #120709
The following new metrics track the number and outcome of proxy requests when
kv.dist_sender.proxy.enabled
is set totrue
:distsender.rpc.proxy.sent
distsender.rpc.proxy.err
distsender.rpc.proxy.forward.sent
distsender.rpc.proxy.forward.err
Cockroach Labs recommends monitoring and alerting on
distsender.rpc.proxy.sent
, because it indicates a possible network partition. #120239The
provisioned-rate
field 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 the cluster settingkv.store.admission.provisioned_bandwidth
. To override this setting for a specific node, the storage specification must containprovisioned-rate=bandwidth={bandwidth-bytes/s}
. #120895Removal of the cluster setting
kv.rangefeed.scheduler.enabled
, which was announced in v24.1.0-alpha.1, has been reverted, and the cluster setting is reinstated. #121164
DB Console changes
- In generated statement fingerprints in the DB Console Statements page, lists with only literals or placeholders or similar subexpressions are shortened to their first item followed by "more". #120507
Bug fixes
- Fixed a bug introduced in v23.2 that could cause a PL/pgSQL routine to return incorrect results when the routine included:
- At least one parameter.
- An
IF
statement with one leak-proof branch and one branch with side effects. #120451
- Fixed a rare bug where a
BACKUP
command issued shortly after anALTER TABLE {table_name} SET (exclude_data_from_backup = true)
could exclude data from an unrelated table from the backup. #120188 - 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. #120806
- Fixed a bug where the
attname
for a dropped column was not correctly padded with 8.
characters to be compatible with PostgreSQL. #120861
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. #119894
- The cost-based optimizer now generates more efficient query plans for some queries with
OFFSET
clauses. #121160
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, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-alpha.4
Source tag
To view or download the source code for CockroachDB v24.1.0-alpha.4 on Github, visit v24.1.0-alpha.4 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-alpha.3...v24.1.0-alpha.4
Security updates
- When configuring logs,
file-permissions
are now applied literally, such thatfile-permissions: 644
will 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-permissions
field was used to create files, meaning the resulting permissions did not match those specified in the log configuration. #120669
General changes
The following metrics 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.iopsinprogress
The metrics match the definitions of the
sys.host.disk.*
system metrics. #119885
Enterprise edition changes
server.controller.default_target_cluster
can now be set to any virtual cluster name by default, including a virtual cluster yet to be created or have service started. #120080- The
READ COMMITTED
isolation level now requires the cluster to have a valid enterprise license. #120154 - The new boolean changefeed option
ignore_disable_changefeed_replication
, when set totrue
, prevents the changefeed from filtering events even if CDC filtering is configured via thedisable_changefeed_replication
session variable,sql.ttl.changefeed_replication.disabled
cluster setting, or thettl_disable_changefeed_replication
table storage parameter. #120255
SQL language changes
- Added support for the PL/pgSQL
COMMIT
andROLLBACK
statements. #119647 - Identity columns now support enhanced sequence management through the
ALTER [COLUMN] column_name SET sequence_option
andALTER [COLUMN] column_name RESTART [WITH restart]
commands. This update facilitates the fine-tuning of identity column sequences. #119432 - It is now possible to use the
STRICT
option withSELECT ... INTO
andRETURNING ... INTO
in order to enforce that a SQL statement within a PL/pgSQL routine returns exactly one row. #120486 - Added a session setting
plpgsql_use_strict_into
, which causes PL/pgSQLSELECT ... INTO
andRETURNING ... INTO
to require exactly one row from the SQL statement, similar to Oracle behavior. #120486 - Added a new
failure_count INT NOT NULL
column 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. #120236 - The
FORCE_INVERTED_INDEX
hint causes the optimizer 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. #120384 - The
REPAIRCLUSTERMETADATA
privilege has been aliased toREPAIRCLUSTER
. Both names can be used interchangeably. #116844
Operational changes
- The new
cockroach start
option--wal-failover=among-stores
orCOCKROACH_WAL_FAILOVER=among-stores
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 preview. #120509 - The new
storage.wal_failover.unhealthy_op_threshold
cluster setting allows configuring the latency threshold at which a WAL write is considered unhealthy. #120509 - 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_activity
andsystem.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. #120522
- 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. #120522 - 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. #120522 - 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. #120522 - The
/_status/stores
endpoint now includesnode_id
,dir
, andwal_failover_path
fields to show the store's node ID, data directory, and path to the configured WAL failover secondary, if configured. #120677
Command-line changes
- The new
--go-gc-percent
flag of thecockroach start
command controls the garbage collection target percentage of the Go runtime, mirroring the existingGOGC
environment 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-memory
orGOMEMLIMIT
), 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 Hardware dashboard and an increase in Go total memory usage in the Runtime dashboard. This does not increase the risk of an out-of-memory exception (OOM), because the Go memory limit (controlled by the--max-go-memory
flag or theGOMEMLIMIT
environment variable) prevents Go from consuming too much memory. #119605
DB Console changes
- The Queues dashboard now includes lease queue metrics. #119386
- The DB Console SQL Activity Statement Fingerprint 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. #120236 - The DB Console now displays an alert message when a license has expired or will expire in fewer than 15 days. #120490
Bug fixes
- Fixed a bug with
DROP SCHEMA ... CASCADE
that could lead to dangling function references in other schemas accessing any functions. #119932 - Fixed a bug where a
RESTORE
of a backup that itself contained a table created by theRESTORE
of a table with an in-progressIMPORT INTO
would fail to restore all rows. #120414 - Fixed a bug where identity columns without any configured sequence options did not display the default values for identity attributes in
information_schema
. #119459 - Fixed a bug where a
GRANT ... ON ALL TABLES
statement could fail if sequences existed and they did not support a privilege (e.g.,BACKUP
). #120685 - Fixed a bug where an
EXPLAIN (DDL)
statement would generate event log entries for schema changes that were not executed. #120563
Contributors
This release includes 153 merged PRs by 179 authors.
v24.1.0-alpha.3
Release Date: March 18, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-alpha.3
Source tag
To view or download the source code for CockroachDB v24.1.0-alpha.3 on Github, visit v24.1.0-alpha.3 source tag.
Changelog
View a detailed changelog on GitHub: v24.1.0-alpha.2...v24.1.0-alpha.3
Enterprise edition changes
cockroach gen encryption-key
now accepts a--version=2
parameter. Version 2 keys activate a new encryption implementation with improved performance. This is expected to become the default in CockroachDB v24.2. #119913
SQL language changes
- Mutation statements such as
UPDATE
andDELETE
as well as locking statements such asSELECT FOR UPDATE
are not allowed in read-only transactions orAS OF SYSTEM TIME
transactions. This fixes an oversight where CockroachDB was allowing mutation statements and locking statements in implicit single-statement transactions usingAS OF SYSTEM TIME
. #120097 - Added support for
RETURN
statements with no expression for routines withOUT
parameters and routines with aVOID
return type. #120043 ALTER COLUMN
can now change columns to an identity column by using the syntax in one of the following:ALTER TABLE t ALTER COLUMN c ADD GENERATED ALWAYS AS IDENTITY [( <opt_sequence_option_list> )] ALTER TABLE t ALTER COLUMN c ADD GENERATED BY DEFAULT AS IDENTITY[( <opt_sequence_option_list> )]
Identity columns can have their identity type altered by using the syntax in one of the following statements:
ALTER TABLE t ALTER COLUMN c SET GENERATED ALWAYS ALTER TABLE t ALTER COLUMN c SET GENERATED BY DEFAULT
crdb_internal.leases
is now behind theVIEWCLUSTERMETADATA
privilege. #120014PL/pgSQL blocks can now be nested in a block that has an exception handler. #120045
DB Console changes
- Resolved an issue where clusters with multiple stores per node may list inaccurate region/node information in the Databases page. #119260
VIEW
type tables will no longer display in the DB Console Databases pages. Previously these would be listed with no information, only displaying errors. #119890- Fixed an intermittent page crash in the Schema Insights tab. #120137
- Fixed a bug where the Rows written value was incorrectly showing the Rows read value on the Insights page. #120145
Bug fixes
- Fixed a bug that occurred when using
ALTER TABLE
to drop and re-add aCHECK
constraint with the same name. #120008 - Fixed a bug in which it was possible to
SET transaction_read_only = false
during anAS OF SYSTEM TIME
transaction. #120097 - 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. #119799
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, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-alpha.2
Source tag
To view or download the source code for CockroachDB v24.1.0-alpha.2 on Github, visit v24.1.0-alpha.2 source tag.
Security updates
- DB Console
session
cookie is now markedHttpOnly
to prevent it from being read by any JavaScript code. #119261 - DB Console cookies are now marked
Secure
for the browser when the cluster is running in secure mode. #119261
General changes
- Gateways will now detect faulty or stalled replicas and use other replicas instead, which can prevent them getting stuck in certain cases (e.g., with disk stalls). This behavior can be disabled via the cluster setting
kv.dist_sender.circuit_breaker.enabled
. #118943
Enterprise edition changes
- Added a new
ALTER ROLE ... SUBJECT
option. 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. #119135 - Changefeeds support a new scheme
azure-event-hub://
for Kafka data streaming to Azure event hubs. ThesinkURL
must include mandatory parametersshared_access_key_name
andshared_access_key
. By default and as required, the optionstls_enabled=true
,sasl_handshake=true
,sasl_enabled=true
, andsasl_mechanism=PLAIN
are applied, as they are the only supported options. Other parameters such astopic_name
andtopic_prefix
are also supported. An example URI is:azure-event-hub://myeventhubs.servicebus.windows.net:9093?shared_access_key_name=abc&shared_access_key=123
. #115806
SQL language changes
- Added an option for node-level sequence caching. All the sessions on the node can share the same cache, which can be concurrently accessed. The
serial_normalization
session variable can now be set to the valuesql_sequence_cached_node
. If this value is set, the cluster settingsql.defaults.serial_sequences_cache_size
can be used to control the number of values to cache in a node, with a default of 256. ThePER NODE CACHE
sequence 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. #118546
Bug fixes
- Fixed a bug that prevented the use of PL/pgSQL routines with complex variable names that require double quotes. This bug had existed since v23.2. #119034
- Fixed a bug that could cause creation of a syntactically invalid PL/pgSQL routine to return the wrong error. This bug had existed since v23.2. #119034
- Fixed a bug that could result in a syntax error if a PL/pgSQL routine was created with an escaped string constant in the routine body. This bug had existed since v23.2. #119034
- Fixed a bug where running a changefeed that targets a table with a user-defined type column and with the
envelope
option set to any value other thanwrapped
would cause a node panic due to a nil dereference. #119639 - Fixed a bug where running
RESTORE
on certain backups would open a very large number of connections to the backup storage provider. #119840 - Previously, a user with the
VIEWACTIVITYREDACTED
privilege could see constants inside of queries that originated from other users in theSHOW SESSIONS
output. This information is now properly redacted. #119820 - Previously, the
SHOW QUERIES
andSHOW STATEMENTS
commands incorrectly required the user to have theVIEWACTIVITY
orVIEWACTIVITYREDACTED
privilege. This is now fixed, as a user should always be able to view their own queries, even without this privilege. #119820
Contributors
This release includes 1939 merged PRs by 109 authors.
v24.1.0-alpha.1
Release Date: March 7, 2024
Downloads
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:
docker pull cockroachdb/cockroach-unstable:v24.1.0-alpha.1
Source tag
To view or download the source code for CockroachDB v24.1.0-alpha.1 on Github, visit v24.1.0-alpha.1 source tag.
Backward-incompatible changes
AS OF SYSTEM TIME
queries can no longer use a timestamp followed by a question mark to signify a future-time value. This was an undocumented syntax. #116830
Enterprise edition changes
ALTER CHANGEFEED
no longer removes a CDC query when modifying changefeed properties. #116498changefeed.balance_range_distribution.enable
is 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.enable=true
. It does not requireinitial_scan='only'
, which was required by the old setting. #115166- CDC queries now correctly handle the
changefeed_creation_timestamp
function. #117520 - The new syntax
ALTER VIRTUAL CLUSTER virtual-cluster START REPLICATION OF virtual-cluster ON physical-cluster
can now be used to reconfigure virtual clusters previously serving as sources for physical cluster replication to become standbys to a promoted standby. This reverses the direction of replication while maximizing data reuse. #117656 BACKUP
s now load range information that is used to avoid a spike in metadata lookups when backups begin. #116520- Clusters created to run physical cluster replication no longer automatically disable the
spanconfig.range_coalescing.system.enabled
andspanconfig.range_coalescing.application.enabled
cluster settings. Users who started using physical cluster replication on v23.1 or v23.2 may wish to manually reset these settings. #119221 - Physical cluster replication is now always enabled, and the
physical_replication.enabled
cluster setting has been removed. #119149
SQL language changes
ALTER BACKUP SCHEDULE ... EXECUTE IMMEDIATELY
can now be used to set the next scheduled execution of the backup schedule to the current time. #112118- Fixed the SQL Activity 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. #112350
- Previously, user-defined composite types were not populated in two
pg_catalog
tables: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, thetyprelid
column in thepg_type
table has the properoid
for composite types. #111179 - The newly added built-in function
jsonb_array_to_string_array
no longer removesNULL
objects. It now includes them in the resulting array. #112975 - Changed the display for RU estimates shown in
EXPLAIN ANALYZE
from integer to float. This will prevent small estimates from being rounded to zero, which makes the estimate less confusing for cheap queries. #111986 - The
information_schema._pg_char_octet_length
built-in function is now supported, which improves compatibility with PostgreSQL. #111401 - The
pg_encoding_max_length
built-in function is now supported, which improves compatibility with PostgreSQL. #111401 - The
information_schema._pg_datetime_precision
built-in function is now supported, which improves compatibility with PostgreSQL. #111401 - The
information_schema._pg_interval_type
built-in function is now supported, which improves compatibility with PostgreSQL. #111401 information_schema.user_defined_types
is now populated with information about user-defined types, andinformation_schema.attributes
is now populated with information about the attributes of composite data types. #111401- The cost-based optimizer will no longer generate a constrained scan that only uses filters from a check constraint. This prevents cases where a constrained scan actually scans the entire table because the constraints aren't selective. #114332
- Reads rolled back by savepoints are now refreshable, matching the PostgreSQL behavior and avoiding potential serializability violations. #111424
- Implemented the postgis
ST_TileEnvelope
built-in function. #112971 - Added support for a third argument in the
array_position
built-in function. If provided, it gives the index from which to begin searching in the array. #112161 - Added the
bit_count
built-in function forBIT
andBYTES
types. #115273 - Added a
pg_backend_pid
column tocrdb_internal.node_sessions
andcrdb_internal.cluster_sessions
. This value corresponds to the numerical ID returned frompg_backend_pid
. #116673 - 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
BOOL
toINT
, were allowed without an explicit cast. #115442 - Added a new session setting,
optimizer_merge_joins_enabled
that, when true, instructs the cost-based optimizer to explore query plans with merge joins. The setting defaults totrue
. #116410 - CockroachDB now supports parsing queries like
SELECT FROM t
that only produce the row count and do not output any columns. #116835 - Added the
metaphone
built-in function, which converts a string to its Metaphone code. #110950 - The new
EXPIRATION WINDOW
option forALTER VIRTUAL CLUSTER
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. #117776 - The
SKIP LOCKED
clause is now allowed withSELECT ... FOR SHARE
. #117560 - Added configurable cluster settings 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_ALIVE
environment variable subsuming it. #115833 - Removed the
sql.trace.session_eventlog.enabled
cluster setting and the associated event log tracing. The information in these traces is still available in theDEV
log channel by enabling--vmodule=conn_executor=2
withcockroach start
. #117928 - The
array_agg
aggregate function can now support arrays as the input. Note that CockroachDB does not yet fully support nested arrays, andarray_agg
does not support nested arrays as inputs. #117838 - An execution statistic that measures "client time" is now included in
plan.txt
files of statement diagnostics bundles. Client time tracks how long the query execution was blocked on the client receiving the PGWire protocol messages. Note that when obtained viaEXPLAIN ANALYZE (DEBUG)
, client time does not make sense because in this variant the output rows are discarded and not communicated to the client. #117591 - Added the
trace_id
column to the response of theSHOW SESSIONS
command. #118002 - Added support for the
ENCODING
option ofCOPY
, as long as the encoding of'utf8'
is specified. #118010 - Added the
SHOW VARIABLES FOR ROLE
command, which allows the database administrator to easily view the default values for session variables applied to a given user. #117875 - The
sql.txn.read_committed_isolation.enabled
cluster setting is nowtrue
by default. This means that any syntax and settings that configure theREAD COMMITTED
isolation level will now cause the transaction to use that isolation level, rather than automatically upgrading the transaction toSERIALIZABLE
. #118479 - Added a new cluster setting,
sql.stats.virtual_computed_columns.enabled
, which when set enables collection of table statistics onVIRTUAL
computed columns. #118241 - Added the
autocommit_before_ddl
session variable. 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. #118440 CREATE SEQUENCE
is now enabled by default in the declarative schema changer. #117793- PL/pgSQL now supports nested blocks, with the following limitations: variable shadowing is disallowed, and exception handlers cannot be used in a routine with nested blocks. #117710
- The cluster setting
sql.index_recommendation.drop_unused_duration
is now public. #118676 - It is now possible to hint to the cost-based optimizer 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. #116013 - Add column
goroutine_id
to the response of theSHOW SESSIONS
command. #118644 - Introduced a new session setting,
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. #117910 - Added the
server.max_open_transactions_per_gateway
cluster setting. When set to a non-negative value, non-admin
users cannot execute a query if the number of transactions open on the current gateway node is already at the configured limit. #118781 - Added the
setseed
built-in function. It sets the seed for the random generator used by therandom
built-in function. #119042 OUT
andINOUT
parameter classes are now supported in user-defined functions. #118610- Out-of-process SQL servers will now start exporting a new
sql.aggregated_livebytes
metric. This metric gets updated once every 60 seconds by default, and its update interval can be configured via thetenant_global_metrics_exporter_interval
cluster setting. #119140 - Added support for index hints with
INSERT
andUPSERT
statements. This allowsINSERT ... ON CONFLICT
andUPSERT
queries to use index hints in the same way they are already supported forUPDATE
andDELETE
statements. #119104 - Added a new
ttl_disable_changefeed_replication
table storage parameter that can be used to disable changefeed replication for row-level TTL on a per-table basis. #119611
Operational changes
- The internal versions that are reported during cluster upgrades have been renamed for clarity. For example,
23.2-8
is now named23.2-upgrading-to-24.1-step-008
. #115223 - Introduced a new cluster setting,
server.jwt_authentication.jwks_auto_fetch.enabled
, enabling automatic fetching of JSON Web Key Sets (JWKS) 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
. #117054 - 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". #114746
- Introduced the
changefeed.emitted_batch_sizes
histogram metric that measures the batch sizes used when emitting data to sinks. This metric supports metrics labels. #115537 - Introduced metrics
log_fluent_sink_conn_attempts
,log_fluent_sink_write_attempts
, andlog_fluent_sink_write_errors
to enable more precise tracking of connection and write operations when logging to Fluentd-compatible network collectors. #116699 - The cluster setting
sql.contention.record_serialization_conflicts.enabled
is nowon
by default. This means any40001
errors that are returned containing conflicting transaction information will be recorded by the contention registry. #116664 - Removed the
kv.rangefeed.scheduler.enabled
cluster setting because the rangefeed scheduler is now unconditionally enabled. #114410 - Removed the
kv.rangefeed.catchup_scan_concurrency
cluster setting. Catchup scans are throttled viakv.rangefeed.concurrent_catchup_iterators
on a per-node basis. #114408 - Removed the
changefeed.mux_rangefeed.enabled
cluster setting because the functionality is enabled by default. #114408 - The gossip status Advanced Debug page now includes information about the server's high water timestamps for every other node it knows about in the gossip cluster. #117011
- Removed the
cockroach_rangefeed_rpc_initial_window_size
environment variable. The rangefeed connection now uses the same window size as other RPC connections. #117545 - Events for cluster setting changes are now emitted to the
OPS
channel rather than theDEV
channel. #117923 - The new environment variable
cockroach_rpc_use_default_connection_class
enables 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 Raft or rangefeed data. For more information, see additional release notes that reference this variable name. #117810 - In unredacted debug zips, the
crdb_internal.transaction_contention_events
table 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. #118478
- Transaction replay protection state is now passed between the outgoing and incoming leaseholder for a range during a lease transfer. This avoids cases where lease transfers can cause transactions to throw
TransactionAbortedError(ABORT_REASON_NEW_LEASE_PREVENTS_TXN)
errors. #118300 - CockroachDB will now automatically generate CPU profiles if there is an increase in CPU utilization. This can help inform investigations into possible issues. #118850
- Expanded the
--include-range-info
flag to include problem ranges. This flag still defaults totrue
. #119205
Command-line changes
- Debug zips no longer include redundant
hex_
columns for system tableBYTES
columns. #112033 - Added the
--follower-read-percent
flag, which determines the percent (0-100) of read operations that are follower reads, to thecockroach workload kv run
command. #113094 - The workload
schemachange
now writes a.otlp.ndjson.gz
archive containing OTLP trace bundles for debugging purposes. #114770 cockroach debug tsdump
creates atsdump.yaml
file. Thetsdump
raw format automatically creates the YAML file in the default location/tmp/tsdump.yaml
. Added a new flag--yaml
that allows users to specify the path to createtsdump.yaml
instead of using the default location. For example,cockroach debug tsdump --host <host>:<port> \ --format raw --yaml=/some_path/tsdump.yaml > /some_path/tsdump.gob
. #114046- Removed the
cockroach connect
command functionality. This was deprecated in CockroachDB v23.2. #113893 - Changed the SQL shell help URL to point to
cockroach-sql
. #118960 - Added a new
encode-uri
utility to make generating connection strings for use with Physical Cluster Replication easier. #119528
DB Console changes
- Store initialization now logs progress every 10 seconds showing the current and total number of replicas initialized. #115760
- Introduced a new Lease Preferences graph on the Replication dashboard. The Lease Preferences graph will indicate when the current leaseholder is not the first lease preference and where the current leaseholder satisfies no applied lease preference. #116709
- Updated the Statement Details page to always show the entire selected period, instead of just the period that had data. #118680
- Error messages displayed upon failure to load DB Console views now include information about the HTTP response status code, if one is present. #118782
- The Full Table/Index Scans chart in the SQL Metrics dashboard now shows the non-negative derivative of the number of full scans tracked. #118787
- The Overload dashboard 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. #118763
- The
txn.restarts.writetooold
metric in the Transaction Restarts graph under the SQL Dashboard now includes all restarts previously categorized astxn.restarts.writetoooldmulti
. The former is a now a superset of the latter. Thetxn.restarts.writetoooldmulti
metric will be removed in a future release. #119411
Bug fixes
- Fixed a bug that could cause an internal error during distributed execution for an expression like
CASE
that requires its inputs to be the same type with allNULL
inputs. #108892 - Fixed
NULL
input handling for the geospatial built-insst_pointfromgeohash
andst_geomfromgeohash
. #113781 - The geospatial
st_makeenvelope
built-in now correctly supportsxmin
orymin
to be greater thanxmax
orymax
, respectively. #113781 - Fixed a bug that could cause v23.1 nodes in clusters that had not finalized the v23.1 version upgrade to use excessive CPU retrying expected errors related to the incomplete upgrade state. #113864
- Debug zip now does not fail on corrupted log files. #113722
- Placeholder arguments can now be used in
SET TRANSACTION
statements. #113689 - Previously, when the session variable
use_declarative_schema_changer
was set tooff
,ALTER PRIMARY KEY
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 t
from working. #114354 - Previously, when the session variable was set to
use_declarative_schema_changer=off
and there was an attempt toALTER PRIMARY KEY
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 itskeySuffixColumn
after 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
. #114622 ALTER BACKUP SCHEDULE
can now be used to setupdates_cluster_last_backup_time_metric
without providing an explicit value, matching the behavior of the option when specified duringCREATE SCHEDULE FOR BACKUP
. #113523- Previously, if a table had secondary indexes that stored certain columns (
col
) using theSTORING
clause, followed by anALTER PRIMARY KEY
tocol
, an incorrect secondary index would persist. The secondary index would continue to have theSTORING
clause, 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
, theSTORING
clause is dropped on those secondary indexes. #115214 - Fixed a bug that caused uploads to object-locked buckets to fail because of the absence of an
MD5
hash. #115713 ALTER PRIMARY KEY
now preserves the name of the original primary index when the session variable isuse_declarative_schema_changer=off
. #115338- Fixed a bug where the
unique-without-index-not-valid
constraint added to a table would cause thecreate_statement
fromSHOW CREATE t
to not be executable and error withunique constraint cannot be NOT VALID
. #115354 - Fixed a bug where an empty full backup followed by non-empty incremental backups taken inside an application tenant might not allow a restore due to the use of an incorrect SQL codec. #116316
- Fixed a bug in the row-level TTL job that would cause it to skip expired rows if the primary key of the table included columns of the collated
STRING
orDECIMAL
type. #116988 - Incorrectly labeled PL/pgSQL blocks now return an expected syntax error. #117608
CREATE EXTERNAL CONNECTION IF NOT EXISTS
no longer returns an error if the connection already exists. #117312- CockroachDB now correctly uses the histograms on columns of collated
STRING
type. The bug has been present since before v22.1. #117714 - Improved an interaction during range lease transfers that could cause
RETRY_ASYNC_WRITE_FAILURE
errors to be returned to clients. #117840 - Backfilling tables for
CREATE TABLE AS
orCREATE MATERIALIZED VIEW
could get into a retry loop if data was deleted and those jobs took longer than the GC TTL. #117877 - Decommissioning replicas that are part of a mis-replicated range will no longer get stuck on a rebalance operation that was falsely determined to be unsafe. #117900
- A memory leak within the insights system was found to occur when
sql.metrics.transaction_details.enabled
was disabled, while leavingsql.metrics.statement_details.enabled
enabled. This patch fixes the memory leak by preventing the collection of further statement and transaction insights whensql.metrics.transaction_details.enabled
is disabled. #117709 - Fixed a rare panic that could happen during a
pg_dump
import that contains a function that has a subquery in one of its arguments, likeSELECT addgeometrycolumn(...)
. Now, attempting to import apg_dump
with such a function results in an expected error. #118569 AUTO CREATE STATS
jobs could previously lead to growth in an internal system table resulting in slower job-system related queries. #118589- 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 capacity
at 10-second intervals. #118657 - Fixed a bug where casts of floats to integers 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. #117798
- Fixed a bug where statements like
ADD COLUMN j INT, ADD UNIQUE WITHOUT INDEX (j)
, which add new columns with unique constraints without creating associated indexes, would fail with an internal error. #118291 - Previously, altering from a
REGIONAL BY ROW
table to aREGIONAL BY TABLE
table could cause leaseholders to never move to the database's primary region. This is now fixed. #118001 - Users with the VIEWACTIVITY privilege can now request statement bundles using
crdb_internal.request_statement_bundle
or through the DB Console SQL Activity page. #118760 - Fixed an internal error with a message like:
LeafTxn ... incompatible with locking request
that occurs when performing an update underREAD COMMITTED
isolation which cascades to a table with multiple other foreign keys. #118722 - Fixed a bug where
ALTER PRIMARY KEY
could fail with an errornon-nullable column <x> with no value! Index scanned ..
when validating recreated secondary indexes. #118843 - Fixed a bug where a sequence name allocated by
SERIAL
that conflicted with an existing type name would cause an error. #118861 - Fixed a bug where
COMMENT ON
statements could fail with an "unexpected value" error if multipleCOMMENT
statements were running concurrently. #119007 - Previously, in certain cases, using virtual tables such as
crdb_internal.system_jobs
could 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. #119176 - Fixed a bug where operations on the
crdb_internal.leases
table could cause a node to become unavailable due to a deadlock in the leasing subsystem. #119305 - If an individual replica's circuit breaker had tripped but the range was otherwise functional, for example, because the replica was partially partitioned away from the leaseholder, it was possible for a gateway to persistently error when contacting this replica instead of retrying against a functional leaseholder elsewhere. The gateway will now retry such errors against other replicas once. #118737
- Fixed a bug in changefeed webhook sinks where the HTTP request body may not be initialized on retries, resulting in the error
http: ContentLength=... with Body length 0
. #119326 - 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 range merge. #119512 - Fixed a condition where some files were not closed when inspecting backup metadata during BACKUP and RESTORE. Epic: none. #119625
- Fixed a bug where some backup metadata files opened during
RESTORE
were not closed. #119625 - Fixed a bug that caused internal errors when executing an
EXPORT
statement where the query involved sorting by columns not explicitly included in the output, due to hidden columns in the input expression. #119538 - Fixed a bug where a warning about the need to refresh data would remain displayed on the Active Executions view of the Statements and Transactions pages despite enabling Auto Refresh. #118675
Performance improvements
- Follower reads for multi-region tables now default to prioritizing replicas in the same locality, 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. #112993
- During node startup, stores are now loaded in parallel by default, reducing start times for nodes with many stores. #115285
- Improved the efficiency and performance of encryption at rest. #115454
- Rangefeeds, the infrastructure used for changefeeds, now use a more efficient engine that reduces the number of goroutines and the associated Go scheduler pressure and latency. #114410
- Rangefeeds, the infrastructure used for changefeeds, now use a more efficient multiplexing protocol. #114408
- The cost-based optimizer now generates constrained scans on indexes containing boolean, computed expressions. #114798
- A separate RPC connection class is now used for most Raft 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_CLASS
environment variable can be set to use the default connection class instead (the previous behavior). #117385 - Rangefeed traffic (typically for changefeeds) 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_CLASS
environment variable can be set to use the default connection class, the previous default choice for rangefeeds. #117730 - The initial scan traffic for changefeeds, 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. #117810
kafka_sink_config
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"}'
#118643- Added the
changefeed.kafka_throttling_hist_nanos
metric, enhancing visibility into throttling times when CockroachDB operations exceed Kafka's quota limits. #117693 - The cost-based optimizer now generates more efficient query plans for queries with comparisons of timestamp and interval columns, for example,
timestamp_col - '1 day'::INTERVAL > now()
. #118307 - Statements from internal executors (use of SQL queries by the cluster itself) now correctly display when filtering by application name
$ internal
on the Statements page in SQL Activity. Such statements are hidden when$ internal
is not specified. #114498
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)