Skip to main content
CockroachDB v23.1 is a required . This page contains a complete list of features and changes in v23.1. Get future release notes emailed to you:

v23.1.30

Release Date: December 12, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.30.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.30.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.30.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.30.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.30.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.30.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.30.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.30.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.30.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.30.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Security updates

  • All cluster settings that accept strings are now fully redacted when transmitted as part of CockroachDB’s diagnostics telemetry. The transmitted payload includes a record of modified cluster settings and their values when they are not strings. If you previously applied the mitigations in , you can safely turn on diagnostic reporting via the diagnostics.reporting.enabled cluster setting without leaking sensitive cluster settings values.

General changes

  • COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING is no longer mentioned in the cockroach demo command.

Bug fixes

  • Fixed a bug where CockroachDB could encounter an internal error interface conversion: coldata.Column is in an edge case. The bug was present in v22.2.13+, v23.1.9+, and v23.2+.
  • Fixed a bug that caused incorrect NOT NULL constraint violation errors on UPSERT and INSERT... ON CONFLICT... DO UPDATE statements when those statements updated an existing row and a subset of columns that did not include a NOT NULL column of the table. This bug had been present since at least v20.1.0.
  • Fixed an unhandled error that could occur when using REVOKE... ON SEQUENCE FROM... user on an object that is not a sequence.
  • Addressed a panic that could occur inside CREATE TABLE AS if sequence builtin expressions had invalid function overloads.
  • Previously, when executing queries with index / lookup joins where ordering needed to be maintained, CockroachDB’s behavior could lead to increased query latency, potentially by several orders of magnitude. This bug was introduced in v22.2, and is now fixed.
  • Fixed a bug where DROP CASCADE would occasionally panic with an un-dropped backref message on partitioned tables.
  • Reduced the duration of partitions in the gossip network when a node crashes. This eliminates false positives in the ranges.unavailable metric.

v23.1.29

Release Date: November 18, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.29.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.29.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.29.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.29.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.29.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.29.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.29.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.29.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.29.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.29.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

General changes

  • Changed the license CockroachDB is distributed under to the new CockroachDB Software License (CSL).
  • Attempting to install a second enterprise trial license on the same cluster will now fail.
  • The cluster setting diagnostics.reporting.enabled is now ignored if the cluster has a Trial or Free license, or if the reporting job is unable to load any license at all.

Enterprise edition changes

  • A new changefeed.total_ranges metric has been added and can be used to monitor the number of ranges that are watched by changefeed aggregators. It shares the same polling interval as changefeed.lagging_ranges, which is controlled by the existing changefeed.lagging_ranges_polling_interval cluster setting.
  • Allowed access to DB console APIs via JWT, which can be supplied as a Bearer token in the Authorization header.

DB Console changes

  • DB Console will reflect any throttling behavior from the cluster due to an expired license or missing telemetry data. Enterprise licenses are not affected.

Bug fixes

  • Fixed a bug introduced in v23.1 that can cause incorrect results when:
    1. The query contains a correlated subquery.
    2. The correlated subquery has a GroupBy or DistinctOn operator with an outer-column reference in its input.
    3. The correlated subquery is in the input of a Select or Join operator
    4. The Select or Join has a filter that sets the outer-column reference from (2) equal to a non-outer column in the input of the grouping operator.
    5. The grouping column set does not include the replacement column, and functionally determines the replacement column.
  • The AWS endpoint and cloud custom HTTP client configuration are now considered when implicit authentication is used, whereas previously these were only considered when using explicit credentials.
  • 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 has existed since UDFs were introduced in v22.2.
  • 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.
  • Fixed an error that could happen if an aggregate function was used as the value in a SET command.
  • Fixed a bug where a span stats request on a mixed version cluster resulted in a null pointer exception (NPE).
  • Fixed a rare bug in which an update of a primary key column which is also the only column in a separate column family can sometimes fail to update the primary index. This bug has existed since v22.2. Requirements to hit the bug are:
    1. A table with multiple column families.
    2. A column family containing a single primary key column.
    3. That column family is not the first column family.
    4. That column family existed before its column was in the primary key.
    5. That column must be of type FLOAT4/8, DECIMAL, JSON, collated STRING, or ARRAY.
    6. An update changes that column from a composite value to a non-composite value.
  • The proretset column of the pg_catalog.pg_proc table is now properly set to true for set-returning builtin functions.
  • Fixed a bug in the query optimizer which could cause CockroachDB nodes to crash in rare cases. The bug could occur when a query contained a filter of the form col IN (elem0, elem1,..., elemN) such that N is very large, e.g. 1.6+ million, and when col exists in a hash-sharded index or exists in a table with an indexed, computed column dependent on col.
  • Users with the admin role can now run ALTER DEFAULT PRIVILEGES FOR target_role... on any target_role. Previously, this could result in a privilege error, which is incorrect as admins are allowed to perform any operation.
  • REASSIGN OWNED BY will now transfer ownership of the public schema. Previously, it would always skip over the public schema even if it was owned by the target role.
  • Fixed a bug where backup schedules could advance a protected timestamp too early, which caused incremental backups to fail.

v23.1.28

Release Date: October 10, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.28.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.28.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.28.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.28.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.28.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.28.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.28.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.28.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.28.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.28.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Security changes

  • and its variants and no longer expose user sensitive information like client_key.

General changes

  • Upgraded to v1.56.3.

Operational changes

  • Added the ranges.decommissioning metric that represents the number of which have a on a .

DB Console changes

  • DB Console will show an alert message when the is expired or there are less than 15 days left before it expires.
  • DB Console will show a notification alerting customers without an Enterprise to upcoming license changes with a link to more information.

Bug fixes

  • Fixed a bug where the did not prevent a table from being referenced by a .
  • Fixed a bug where the session variable would overly aggressively prevent all statements from working.
  • Fixed a rare bug where a could lead to a side-transport update saw closed timestamp regression panic. The bug could occur when a node was and failing to heartbeat its record.
  • Resolve a log message that read: expiration of liveness record... is not greater than expiration of the previous lease... after liveness heartbeat. This message is no longer possible.
  • Fixed a potential memory leak in using a . The memory leak could occur if both changefeed.fast_gzip.enabled and changefeed.cloudstorage.async_flush.enabled are true and the changefeed received an error while attempting to write to the cloud storage sink.

v23.1.27

Release Date: October 3, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.27.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.27.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.27.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.27.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.27.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.27.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.27.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.27.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.27.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.27.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Bug fixes

  • Fixed a rare bug where a could lead to a side-transport update saw closed timestamp regression panic. The bug could occur when a node was and failing to heartbeat its record.

v23.1.26

Release Date: September 12, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.26.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.26.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.26.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.26.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.26.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.26.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.26.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.26.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.26.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.26.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Security updates

  • For clusters using , the server.jwt_authentication.issuers can now take multiple values to support various kinds of providers and their mapped JWKS URI. You can set it to one of the following values, which are parsed by Go:
    1. A string that contains a single valid issuer URI. Example: https://accounts.google.com
    2. A string that contains a JSON array of valid issuer URIs. Example: ['example.com/adfs','https://accounts.google.com']
    3. A string that contains a JSON map of valid issuer URIs to corresponding JWKS URIs and deserialized into a map of issuer URLs to corresponding JWKS URIs. A JSON map overrides the JWKS URI published in the issuer’s well-known/ endpoint. Example: '{ "issuer_jwks_map": { "https://accounts.google.com": "https://www.googleapis.com/oauth2/v3/certs", "example.com/adfs": "https://example.com/adfs/discovery/keys" } }' When issuer_jwks_map is set, the key set is fetched from the JWKS URI directly. Otherwise, when JWKSAutoFetchEnabled is set, the JWKS URI is fetched from the issuer’s well-known/ endpoint.

Operational changes

  • New in the OPS channel report broken connections and related transactions during node shutdown.
    • node_shutdown_connection_timeout: Logged if there are still open client connections after the timeout defined by server.shutdown.connections.timeout expires.
    • node_shutdown_transaction_timeout: Logged if there are still open transactions on those open client connections after the timeout defined by server.shutdown.transactions.timeout expires.

Bug fixes

  • Fixed a bug introduced in v23.1 in which output of of the following CREATE statements was not redacted:
    • EXPLAIN (OPT, REDACT) CREATE TABLE
    • EXPLAIN (OPT, REDACT) CREATE VIEW
    • EXPLAIN (OPT, REDACT) CREATE FUNCTION
  • Fixed a bug where incorrect values could be produced for virtual in rare cases when the virtual column expression’s type did not match the type of the virtual column.
  • Fixed a bug where errors like ERROR: column 'crdb_internal_idx_expr' does not exist could be logged when accessing a table with an where the expression evaluates to an ENUM type. Example: CREATE INDEX ON t ((col::an_enum))
  • Fixed a bug introduced in v23.1 where a return type’s parameters could not be named when dropping a user-defined function or procedure.
  • Fixed a slow-building memory leak when a cluster uses .

v23.1.25

Release Date: August 15, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.25.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.25.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.25.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.25.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.25.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.25.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.25.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.25.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.25.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.25.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Security updates

  • Secrets are now sanitized from URLs before being written to unredacted when used in the following SQL statements:
  • The cluster setting can now take multiple values to support various kinds of providers and their mapped JWKS URIs. This can be set to one of the following values:
    • Simple string that Go can parse as a valid issuer URL: 'https://accounts.google.com'.
    • String that can be parsed as a valid JSON array of issuer URLs list: ['example.com/adfs','https://accounts.google.com'].
    • String that can be parsed as a valid JSON and deserialized into a map of issuer URLs to corresponding JWKS URIs. In the third case, CockroachDB will override the JWKS URI present in the issuer’s well-known endpoint: '{ "issuer_jwks_map": { "https://accounts.google.com": "https://www.googleapis.com/oauth2/v3/certs", "example.com/adfs": "https://example.com/adfs/discovery/keys" } }'. When issuer_jwks_map is set, CockroachDB directly uses the JWKS URI to get the key set. In all other cases where is set CockroachDB obtains the JWKS URI first from the issuer’s well-known endpoint and then uses this endpoint.

SQL language changes

  • Added the sql.auth.grant_option_inheritance.enabled . The default value is true, which results in behavior that matches the existing behavior of CockroachDB. When set to false, the is not inherited via role membership, which will prevent the descendant roles from being able to grant the privilege to others. The privilege itself is still inherited via role membership.
  • Added the sql.auth.grant_option_for_owner.enabled . The default value is true, which results in behavior that matches the existing behavior of CockroachDB. When set to false, then the is not implcitly given to the owner of an object. The object owner still implicitly has all privileges on the object, just not the ability to grant them to other users.

DB Console changes

  • The details and Table details pages in the now display the correct "stats last created" value.
  • The and Tables pages in the will show a loading state while loading information for databases and tables including size and counts.
  • In the details page, the table name will no longer appear with quotes around the schema and table name.
  • events in the event log now render correctly when the event does not contain any role options.
  • Fixed a bug where the page crashed if the range information was not available.

Bug fixes

  • Fixed a bug in which the statement was disallowed with .
  • Fixed a bug where could fail if any tables under the given database have .
  • Fixed a bug when a database with a .
  • Fixed a bug when inputting as user name for , such as has_database_privilege and has_schema_privilege.
  • Fixed a bug where CockroachDB could incorrectly evaluate an filter if it was applied to non- NULL tuples that had NULL elements, such as (1, NULL) or (NULL, NULL). This bug has existed since v20.2.
  • Fixed a bug where with could hit undefined column errors on .
  • 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 . This bug has been present since v23.1.
  • Fixed a bug where would not correctly short-circuit if the given index already existed.
  • Fixed a bug in syntax validation, in which the DESCENDING clause was not allowed for non-terminal columns of an . Only the last column of an inverted index should be prevented from being DESCENDING. This is now properly checked.
  • Fixed a bug where an could store a column in the primary index if that column had a mixed-case name.
  • Fixed a memory leak that could occur when specifying a non-existent virtual cluster name in the connection string.
  • Setting or dropping a default value on a is now blocked, even for NULL defaults. Previously, setting or dropping a default value on a computed column was a no-op.

v23.1.24

Release Date: July 18, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.24.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.24.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.24.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.24.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.24.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.24.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.24.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.24.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.24.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.24.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Enterprise edition changes

  • no longer removes the CDC query when modifying properties.

Operational changes

  • Improved disk usage metric reporting over volumes that dynamically change their size over the life of the cockroach process.
  • Removed crdb_internal.cluster_execution_insights.txt and crdb_internal.cluster_txn_execution_insights.txt from the . These files contained cluster-wide insights for statements and transactions. Users can still rely on the per-node execution insights in crdb_internal.node_execution_insights.txt and crdb_internal.node_txn_execution_insights.txt.
  • Some debugging-only information about physical plans is no longer collected in the system.job_info table for changefeeds, because it has the potential to grow very large.

Bug fixes

  • Fixed handling in the when columns are included in the STORING() clause of . CockroachDB now checks if the column is virtual up-front, and properly detects when a column is already handled by an existing index when the column name has UTF-8 characters.
  • Fixed a bug where a change to a could cause queries against tables using that type to fail with an error message like: histogram.go:694: span must be fully contained in the bucket. The change to the user-defined type could occur either directly from an [ ALTER TYPE ](https://www.cockroachlabs.com/docs/v23.1/alter-type.html statement or indirectly from an or statement, which implicitly modifies the crdb_internal_region UDT. This bug had existed since UDTs were introduced in v20.2.
  • Fixed an issue where with a default value of an empty array would not succeed.
  • will now fail with a well-formed error message and code 42601 if a statement tries to add a unique constraint on an expression.
  • Fixed a bug in v24.1, v23.2, and v23.1 where using with set to zero could cause panics.
  • 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 from LIKE patterns containing backslashes was added.
  • Fixed a bug that could cause calling a routine to return 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) in between the two calls, the routine is replaced by a routine with the same name and different parameters. This bug had existed since alpha versions of v23.1.
  • Fixed the statistics estimation code in the so it does not use the empty histograms produced if histogram collection has been disabled during statistics 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 had existed since v22.1.

Contributors

This release includes 56 merged PRs by 27 authors.

v23.1.23

Release Date: June 20, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.23.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.23.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.23.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.23.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.23.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.23.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.23.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.23.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.23.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.23.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Enterprise edition changes

  • Fixed a bug that was present since v22.2 where with long-running might incorrectly restore checkpoint job progress and drop events during due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
    • The changefeed.frontier_checkpoint_frequency and 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).
  • Introduced the changefeed.random_replica_selection.enabled that changes the behavior of changefeed planning work distribution. When changefeed.random_replica_selection.enabled is set to true, will evenly distribute their work across all , including , regardless of placement. changefeed.random_replica_selection.enabled is disabled by default.

SQL language changes

  • Introduced three new for controlling :
    • is the minimum number of observed statistics required to produce a forecast.
    • is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
    • is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation.
  • Added a new optimizer_use_improved_multi_column_selectivity_estimate, which if enabled, causes the to use an improved selectivity estimate for multi-column predicates. This setting will default to true on v24.2 and later, and false on earlier versions.
  • The setting is now set to 100 by default, which sets the rate limit for deleting expired rows to 100.
  • CockroachDB no longer limits precision when converting to .

Operational changes

    • The client_authentication_ok and client_session_end events are now logged to the unconditionally. Previously, these would only be logged if the server.auth_log.sql_sessions.enabled was set to true. All other SESSIONS log messages are still only logged if server.auth_log.sql_sessions.enabled or server.auth_log.sql_connections.enabled are set to true. To not show client_authentication_ok and client_session_end events, disable the SESSIONS log channel entirely.

DB Console changes

  • Viewing the sorted by % of Runtime now correctly sorts entries by the runtime amount.
  • The favicon and other image files now render properly.

Bug fixes

  • Fixed a bug where a failed job could leave the system in a state where re-attempting the restore was not possible without manual intervention.
  • in the 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");.
  • Fixed a bug introduced in v23.1 where combined with ( server.identity_map.configuration ) did not work. For the feature to work correctly, the client must specify a valid database user in the .
  • Statistics forecasts of zero rows can cause suboptimal . Forecasting will now avoid predicting zero rows for most downward-trending statistics.
  • Fixed a bug where and could leave references behind inside , which could prevent from working.
  • Scattering a range with a replication factor of 1 now no longer erroneously up-replicates the range to two replicas. Leases will also no longer thrash between nodes when perturbed with a replication factor of 1.
  • Fixed a bug where, if the ttl_row_stats_poll_interval storage parameter was non-zero for a table with enabled, the queries issued to update row statistics could block the job from completing. Now, if the job completes, these statistics queries are cancelled. This means that the jobs.row_level_ttl.total_rows and jobs.row_level_ttl.total_expired_rows metrics will report 0 if the job finishes before the row stats queries complete.
  • Fixed a bug where the results_buffer_size 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 the command after the session begins.
  • now includes user-defined . SHOW TYPES previously omitted composite types, which were added in v23.1.0.
  • Fixed a bug where a change to a could cause queries against tables using that type to fail with the error histogram.go:694: span must be fully contained in the bucket. The change to the user-defined type could come directly from an statement, or indirectly from an or statement (which implicitly change the crdb_internal_region type). This bug was present since user-defined types were introduced in v20.2.

Performance improvements

  • More efficient are now generated for queries with text similarity filters, for example, text_col % 'foobar'. These plans are generated if the optimizer_use_trigram_similarity_optimization is enabled. It is disabled by default.
  • Added a new optimizer_use_improved_zigzag_join_costing. When enabled and when the enable_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.
  • Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the from choosing a suboptimal query plan due to over-estimating the selectivity of a multi-column predicate.

Contributors

This release includes 48 merged PRs by 23 authors.

v23.1.22

Release Date: May 23, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.22.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.22.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.22.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.22.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.22.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.22.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.22.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.22.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.22.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.22.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Enterprise edition changes

  • Fixed a bug that was present since v22.2 where with long-running might incorrectly restore checkpoint job progress and drop events during due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
    • The changefeed.shutdown_checkpoint.enabled was enabled.
    • The cluster settings changefeed.frontier_checkpoint_frequency and low 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).

SQL language changes

  • Updated the responses to display the object_type and object_name, which has replaced the relation_name column.
  • Added granted privileges to the command.
  • Introduced three new for controlling table statistics forecasting:
    • is the minimum number of observed statistics required to produce a forecast.
    • is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
    • is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation.
  • Added a new optimizer_use_improved_multi_column_selectivity_estimate, which if enabled, causes the to use an improved selectivity estimate for multi-column predicates. This setting will default to true on v24.2 and later, and false on earlier versions.

Command-line changes

  • Changed the default debug compact maximum compaction concurrency to the number of processors, and added a --max-concurrency flag for overriding the new default.

Bug fixes

  • Fixed a bug where a of a backup that itself contained a table created by the RESTORE of a table with an in-progress would fail to restore all rows.
  • Fixed a bug where combined with ( server.identity_map.configuration ) did not work. For the feature to work correctly, the client must specify a valid database user in the .
  • Fixed a bug where the could drop a clause when there was an clause, and the ordering was partially provided by an input operator. For example, this bug could occur with an ordering such as ORDER BY a, b when the scanned index was only ordered on column a. The impact of this bug was that more rows may have been returned than specified by the LIMIT clause. This bug is only present when not using the . That is, when running with SET vectorize = off;. This bug has existed since CockroachDB v22.1.
  • Statistics forecasts of zero rows can cause suboptimal . Forecasting will now avoid predicting zero rows for most downward-trending statistics.
  • Fixed a bug in the DB Console’s tool where store-level metrics were displayed only for the first store ID associated with the node. Now data is displayed for all stores present on a node, and a single time series is shown for each store, rather than an aggregated value for all of the node’s stores. This allows finer-grained monitoring of store-level metrics.
  • Fixed a bug where a would fail if it reported an out-of-bound progress fraction. The error is now logged and no longer causes the job to fail.
  • Fixed a bug where, in certain cases, using virtual tables such as crdb_internal.system_jobs could result in the internal error attempting to append refresh spans after the tracked timestamp has moved forward.

Performance improvements

  • More efficient are now generated for queries with text similarity filters, for example, text_col % 'foobar'. These plans are generated if the optimizer_use_trigram_similarity_optimization is enabled. It is disabled by default.
  • The now costs distinct-on operators more accurately. It may produce more efficient query plans in some cases.
  • Added a new optimizer_use_improved_zigzag_join_costing. When enabled and when the enable_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.
  • Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the from choosing a bad query plan due to over-estimating the selectivity of a multi-column predicate.
  • Improved the efficiency of error handling in the to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts.

Contributors

This release includes 51 merged PRs by 23 authors.

v23.1.21

Release Date: May 7, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.21.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.21.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.21.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.21.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.21.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.21.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.21.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.21.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.21.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.21.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

SQL language changes

  • The FORCE_INVERTED_INDEX hint causes the to prefer a query plan scan over any of the hinted table. An error is emitted if no such query plan can be generated.
  • Introduced three new for controlling forecasting:
    • is the minimum number of observed statistics required to produce a forecast.
    • is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
    • is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation.
  • Added a optimizer_use_improved_multi_column_selectivity_estimate, which if enabled, causes the to use an improved selectivity estimate for multi-column predicates. This setting will default to true on v24.2 and later, and false on prior versions.

Operational changes

  • A minimum concurrency is now enforced per so that nodes with many stores do not spread workers too thinly. This helps to avoid high scheduler latency across replicas on a store when load is imbalanced.

Bug fixes

  • Fixed a bug introduced in v22.2.9 that could cause a slow memory leak that can accumulate when opening many new connections.
  • options for NO MINVALUE and NO MAXVALUE now match PostgreSQL behavior. Sequence MINVALUE and MAXVALUE now automatically adjust to the bounds of a new integer type in , matching PostgreSQL behavior.
  • Fixed a bug where the in the were not rendering properly. This involved fixing a bug related to setting the time range of the charts.
  • Fixed a bug where CockroachDB could incorrectly evaluate IN expressions that had INT2 or INT4 type on the left side, and values on the right side that were outside the range of the left side. The bug had been present since at least v21.1.
  • Previously, on long-running that issue many (hundreds of thousands or more) , CockroachDB’s internal memory accounting system, the limit for which is configured via the could leak. This bug, in turn, could result in the error message "root: memory budget exceeded" for other queries. The bug was present in v23.1.17 and is now fixed.
  • Reintroduced sql.auth.modify_cluster_setting_applies_to_all.enabled so that mixed-version clusters can migrate off of this setting, which is deprecated in favor of the privilege .
  • Fixed a bug where a statement could fail if sequences existed and they did not support a privilege (e.g., BACKUP ).
  • Fixed a bug where combined with ( server.identity_map.configuration ) did not work. For the feature to work correctly, the client must specify a valid database user in the . This bug had been present since v23.1.
  • Statistics forecasts of zero rows can cause suboptimal . Forecasting will now avoid predicting zero rows for most downward-trending statistics.

Performance improvements

  • More efficient are now generated for queries with text similarity filters, for example, text_col % 'foobar'. These plans are generated if the optimizer_use_trigram_similarity_optimization is enabled. It is disabled by default.
  • Added a new optimizer_use_improved_zigzag_join_costing. When enabled, the cost of is updated so zigzag joins will only be chosen over scans if the zigzag joins produce fewer rows. This change only applies if the session variable enable_zigzag_join is also on.
  • Improved the selectivity estimation of multi-column filters by the when the multi-column distinct count is high. This avoids cases where CockroachDB significantly over-estimates the selectivity of a multi-column predicate and as a result can prevent the optimizer from choosing a bad query plan.

Contributors

This release includes 59 merged PRs by 26 authors.

v23.1.20

Release Date: May 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.20.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.20.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.20.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.20.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.20.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.20.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.20.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.20.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.20.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.20.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

SQL language changes

  • Added a optimizer_use_improved_multi_column_selectivity_estimate, which if enabled, causes the to use an improved selectivity estimate for multi-column predicates. This setting will default to true on versions 24.2+, and false on prior versions.
  • Added three new for controlling forecasting:
    1. sql.stats.forecasts.min_observations is the minimum number of observed statistics required to produce a forecast.
    2. sql.stats.forecasts.min_goodness_of_fit is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.
    3. 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.

Bug fixes

  • Statistics forecasts of zero rows by can cause bad plans. This commit changes forecasting to avoid predicting zero rows for most downward-trending statistics.
  • A will now rather than fail if it reports an out-of bound progress fraction.

Performance improvements

  • Added a new optimizer_use_improved_zigzag_join_costing. When enabled, the cost of is updated so zigzag joins will only be chosen over scans if the zigzag joins produce fewer rows. This change only applies if the session variable enable_zigzag_join is also on.
  • Improved the selectivity estimation of multi-column filters by the when the multi-column distinct count is high. This avoids cases where CockroachDB significantly over-estimates the selectivity of a multi-column predicate and as a result can prevent the optimizer from choosing a bad query plan.

Contributors

This release includes 5 merged PRs by 5 authors.

v23.1.19

Release Date: April 18, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.19.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.19.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.19.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.19.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.19.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.19.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.19.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.19.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.19.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.19.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Bug fixes

  • Reintroduced sql.auth.modify_cluster_setting_applies_to_all.enabled so that mixed-version clusters can migrate off of this setting, which is deprecated in favor of the privilege .

v23.1.18

Release Date: April 9, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.18.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.18.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.18.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.18.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.18.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.18.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.18.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.18.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.18.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.18.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

SQL language changes

  • Fixed an oversight where CockroachDB was allowing mutation statements (such as or ) and locking statements (such as ) in implicit single-statement using .

Operational changes

  • The admission.kv.bulk_only.enabled , when set to true, only skips store-level for normal priority work, and continues to subject the work to CPU admission control.

DB Console changes

  • Resolved an issue where clusters with multiple per node could list inaccurate region/node information on the .
  • Fixed a bug where the in were not rendering properly. This involved fixing a bug related to setting the time range of the charts.

Bug fixes

  • Previously, on long-running that issue many (hundreds of thousands or more) , CockroachDB’s internal memory accounting system, the limit for which is configured via the ), could leak. This bug, in turn, could result in the error message "root: memory budget exceeded" for other queries. The bug was present in v23.1.17 and is now fixed.
  • Fix a bug where running on certain would open a very large number of connections to the .
  • A user with the VIEWACTIVITYREDACTED can no longer see constants inside of queries that originate from other in the result. Previously, this redaction did not occur.
  • Previously, the and required the user to have the VIEWACTIVITY or VIEWACTIVITYREDACTED . However, a user should always be able to view their own queries, even without these privileges. This is now fixed.
  • Fixed a bug in which it was possible to SET transaction_read_only = false during an transaction.
  • Fixed a slow memory leak that could accumulate when opening many new . The bug was present in v22.2.9+ and v23.1+.
  • Users will no longer see displayed on the in . Previously, views would be listed with no information, only displaying errors.

Performance improvements

  • Enabled the CPU limiter for to reduce latency impact from CPU-intensive scans issued as part of .

Contributors

This release includes 45 merged PRs by 27 authors.

v23.1.17

Release Date: March 19, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.17.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.17.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.17.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.17.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.17.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.17.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.17.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.17.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.17.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.17.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Security updates

  • A user with the can now request a statement bundle from the in the DB Console or with the internal builtin function crdb_internal.requests_statement_bundle.
  • Clusters using can now optionally fetch signing keys from configured issuers instead of configuring static signing keys for each issuer. When the new server.jwt_authentication.jwks_auto_fetch.enabled is set to true, signing keys are automatically fetched from the issuer using metadata published in its OpenID configuration. In this case, static signing keys in server.jwt_authentication.jwks are ignored. When automatic fetching is enabled, there may be a slight increase in network latency for each JWT authentication request, proportional to the latency between the cluster and the issuer’s endpoint.
  • cookies are marked Secure for the browser when the cluster is running in secure mode.
  • The session cookie is now marked HttpOnly to prevent it from being read by any Javascript code.

SQL language changes

  • The new cluster setting server.max_open_transactions_per_gateway, when set to a non-negative value, prevents users without the from executing a query if more than this number of are open on the current .
  • Added support for with and statements. This allows INSERT... ON CONFLICT and UPSERT queries to use index hints in the same way as and statements.

Operational changes

  • You can now pass the --include-range-info flag when to include problem ranges.
  • In unredacted diagnostic bundles, two columns have been added to the crdb_internal.transaction_contention_events table:
    • waiting_stmt_query: the query of the statement that is waiting to run.
    • blocking_txn_queries_unordered: an unordered list of the blocking transaction’s queries.

DB Console changes

  • The now always shows the entire selected period, instead of only the period that contains data.
  • The page now includes two additional graphs:
    • Elastic CPU Utilization: Shows the actual CPU used for elastic work compared with the configured limit.
    • Elastic CPU Exhausted Duration Per Second: Shows how much time, in milliseconds, that elastic work has been subject to CPU exhaustion.

Bug fixes

  • Fixed a bug where creating a that targeted tables with a zero-scale column, format='avro', and diff would cause a panic.
  • Fixed a bug where a could omit events in rare cases, logging the error cdc ux violation: detected timestamp... that is less or equal to the local frontier. This could happen in the following scenario:
    1. A runs on a follower that lags significantly behind the .
    2. A transaction commits and removes its before its resolution is applied on the follower.
    3. The follower’s has advanced past the transaction commit timestamp.
    4. The rangefeed attempts to push the transaction to a new timestamp (at least 10 seconds after the transaction began).
    5. This may cause the rangefeed to prematurely emit a checkpoint before emitting writes at lower timestamps, which in turn may cause the to drop these events entirely, never emitting them.
  • Fixed a bug introduced in v22.2 where queries issued by did not use optimal plans.
  • Fixed a bug introduced in v23.1.0 where a replica that is part of a mis-replicated range could get stuck on a rebalance operation that was falsely determined to be unsafe.
  • Fixed a bug introduced in v22.2 where adding multiple columns with in a single statement could result in the error secondary index for backfill contains physical column not present in source primary index.
  • Fixed a bug where an unable to get CPU capacity error could be logged every 10 seconds when running outside of a CPU cgroup.
  • Fixed a bug where an could cause an internal system table to grow, and this could cause slow queries related to the job system.
  • Fixed a bug that caused a confusing error when a sequence name allocated by conflicted with an existing type name.
  • Fixed a bug where an query could fail with the error non-nullable column {x} with no value! Index scanned.. when validating a recreated .
  • Fixed a bug introduced in v23.1 that could cause the internal error attempting to append refresh spans after the tracked timestamp has moved forward to be logged in some cases when using virtual tables such ascrdb_internal.system_jobs.
  • Fixed a bug in the crdb_internal.leases table where a deadlock in the leasing system could cause a node to become unavailable.
  • Fixed a bug introduced in v23.1.15 where a -resolved timestamp could get stuck after a if the range cache thinks the barrier spans multiple ranges. The log message pushing old intents failed: range barrier failed, range split is constantly emitted.
  • Fixed a rare panic that could happen during a that contains a subquery in one of its arguments, such as a function like SELECT addgeometrycolumn(...). Now, attempting to import a pg_dump with a function that has a subquery in one of its arguments results in an error rather than a panic.
  • Fixed a bug in the where the http request body may not be initialized on retries, resulting in the error http: ContentLength=... with Body length 0.
  • Fixed a bug where some files were not closed when inspecting backup metadata during and operations.
  • Fixed a bug that could cause internal errors to be logged when executing an statement.
  • Fixed a bug where a with a large number of descriptors could perform a on the system.leases table.
  • Fixed a bug introduced in v22.1.0 that could cause the sql.txns.open.internal and sql.statements.active.internal gauge metrics never to be updated, leading to an incorrect count of the number of transactions and statements executed by operations internal to CockroachDB. These metrics do not include operations executed by external SQL clients.
  • Fixed a bug introduced in v22.2.9 that could cause a slow memory leak that can accumulate when opening many new connections.

Contributors

This release includes 94 merged PRs by 33 authors.

v23.1.16

Release Date: February 27, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.16.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.16.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.16.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.16.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.16.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.16.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.16.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.16.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.16.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.16.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Bug fixes

  • Fixed a bug where resolved timestamps could get stuck, continually emitting the "pushing old intents failed: range barrier failed, range split", typically following a . This bug was introduced in v23.1.15.

Contributors

This release includes 2 merged PRs by 2 authors.

v23.1.15

Release Date: February 20, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.15.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.15.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.15.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.15.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.15.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.15.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.15.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.15.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.15.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.15.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

Security updates

  • The session cookie is now marked HttpOnly to prevent it from being read by any Javascript code and is marked Secure by the browser when the cluster operates in secure mode.

Bug fixes

  • Fixed a bug where that targeted schema-locked tables could fail due to an old high-water timestamp being incorrectly persisted.
  • Fixed a bug where creating a that targeted tables with a DECIMAL(n) column (that is, zero-scale column), format='avro', and diff would cause a panic.
  • Fixed a bug that could cause a statement to retry forever.
  • Fixed a bug that prevented database when the database contained a view or routine that referenced a user-defined type in the body string. For views, this bug was introduced in v20.2 when UDTs were introduced. For routines, this bug was introduced in v22.2 when UDFs were introduced.
  • Fixed a durability issue in the Raft log storage mechanism due to improper synchronization of filesystem metadata, potentially leading to the loss of specific write operations ( AddSSTable ), notably utilized by operations such as RESTORE. This vulnerability was exposed only under conditions of power failure or operating system crashes, potentially causing CockroachDB to enter a crash loop upon restart. In extreme scenarios, such as a simultaneous power outage or crash across multiple nodes, it could result in an irrecoverable quorum loss.
  • Fixed an issue in Raft log truncation that had the potential to cause crash loops and irretrievable quorum loss, especially in the rare but severe scenario where all replicas concurrently enter a crash loop. This issue emerged under conditions where the cluster was processing a bulk write operation (such as schema changes, imports, or restores), while a log truncation command was active, and the CockroachDB process experienced a crash.
  • Fixed the total runtime value referenced in SQL stats, resolving the bug where the erroneously displayed percentages over 100%.
  • Fixed an issue where the values for the current and past hour in the top Activity table were calculated incorrectly, causing a missing data issue in SQL stats and, consequently, on the page.
  • Fixed a bug where CockroachDB would erroneously return an error if an empty search path parameter was encountered during search path setting.
  • Fixed a bug in the job that would cause it to skip expired rows if the primary key of the table included columns of the collated string type. This bug was present since the initial release of row-level TTL in v22.2.0.
  • Fixed a bug that could cause queries sent by the job to use a secondary index rather than the primary index to find the rows to delete. This could lead to some DELETE operations taking a much longer time than they should. This bug was present since v22.2.0.
  • Fixed a bug where concurrent statements can cause deadlocks.
  • Reduced the impact of bulk deletions ( , , or replica removals) on foreground traffic by altering storage engine compaction priorities.
  • Resolved an issue where DML operations would fail during the creation of a hash-sharded index, resulting in an error stating column crdb_internal_val_shard_16 does not exist. This bug was present since v23.1.0.
  • jobs no longer lead to growth in an internal system table resulting in slower job-system related queries.
  • no longer fail with an non-nullable column <x> with no value! Index scanned.. error when validating recreated secondary indexes.
  • Fixed a bug where CockroachDB could encounter an error unable to encode table key: *tree.DTSQuery when operating on columns of type in some contexts (e.g. when collecting table statistics or when performing a DISTINCT operation). The bug has been present since 23.1 when support for TSQuery type was added.
  • Fixed a bug where in some cases CockroachDB could incorrectly evaluate queries that scanned an inverted index and had a WHERE filter in which two sides of the AND expression had “similar” expressions (e.g. ARRAY['str1'] <@ col AND (ARRAY['str1'] && col OR...) ). The bug has been present since pre-22.2 version.
  • CockroachDB now correctly logs the top 5 hot ranges per cluster instead of per node.
  • Fixed a bug where a could omit events in rare cases, logging the error cdc ux violation: detected timestamp... that is less or equal to the local frontier. This can happen if a runs on a follower replica that lags significantly behind the leaseholder, a transaction commits and removes its transaction record before its intent resolution is applied on the follower, the follower’s closed timestamp has advanced past the transaction commit timestamp, and the rangefeed attempts to push the transaction to a new timestamp (at least 10 seconds after the transaction began). This may cause the rangefeed to prematurely emit a checkpoint before emitting writes at lower timestamps, which in turn may cause the changefeed to drop these events entirely, never emitting them.

Contributors

This release includes 96 merged PRs by 39 authors. We would like to thank the following contributors from the CockroachDB community:
  • Nikolai Vladimirov (first-time contributor)

v23.1.14

Release Date: January 17, 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.14.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.14.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.14.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.14.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.14.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.14.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.14.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.14.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.14.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.14.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

SQL language changes

  • CockroachDB now supports a table that has columns typed as arrays of user-defined types (such as enums). Tables that use multiple user-defined types with the same name but different schemas are still unsupported.
  • Added a new field, StmtPosInTxn, to the CommonSQLExecDetails (included in SQL audit logs, SQL execution logs, and telemetry events) to represent the statement’s index (position) in the transaction. The first statement’s StmtPosInTxn is 1.

Operational changes

  • Updated the and cluster settings to be public in v23.1.

DB Console changes

  • The now correctly renders the background color for email signups, fixing an issue where it was difficult to read the text.
  • Updated the CPU Time label to SQL CPU Time on the and clarified the tooltip.
  • Fixed an issue where the following AggHistogram-powered metrics reported quantiles incorrectly in the . The list of affected metrics is:
    • changefeed.message_size_hist
    • changefeed.parallel_io_queue_nanos
    • changefeed.sink_batch_hist_nanos
    • changefeed.flush_hist_nanos
    • changefeed.commit_latency
    • changefeed.admit_latency
    • jobs.row_level_ttl.span_total_duration
    • jobs.row_level_ttl.select_duration
    • jobs.row_level_ttl.delete_duration This bug affected only DB Console dashboards and not the Prometheus-compatible endpoint /_status/vars.
  • In the SQL Activity Transaction Details page, you can now view a transaction fingerprint ID across multiple applications by passing a comma-separated encoded string of transaction fingerprint IDs in the appNames URL search parameter.

Bug fixes

  • Fixed a bug in in the TimeScale component’s Now button behavior that could prevent charts from updating after a custom time range was selected.
  • Fixed a bug where an active replication report update could get stuck in a retry loop on clusters with over 10000 ranges, which would prevent a node from shutting down cleanly.
  • Fixed a nil pointer dereference bug in the error handling for GetFiles.
  • Fixed a bug that prevented the SQL Activity page from showing internal statements when the sql.stats.response.show_internal.enabled was set to true.
  • Fixed a bug that could cause a discrepancy between computed statistics and the stored value for statics when a delete was rolled back.
  • Fixed a bug introduced in v23.1 that could cause an internal error Previously, CockroachDB could encounter an internal error when using a prepared statement using the text format with a user-defined composite type.
  • Fixed a bug that would cause a to fail if it references an enum as well as a table that has undergone a schema change.
  • Fixed a bug that could cause finalization during a major-version upgrade to contend with descriptor lease renewals on a large cluster. Descriptor lease renewals now always have a lower priority than finalization.
  • now evenly distribute their work across all replicas, including followers, regardless of leaseholder placement.
  • Fixed a bug that could cause replica processing in store queues to get stuck if a the replica’s ID has changed.
  • Fixed an bug introduced in v22.2 that could lead to stuck queries or inaccurate results when using lookup involving equality columns and multiple ranges.
  • Fixed a bug in the declarative schema changer that could cause with expressions to fail on materialized .
  • Fixed a bug that could cause an inaccorate “too few columns” error for a query that used ANY {array} syntax with a subquery.
  • Fixed a bug that could cause a “too few/many columns” errors for a query that used an IN or NOT IN clause with a non-trivial right operand, such as a subquery (rather than a constant tuple).
  • Fixed a bug introduced in v22.2 that could cause errors or inaccurate results when performing a lookup or index on a table with three or more column families.
  • Fixed a bug that could cause an internal error or a panic while attempting to forecast statistics on a numeric column.
  • Fixed a bug when issuing a statement where incorrect Age field could be logged in the statement log. This bug could also cause statements to incorrectly appear in the slow query log.
  • Fixed a bug in the SQL Statistics UI where the runtime was incorrectly calculated. This bug could cause recorded values to appear to exceed 100%.
  • Fixed a bug that could cause a CREATE CHANGEFEED WITH {key_column} statement to retry forever.

Performance improvements

  • Reduced query planning time significantly for some queries that join multiple tables.

Contributors

This release includes 128 merged PRs by 42 authors.

v23.1.13

Release Date: December 11, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.13.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.13.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.13.linux-arm64.tgz
(SHA256)
cockroach-sql-v23.1.13.linux-arm64.tgz
(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.13.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.13.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.13.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.13.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.13.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.13.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image, both Intel and ARM images are generally available for production use. To download the Docker image:

SQL language changes

  • A new option for the syntax, strip_localities, has been added. This can be used to strip the from a backup when there are mismatched between the backup’s cluster and the target cluster. The following are behaviors that will most likely not be encountered with the specific use case that this patch provides, but are documented nonetheless:
    • Adding a to a regionless restore (with or without ) will not work out-of-the-box, but does produce an accurate message instructing a user to (and for cluster restores, ).
    • Restoring a cluster/database/table with a will not work out-of-the box. In particular, when performing writes, the needs to specify the region of the new row(s) being written to the table. The user will need to alter said column and set a default that makes sense, along with discarding the (this latter is due to the fact that the zone config holds all outdated info related to the , , etc.). These are due to a conflict with the crdb_region column already being present in the regionless restore. This column specifies each row’s home region and is a prefix to the table’s primary key. Stripping localities does not touch this column as it would be an expensive operation that includes rewriting the entire table.
  • The option strip_localities has been renamed to remove_regions.
  • You can no longer perform a with the remove_regions option if the object being restored contains a .
  • Added a jsonb_array_to_string_array that converts a array to a string array.
  • Updated the jsonb_array_to_string_array to return objects. Previously, they were removed from the output.
  • Fixed the update job to avoid conflicts on update, reduce the amount of data cached to just what the overview page requires, and fix the correctness of the top queries.

Operational changes

  • Added for proposals and reproposals, specifically:
    • raft.commands.proposed: commands proposed to Raft by . (Note that this metric includes both of the reproposed metrics below.)
    • raft.commands.reproposed.unchanged: commands retried/reproposed to Raft because they take too long to apply (so they might be dropped).
    • raft.commands.reproposed.new-lai: commands retried/reproposed to Raft because they were committed to Raft out of order (failed the LAI (lease applied index) or check).
  • Added a new kv.gc.sticky_hint.enabled that helps expedite after range deletions, such as when a SQL table or index is dropped. This setting is disabled by default.

DB Console changes

  • instances proxied at different subpaths that use will now point to the correct relative path when attempting to use OIDC login.

Bug fixes

  • Fixed a bug where the pg_attribute could have sparsely populated attnum s since dropped columns were not included. Previously, the attribute number generated inside pg_attribute could be sparse because there would be gaps after columns were dropped. This could be problematic for ORMs since this would mean that attribute numbers could be sparse, and they may not be designed to handle such gaps. To address this, this patch adds dropped synthetic columns into the pg_attribute table, which allows these tools to work correctly.
  • Fixed a bug that could prevent from working if it was performed during a .
  • Fixed a bug where queries with the st_union could produce incorrect results in some cases due to the performing invalid optimizations. This bug has been present since the st_union function was introduced in v20.2.0.
  • A warning for could incorrectly surface when that store columns. This is now fixed.
  • Fixed a bug where creating a and later displaying it via , would not show the opclass for this trigram index.
  • Fixed a bug introduced in v22.2 where CockroachDB could incorrectly evaluate into tables with at least 3 in some cases (either a non-nullable column with no value internal error would occur, or the query would return incorrect results).
  • Fixed a bug that could occasionally cause (e.g., table/index drops) to appear stuck in state “waiting for MVCC GC” for much longer than expected. This fix only applies to future schema changes. Existing stuck jobs can be processed by manually force-enqueueing the relevant in the MVCC GC queue under the .
  • Fixed a bug that could cause internal errors or panics while attempting to forecast on a numeric column.
  • Fixed a bug where would incorrectly disable while new secondary indexes were being backfilled when using the .
  • Previously, when executing queries with when the ordering needs to be maintained, CockroachDB could in some cases inadvertently increase query latency, possibly by 1 or 2 orders of magnitude. This bug was introduced in v22.2 and is now fixed.
  • Fixed a bug where the command would incorrectly require the user to have the . It was intended to only require the user to have any privilege on the table being inspected.
  • Fixed a bug that could cause a query plan to skip scanning rows from the local region when performing a with a table as the input.
  • Fixed a bug that could cause to hang if node localities were changed after regions were added.

Performance improvements

  • Addressed a performance regression that could happen when the is being used to with a concurrent workload.
  • Added an off-by-default , kv.dist_sender.follower_reads_unhealthy.enabled, which when enabled will prevent failed requests from being issued on followers that are , , or otherwise unhealthy. This will prevent against nodes in such states. This prevents latency spikes if those nodes later go offline.
  • time has been reduced significantly for some queries in which many tables are .

Contributors

This release includes 118 merged PRs by 42 authors.

v23.1.12

Release Date: November 13, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.12.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.12.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.12.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.12.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.12.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.12.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.12.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.12.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.12.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.12.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Security updates

  • The SIGHUP signal now clears the cached expiration times for that are reported by the security.certificate.expiration.client metric.
  • SQL commands that were previously limited to the admin can now be used by users with the VIEWCLUSTERMETADATA or REPAIRCLUSTERMETADATA system privilege, depending on whether the operation is read-only or modifies state.

General changes

  • The maximum permitted value of the COCKROACH_RPC_INITIAL_WINDOW_SIZE environment variable has been increased to 64MB. By increasing this environment variable, in conjunction with tuning OS-level maximum TCP window size, you can increase the throughput that can sustain over high latency network links.
  • Updated Go version to 1.19.13.

SQL language changes

  • New datetime built-ins ( make_date, make_timestamp, and make_timestamptz ) have been added, allowing for the creation of timestamps, timestamps with time zones, and dates. In addition, date_trunc now allows for a timestamp to be truncated in a specified timezone (to a specified precision).
  • New system privileges CREATEROLE, CREATELOGIN, CREATEDB, and CONTROLJOB have been introduced. Each is analogous to its existing counterpart but can additionally be inherited through role membership.,,,
  • can now be passed a WITH EXECUTION LOCALITY option similar to BACKUP to restrict execution of the job to nodes with matching localities.
  • The statement_activity and transaction_activity table column execution_total_cluster_seconds is now accurate. The combinedstmts endpoint returns the correct value for the StmtsTotalRuntimeSecs and TxnsTotalRuntimeSecs properties.
  • The discard is now limited to once per minute by default. The message now includes both the number of transactions and the number of statements that were discarded.

Operational changes

  • The command now has an option to omit goroutine stack dumps. This impacts the creation of nodes/*/stacks.txt and nodes/*/stacks_with_labels.txt within debug ZIP bundles. Users can opt to exclude these goroutine stacks by using the --include-goroutine-stacks=false flag. Fetching stack traces for all goroutines is a “stop-the-world” operation, which can momentarily but significantly increase SQL service latency. Any periodic goroutine dumps previously taken on the node will still be included in nodes/*/goroutines/*.txt.gz, since they have already been generated and don’t require any stop-the-world operations.
  • Requests for database details or table details from the UI, or usages of SHOW RANGES WITH DETAILS are no longer subject to errors if the number of requested spans is too large.
  • Added a new changefeed.lagging_ranges that shows the number of which are behind in changefeeds. This metric can be used with the . The calculation of this metric is controlled by two new : (1) lagging_ranges_threshold, with a default of 3 minutes, is the amount of time a range needs to be behind to be considered lagging, and (2) lagging_ranges_polling_interval, with a default of 1 minute, controls how often the lagging ranges calculation is done. Note that polling adds latency to the metric being updated. For example, if a range falls behind by 3 minutes, the metric may not update until an additional minute afterwards. Also note that ranges undergoing an initial scan for longer than the threshold are considered to be lagging. Starting a changefeed with an initial scan on a large table will likely increment the metric for each range in the table. However, as ranges complete the initial scan, the number of lagging ranges will decrease.
  • The now constructs client-side requests using relative URLs instead of absolute ones. This enables proxying of the DB Console at arbitrary subpaths.
  • Added a new server.http.base_path that controls the redirection of the browser after successful login with . Most users do not need to modify this setting. However, it is helpful in cases where CockroachDB is running behind a load balancer or proxy that serves CockroachDB under a subpath, such as https:// <hostname>/crdb/. In those cases, it is necessary for the browser to redirect to / crdb after login instead of /, which has always been the hard-coded default.

DB Console changes

  • Non-admin users can now view the .
  • The on the is downsampled using the MAX function instead of SUM. This improves situations where zooming out would cause the connection rate to increase for downsampled data.
  • Fixed a bug in DB Console’s that could cause the page to crash if the response was larger than 50 KB. The page now keeps pulling results until no maximum size errors are encountered.
  • Fixed an error on the when there was a workload, and then the workload stopped so that no queries ran against the database in the last hour.
  • The will now correctly display timestamps for creation, last modified, and the completed time fields.
  • The Reset Sql Stats button is now visible to users with the admin role on the DB Console.
  • Reduced memory usage in jobs.

Bug fixes

  • The new backup option updates_cluster_monitoring_metrics tracks the timestamp of the last backup failure due to a KMS error. This option is disabled by default.
  • Fixed a bug where vectorized COPY FROM could produce a plan with more than one RenderNodes, when only zero or one should be allowed. This could result in multiple render nodes in a table with a hash sharded primary key.
  • Fixed a bug that caused CockroachDB to stop collecting new statistics about and .
  • Fixed a bug where, internally, printing a 0 decimal with a very low exponent uses excessive memory. The type type is not impacted, but crdb_internal functions may be.
  • Fixed a bug where executing the statement could cause an . Now, if memory is exceeded, the EXPORT INTO PARQUET statement returns an error. If you see an error related to memory, retry the EXPORT INTO PARQUET statement using a smaller value for the . Cockroach Labs because they provide better performance for growing workloads. Additionally, changefeeds , which offer and .
  • Added limited statement_statistics to the debug.zip output.
  • Fixed a nil dereference panic during node startup that could be caused by an incorrect initialization order.
  • Fixed a bug where the incorrectly displayed a transaction ID in telemetry logs. It now correctly shows no transaction ID, since there is no open transaction when BEGIN is executed.
  • Fixed a bug that could cause a transaction performing multiple parallel foreign key checks to return a concurrent txn use detected error.
  • Fixed a bug where dependencies on sequences from tables would be reported with the wrong value for the classid column in the pg_catalog.pg_depend table.
  • Fixed edge cases in decimal and float evaluation for division operators. 'NaN'::DECIMAL / 0 will now return NaN instead of a division-by-zero error, and 0 / 'inf'::DECIMAL will return 0 instead of 0E-2019.
  • Fixed a DB Console issue where the DROP_UNUSED index recommendations produced by the table details page produced an invalid DROP INDEX statement.
  • Executing two statements on the same line no longer triggers an error.
  • Removed a buggy TTL descriptor repair. Previously, upgrading from v22.2.x to 23.1.9 incorrectly removed from tables (visible via ) while attempting to repair table descriptors. A node that attempts to run the TTL could crash due to a panic caused by the missing TTL storage parameters. Clusters currently on v22.2.x should not be upgraded to v23.1.9, but should move directly to v23.1.10 or later. For more information, refer to .
  • Fixed a performance regression when disabling sql.metrics.statement_details.enabled, which caused execution stats to be collected for all queries instead of the default 1% of queries.
  • cockroach debug pebble commands now work correctly with encrypted stores which don’t use the default cockroach-data path, and you no longer need to pass the --store option.
  • The no longer displays undefined regions or outdated node information.
  • Fixed a bug where RESET (ttl_expire_after) could incorrectly remove ttl_expiration_expression.
  • Fixed a bug where an statement with a user-defined function (UDF) in the CHECK could cause a validation error.
  • Fixed a bug where CREATE INDEX for could fail with ERROR: duplicate key value violates unique constraint if concurrent inserts happened simultaneously.
  • Fixed a bug where a command with an IDENTITY column did not properly propagate the type of the column into the sequence.
  • Fixed a bug where the format_type built-in did not honor typemod information for array types, leading to incorrect output.
  • Fixed compaction behavior to prevent rapid sublevel growth when removing replicas from a store, such as during decommissioning.
  • Fixed a bug that could occur when the execution mode (Preview) was enabled to evaluate queries such as lookup joins. The bug could result in an internal error like unexpected 40960 leftover bytes if the portal was not fully consumed.
  • External connection URLs now accept the scheme azure-blob for connections to Azure Blob Storage and the scheme azure-kms for connections to Azure KMS. For backward compatibility, schemes azure and azure-storage schemes continue to work for connections to Azure Blob Storage.
  • Fixed a bug where changing the setting server.telemetry.hot_ranges_stats.interval had no effect.
  • Added a check for values before using mean on the DB Console , fixing a crash.
  • Fixed a bug where dependencies on sequences from tables would be reported with the wrong value for the classid column in the pg_catalog.pg_depend table.
  • Fixed a bug where atttypmod in pg_attribute was not populated for / types, which meant that ORMs could not know the precision of these types properly.
  • Fixed a bug in the DB Console page, which showed contention details of other transactions. Now, CockroachDB will only surface contention details for the current transaction.
  • Fixed a bug where indoption inside pg_index was not properly encoded. Clients were unable to decode it as int2vector.
  • RPC failures on writes now use the parallel commit protocol and execute in parallel to the commit operation. This change prevents incorrect retryable failures and transaction unexpectedly committed assertions by detecting when writes cannot be retried idempotently, instead returning an AmbiguousResultError.
  • Fixed a bug that prevented the from honoring the statement_timeout session setting when generating constrained index scans for queries with large IN lists or = ANY predicates on multiple index key columns. This bug could cause an Out-of-Memory (OOM) condition on the node.
  • Fixed a bug that caused internal errors during query optimization in rare cases. The bug has been present since version v2.1.11, but it is more likely to occur in version v21.2.0 and later, though it is still rare. The bug only presents when a query contains min and max
  • Fixed a bug where a lookup or index join on a table with at least three column families could be evaluated incorrectly, leading to a “non-nullable column with no value” error or incorrect query results. The bug was introduced in v22.2.
  • Fixed a bug that could cause internal errors or panics while attempting to forecast statistics on a numeric column.

Performance improvements

  • Queries that compare collated strings now use less memory and may execute faster.
  • Reduced the impact of high-concurrency blind writes to the same key on goroutine scheduling latency.

Contributors

This release includes 207 merged PRs by 64 authors.

v23.1.11

Release Date: October 2, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.11.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.11.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.11.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.11.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.11.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.11.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.11.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.11.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.11.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.11.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

SQL language changes

  • Added a new syntax to , SHOW DEFAULT PRIVILEGES FOR GRANTEE <grantee> that shows the default privileges that a grantee received.
  • The admin API endpoint now returns authoritative range statistics.
  • Added the sql.stats.limit_table_size.enabled, which controls whether or not CockroachDB enforces the row limit set by sql.stats.persisted_rows.max in the system.statement_statistics and system.transaction_statistics tables.
  • Optimized the sql-stats-compaction ‘s to avoid a . This helps avoid a , which can cause the job to fail.
  • Fixed an issue where the UI was missing query text and details when looking at the if there were more than 500 transactions or statements. The crdb_internal.statement_activity table now includes all statements for a transaction that are in the crdb_internal.transaction_activity table.
  • Added the VIEWSYSTEMTABLE . Users with this privilege have privileges for all tables in the system database.
  • The oidvectortypes has been implemented, which can format an oidvector.
  • The internal persisted table max size check is now done once an hour instead of every 10 minutes. This reduces the risk of serialization errors on the statistics tables.
  • Introspection queries will now show the internal node user as the owner of tables in and . Previously, the owner was shown as admin, but that was inaccurate since users with the could not modify these tables in any way.

Operational changes

  • Added the kv.enqueue_in_replicate_queue_on_span_config_update.enabled . When set to true, in the cluster will enqueue for upon receiving config updates that could affect the replica. This setting is off by default. Enabling this setting speeds up how quickly config-triggered replication changes begin, but adds additional CPU overhead. The overhead scales with the number of leaseholders.
  • Added a new named server.hot_ranges_request.node.timeout, with a default value of 5 minutes. The setting controls the maximum amount of time that a will spend waiting for a node to provide a response. Set it to 0 to disable timeouts.
  • Span stats requests will return a partial result if the request encounters any errors. Errors that would have previously terminated the request are now included in the response.
  • now skips contacting the ranges for tables on which is set, and can thus succeed even if an excluded table is unavailable.
  • The dial and heartbeat timeouts can now be configured via the environment variables COCKROACH_RPC_DIAL_TIMEOUT (default 2x COCKROACH_NETWORK_TIMEOUT or 2x2=4 seconds) and COCKROACH_RPC_HEARTBEAT_TIMEOUT (default 3x COCKROACH_NETWORK_TIMEOUT or 3x2=6 seconds). This allows configuring these values independently of COCKROACH_NETWORK_TIMEOUT.
  • The default server-side send timeout has been increased from 2 seconds to 4 seconds (1x to 2x of COCKROACH_NETWORK_TIMEOUT ), to avoid spurious connection failures in certain scenarios. This can be controlled via the new environment variable COCKROACH_RPC_SERVER_TIMEOUT.
  • Added a new gauge sql.schema.invalid_objects. This gauge is periodically updated based on the schedule set by the sql.schema.telemetry.recurrence . When the metric is updated, it counts the number of schema objects ( , , , , and ) that are in an invalid state according to CockroachDB’s internal validation checks. This metric is expected to be zero ( 0 ) in a healthy cluster. If it is not zero, it indicates that there is a problem that must be repaired.
  • Added two new : changefeed.checkpoint_progress is similar to changefeed.max_behind_nanos, but it also supports . changefeed.aggregator_progress tracks the progress of individual aggregators (the lowest timestamp for which all aggregators with the label have emitted all values they’re responsible for).

Command-line changes

  • Removed the command \demo recommission from . It had been obsolete and non-functional since v20.2.

DB Console changes

  • Users without the VIEWCLUSTERSETTINGS , but with the VIEWACTIVITY or VIEWACTIVITYREDACTED permissions, can now see .
  • CockroachDB will now show a warning when the time period selected on the is older than the oldest data available.

Bug fixes

  • Fixed a buggy TTL descriptor repair by removing it. Previously, upgrading from v22.2.x to 23.1.9 incorrectly removed from tables (visible via ) while attempting to repair table descriptors. This resulted in the node that attempts to run the TTL crashing due to a panic caused by the missing TTL storage parameters. Clusters currently on v22.2.x should not be upgraded to v23.1.9 and should be upgraded directly to v23.1.10 or later. For more information, see .
  • Users with the VIEWACTIVITY should be able to see other users’ sessions from both the and the .
  • Fixed errors on the in the when a session’s memory usage is zero bytes.
  • Fixed a bug in whereby \demo add could sometimes crash with an error ” index out of range [...] with length... ”. This bug was introduced in v19.x.
  • Fixed a bug whereby the command \demo decommission in could sometime leave the demo cluster in a broken state. This bug was introduced in v20.2.
  • Fixed a bug in the recommendations provided in the output where index recommendations may suggest making the wrong index visible when there are multiple invisible indexes in a table.
  • Fixed a bug that could cause a query with and to return results in the wrong order. This bug could cause incorrect results as well if the LIMIT was nested within an outer query, e.g. under another LIMIT. This bug had existed since before v22.2.
  • Fixed a bug with type checking with nested where an inner case had no explicit collated type.
  • Fixed a bug where could incorrectly emit the message "cannot publish new versions for descriptors" instead of a to applications.
  • Fixed a bug that could cause CPU usage to increase over time.
  • Fixed a bug introduced in v22.1 that could cause a to infinite-loop in rare cases when (1) the join filter is not an equality and (2) no columns from the left input are returned.
  • Users with the VIEWACTIVITY can now view correct values for the current timezone in the .
  • Fixed a bug present since v23.1.0 that would cause queries on the pg_catalog.pg_statistic_ext table to fail if a table was dropped recently. This bug also caused the \d shortcut to encounter errors.
  • Fixed a bug where pg_attribute and pg_attrdef did not properly return results for generated columns.
  • The view should hit request timeouts less frequently, if at all.
  • Fixed a bug that caused nodes to crash when attempting to EXECUTE a prepared statement with an argument that referenced a . This bug was present since user-defined functions were introduced in v22.2.
  • Fixed a bug so the filter on the works when the app name is an empty string (represented as ‘unset’).
  • Fixed a bug where a SpanStatsRequest would return post-replicated MVCC stats, which was causing incorrect output in . Now, a SpanStatsRequest returns the logical MVCC stats for the requested span.
  • Fixed an issue with , where the filter was not returning any results.
  • Going to the from is fixed. Previously, the link would not show any results.
  • Fixed the column names on the against the tables crdb_internal.node_txn_execution_insights and crdb_internal.cluster_txn_execution_insights during the .
  • Fixed a bug that could cause some rows to be silently skipped during when a node failed.
  • Fixed a bug in where more rows could be returned by the query than expected. This could happen when a query filter of the form ST_Distance(geog1, geog2) > constant or ST_MaxDistance(geom1, geom2) > constant, where the operator was one of >, <, >=, <=, or a filter of the form ST_Distance(geog1, geog2, false) = 0 would sometimes mistakenly evaluate to true when one or both of the inputs was NULL or an empty or .
  • Fixed an issue where a can be called on an invalid key that’s in the form of someValidKey.Next() during . This split key can land in the middle of a row with , and thus result in failing SQL queries when querying the restored table.
  • Fixed an issue where a can be called on an invalid key that’s in the form of someValidKey.Next() during with the bulkio.restore.use_simple_import_spans set to true. This split key can land in the middle of a row with , and thus result in failing SQL queries when querying the restored table.
  • The difference had its return type incorrectly set to instead of .
  • Fixed a bug where dependencies on from would be reported with the wrong value for the classid column in the .
  • Fixed a bug that could cause a performing multiple parallel checks to return a concurrent txn use detected error.
  • Various observability pages in the no longer crash when they encounter zeros (e.g., a session with no memory allocated).

Performance improvements

  • Improved the cost of resolving a user-defined type that has many values.
  • Queries that access the and that perform introspection on other tables in those schemas are now significantly faster.

Contributors

This release includes 204 merged PRs by 63 authors.

v23.1.10

Release Date: September 18, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.10.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.10.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.10.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.10.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.10.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.10.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.10.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.10.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.10.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.10.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Bug fixes

  • Removed buggy descriptor repair. In v23.1.9, upgrading from v22.2 to v23.1.9 incorrectly removed TTL storage parameters from tables (visible by running SHOW CREATE TABLE <ttl-table>; ) while attempting to repair the table descriptors. This resulted in the node that attempted to run the TTL job crashing due to a panic caused by the missing TTL storage parameters. Clusters currently on v22.2 should upgrade to v23.1.10 and higher, not to v23.1.9.

Contributors

This release includes 2 merged PRs by 2 authors.

v23.1.9

Release Date: September 7, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.9.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.9.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.9.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.9.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.9.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.9.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.9.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.9.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.9.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.9.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

General changes

  • All perform a health check and repair upgrade step before proceeding to other upgrade steps.
  • to a new release will not only check for descriptor and other corruptions, but will attempt to repair some of them on a best-effort basis. This should seamlessly get rid of all longstanding descriptor back-reference corruptions, which typically don’t manifest themselves until a or an upgrade are performed.

Enterprise edition changes

  • should no longer fail when upgrading to .
  • Fixed an issue where emitting to a cloud sink with compression could experience resource leakage (memory and goroutines) when experiencing transient errors.
  • Augmented the credentials lookup chain for the implicit authentication method in Azure storage and KMS to first look for credentials in a file before proceeding on to the rest of the chain specified in the DefaultAzureCredential class (env vars, Managed Identity, etc.). The path of this file is specified by the environment variable COCKROACH_AZURE_APPLICATION_CREDENTIALS_FILE and, if not empty, is expected to point to a file that provides the Azure Tenant ID, Client ID, and Client Secret that will be used to access the storage or KMS resource in the following YAML format: azure_tenant_id: MY_TENANT_ID, azure_client_id: MY_CLIENT_ID, azure_client_secret: MY_CLIENT_SECRET
  • Fixed a rare issue that was triggered when the parent database or types were dropped, and instead of exiting with a descriptive error message, the changefeed would observe the following opaque error instead: value type is not BYTES: UNKNOWN.
  • Fixed a potential deadlock when running with the end_time option set.

SQL language changes

  • Added a crdb_internal.reset_activity_tables to allow users to reset the in the system.statement_activity and system.transaction_activity tables. Users require to use this builtin.
  • CockroachDB now reports time encountered while executing the mutation statements ( , , , and ) when run via .
  • Fixed a bug in that was first introduced in . On previous versions of CockroachDB, a workaround is to disable COPY by setting the vectorize to false or to remove the header row from the COPY data.
  • Added a new boolean sql.telemetry.query_sampling.internal.enabled. If true, internal app queries will be reported to telemetry when query sampling to telemetry is enabled.
  • The SHOW QUERIES and commands will now display timestamps using the session’s timezone setting.
  • Added the sql.stats.limit_table_size.enabled, which controls whether or not we enforce the row limit set by the sql.stats.persisted_rows.max cluster setting in the system.statement_statistics and system.transaction_statistics tables.
  • Optimized the sql-stats-compaction ‘s to avoid a . This helps avoid a which can cause the job to fail.
  • Introspection queries will now show the internal node user as the owner of tables in and . Previously, the owner was shown as admin, but that was inaccurate since users with could not modify these tables in any way.

Operational changes

  • Added two new to monitor conformance: leases.preferences.violating indicates the number of valid leases a owns that satisfy none of the preferences applied; leases.preferences.less-preferred indicates the number of valid leases a store owns that satisfy some of the preferences applied, but not the first preference.
  • Added the kv.enqueue_in_replicate_queue_on_span_config_update.enabled . When set to true, in the cluster will enqueue for upon receiving config updates which could affect the replica. This setting is off by default. Enabling this setting speeds up how quickly config-triggered replication changes begin, but adds additional CPU overhead. The overhead scales with the number of leaseholders.
  • The RPC dial and heartbeat timeouts can now be configured via the following environment variables: COCKROACH_RPC_DIAL_TIMEOUT, which defaults to 2x the value of COCKROACH_NETWORK_TIMEOUT; COCKROACH_RPC_HEARTBEAT_TIMEOUT, which defaults to 3x COCKROACH_NETWORK_TIMEOUT. This allows configuring these values independently of , which defaults to 2s.
  • The default gRPC server-side send timeout has been increased from 2 seconds to 4 seconds (that is, from 1x to 2x the default value of ), to avoid spurious connection failures in certain scenarios. This can be controlled via the new environment variable COCKROACH_RPC_SERVER_TIMEOUT.
  • Added a new gauge sql.schema.invalid_objects. This gauge is periodically updated based on the schedule set by the sql.schema.telemetry.recurrence . When the metric is updated, it counts the number of schema objects ( , , , , and ) that are in an invalid state according to CockroachDB’s internal validation checks. This metric is expected to be zero ( 0 ) in a healthy cluster. If it is not zero, it indicates that there is a problem that must be repaired.
  • The kv.allocator.lease_rebalance_threshold can now be used to control the minimum fraction away from the mean a lease count before it is considered for lease transfers. The default setting is 0.05.
  • On Linux/ARM64, 16k page sizes are now used in jemalloc. This allows Linux/ARM64 users with 16k pages to run cockroach.

DB Console changes

  • The generic DB Console “unexpected error” message now includes details about the actual error, along with other context to make it easier to root cause.
  • Fixed a bug where the would flicker between the job details and a loading animation when a job was still executing.
  • Added a timescale label to the Diagnostics tab of the . Users are now able to see the time window for which the are displayed.
  • Fixed the options selection in the Sort dropdown on the .
  • Search is performed on all ID fields of the Transaction Executions and Statement Executions views on the .
  • Enabled the Now option on the time picker that appears on several pages of the .

Bug fixes

  • Fixed a bug where the node and regions columns on the did not properly render. This column is shown for clusters with more than 1 node.
  • Fixed an internal error when using on a statement. This error was introduced in v23.1.0.
  • Fixed a bug which manifested itself in error messages containing “failed to drop all of the relevant elements” when executing DDL statements with the declarative . What this really means is that there’s a concurrent schema change that is ongoing. Instead we now behave as expected and wait for it to finish.
  • Fixed a panic executing with pg_catalog.pg_prepared_statements as a source. For example: ; .
  • Fixed a panic executing with pg_catalog.cursors as a source. For example: ; .
  • Fixed a panic executing with crdb_internal.create_statements as a source. For example: ; .
  • Fixed a bug where the was crashing with an “invalid conversion to int” message.
  • Fixed a bug in the declarative where adding a or setting a column to NOT NULL with a non-existent column produced an assertion error instead of the proper pgcode.
  • will no longer incorrectly show schemas from the current database when the current database has a schema named db_name.
  • Fixed a bug in row count estimates of a scan from a partitioned , which may cause an underestimated row count or a panic if the row count goes to zero.
  • Fixed a bug where a during the backfill of the job_type column in the could result in some job records with no job_type value.
  • Fixed a bug where some would incorrectly be treated internally as , which could cause some operations to fail. The bug could occur if was used on CockroachDB or earlier, and the cluster was upgraded.
  • In the , selecting a database filter from the filters menu in the should function as expected. This fixes a bug where the filter would break and not show any results when the results were retrieved from the statement activity table instead of the persisted table.
  • The statement tag for is now corrected to be SHOW SEQUENCES instead of .
  • Fixed a rare bug in which some uploads via would silently upload incorrect data.
  • Under prolonged unavailability (such as loss of ), affected would exhibit growth that was quadratic as a function of the duration of the outage. Now this growth is approximately linear instead.
  • Fixed a bug on the page that was causing it to not update automatically on rolling window options.
  • Blocked dropping of impacted by if dropping those indexes could cause data loss to occur.
  • are now properly showing the information from . The file crdb_internal.cluster_settings.txt in debug zips was empty due to this bug on CockroachDB (which was the only version affected).
  • A bug has been fixed that caused internal errors instead of user errors when queries contained labelled with a different number of elements and labels, e.g., (ROW(1, 2) AS a). This bug had been present since CockroachDB .
  • Fixed a failing when or sources from a SHOW command as in the following examples:
    • CREATE TABLE t AS SELECT * FROM [SHOW CREATE TABLE tbl];
    • CREATE TABLE t AS SELECT * FROM [SHOW INDEXES FROM tbl];
    • CREATE TABLE t AS SELECT * FROM [SHOW COLUMNS FROM tbl];
    • CREATE TABLE t AS SELECT * FROM [SHOW CONSTRAINTS FROM tbl];
    • CREATE TABLE t AS SELECT * FROM [SHOW PARTITIONS FROM TABLE tbl];
    • CREATE TABLE t AS SELECT * FROM [SHOW PARTITIONS FROM INDEX tbl@tbl_pkey];
  • Index recommendations in the no longer use the fully qualified name of a table to create an index name, allowing the creating of directly from the DB Console to work.
  • Fixed a bug where could fail if any objects were offline, which can happen during a .
  • The pg_get_serial_sequence can now handle mixed-case names correctly.
  • Fixed a bug with the “SQL statement diagnostic request” that would affect CockroachDB Serverless clusters was fixed. This bug had existed since CockroachDB .
  • Fixed a bug where under rare circumstances, a change could get stuck when proposed near lease/leadership changes (and likely under overload), and the could trip.
  • Fixed a bug in upstream etcd-io/raft which could result in pulling unlimited amount of logs into memory, and lead to out-of-memory errors. Now the log scan has a limited memory footprint.
  • Fixed a bug where, in rare circumstances, a replication could get stuck when proposed near lease or leadership changes, especially under overload, and the [replica circuit breakers]( ../v23.1 could trip. A previous attempt to fix this issue has been reverted in favor of this fix.
  • Fixed a bug in the SQL syntax for description.
  • Fixed an internal error in , , , or statements run concurrently with of a on the same table.
  • Fixed a bug that caused internal errors when using in and that have . This bug was present when using views since version v21.2. It was present when using user-defined functions since .
  • The timeout duration when loading the has been increased to 30 minutes.
  • Fixed the SQL syntax for descriptions.
  • Reduced on the system.statement_statistics table which has caused the compaction to fail.
  • The ST_ClosestPoint previously did not preserve the correct when comparing two different . This is now resolved.
  • CockroachDB would previously crash when evaluating the ST_AsEncodedPolyline on a . The bug was introduced before CockroachDB and is now fixed.
  • Fixed a bug where dropping an could end up failing or cleaning (when CASCADE is specified) on other tables referencing the target table with this index.
  • Fixed a bug where CockroachDB would return an error when using in a construct.
  • Cloud buckets containing can now be copied via AWS DataSync and other third-party services which insert empty objects with a trailing /. Previously, would fail with the following error message: read LATEST path: path does not contain a completed latest backup: NoSuchKey.
  • Fixed a bug where involving a column could end up hanging.
  • Fixed a nil pointer dereference caused by a race condition when using the to_char .
  • Since , using a PTP clock device (enabled by the ) would generate timestamps in the far future. It now generates the correct time. This could cause nodes to crash due to incorrect timestamps, or in the worst case irreversibly advance the cluster’s into the far future.
  • Previously, CockroachDB, when planning expressions containing many sub-expressions (e.g., deeply-nested AND / OR structures), would use memory quadratic in the number of sub-expressions. In the worst cases (thousands of sub-expressions), this could lead to . The bug had been present since at least and has now been fixed.
  • When losing a and using , the lease can be acquired by any other (regardless of lease preferences) in order to restore availability as soon as possible. The new leaseholder will now immediately check if it violates the lease preferences, and attempt to transfer the lease to a replica that satisfies the preferences if possible.
  • Fixed the when sources from , e.g.: CREATE TABLE t AS SELECT * FROM [SHOW CREATE FUNCTION f].
  • Added cancel checking to constraint initialization code to allow queries to timeout during if analyzing predicates to constrain an index starts using too many resources. Example of setting a timeout using the : SET statement_timeout='5.0s';
  • Previously, CockroachDB could encounter an internal error unexpected non-zero bytes limit for txnKVStreamer when evaluating lookup in case it had to perform the remote regions’ lookup. The bug was introduced in and is now fixed. A temporary workaround can be accomplished without upgrading by setting the streamer_enabled : SET streamer_enabled = false;.
  • Fixed a spurious error no data source matches prefix that could occur during with DISTINCT ON and or ORDER BY DESC NULLS FIRST.
  • Fixed an costing bug introduced in that could cause a query involving two or more with tables to not pick the most optimal .
  • Fixed an costing bug introduced in that could cause a query whose best-cost query plan is a string of with tables, one after the other in sequence, to not pick the most optimal join plan.
  • Previously, using for DELIMITED DATA or MySQL imports would error with column... does not exist if it was importing into a column. This is now fixed.
  • Fixed a bug introduced in that could cause the precision of some values to be incorrectly truncated for a query with a correlated and an equality between a column from the subquery and the outer query. This applies to types that are “equivalent” but have different precision levels, e.g., vs DECIMAL(10, 2) or NAME vs .
  • Fixed a bug where , , , , and statements would not be written to the or .
  • Fixed a bug where a session migration performed by SHOW TRANSFER STATE would not handle prepared statements that used the . Users who encountered this bug would see errors such as expected 1 or 0 for number of format codes, got N. This bug was present since .
  • Fixed errors on the in the when a session’s memory usage is zero bytes.
  • Fixed a bug introduced in that could cause a to infinite-loop in rare cases when (1) the join filter is not an equality and (2) no columns from the left input are returned.
  • Fixed an issue with the full scan filter on the where the filter was always evaluating to false, even if a full scan had occurred.
  • Fixed a bug that could cause CPU usage to increase over time.
  • Fixed a bug that could cause some rows to be silently skipped during when a node’s import worker failed.
  • Fixed a bug in queries, where a query filter of the form ST_Distance(geog1, geog2) > constant, or ST_MaxDistance(geom1, geom2) > constant, where the operator is one of >, <, >=, <=, or a filter of the form ST_Distance(geog1, geog2, false) = 0 may mistakenly evaluate to true when one or both of the inputs is NULL or an empty or . More rows could be returned by the query than expected.
  • Fixed an issue where a can be called on an invalid key that’s in the form of someValidKey.Next() during . This split key can land in the middle of a row with , and thus result in failing SQL queries when querying the restored table.
  • Fixed an issue where a can be called on an invalid key that’s in the form of someValidKey.Next() during with the bulkio.restore.use_simple_import_spans=true. This split key can land in the middle of a row with , and thus result in failing SQL queries when querying the restored table.
  • Fixed a bug that caused a flood of requests to refresh on the . If a user would like to see the effect of a modified cluster setting in , a page reload is now required.

Performance improvements

  • no longer perform work proportional to the number of pending that they encounter, so they are more than 100x faster when encountering long-running, bulk writing transactions.
  • Queries that access and that perform introspection on other tables in those schemas are now significantly faster.

Contributors

This release includes 378 merged PRs by 67 authors.

v23.1.8

Release Date: August 7, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.8.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.8.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.8.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.8.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.8.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.8.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.8.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.8.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.8.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.8.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Enterprise edition changes

  • can now be stored in a file with the following YAML format:
    Set the environment variable COCKROACH_AZURE_APPLICATION_CREDENTIALS_FILE to the path of the file. The implicit authentication method first attempts to authenticate using credentials in the file before attempting to authenticate using any other credentials specified in the DefaultAzureCredential class, such as environment variables and Managed Identity. These credentials can also be used for .

Bug fixes

  • Fixed a bug where could drop unrelated . For example, if DROP INDEX... CASCADE was executed on a unique index for a Table A, and if a Table B had a foreign key reference to Table A, unrelated outbound foreign key constraints on Table B would be dropped.
  • Fixed a bug that would result in corruption of . If a node with this corrupted state was restarted, the node could fail to rejoin the cluster. If multiple nodes encountered this bug at the same time during roll out, the cluster could lose . For more information, refer to .

Contributors

This release includes 5 merged PRs by 5 authors.

v23.1.7

Release Date: July 31, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.7.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.7.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.7.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.7.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.7.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.7.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.7.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.7.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.7.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.7.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

SQL language changes

  • Added the crdb_internal.reset_activity_tables to allow users to reset the statistics in the system.{statement|transaction}_activity tables. Users require the to use this built-in function.
  • Added the sql.telemetry.query_sampling.internal.enabled , which is false by default. If set to true, internal app queries will be reported to when query sampling to telemetry is .

DB Console changes

  • Added a timescale label to the of the . The time window for the statement diagnostics is now displayed.
  • Increased the timeout duration for loading the to 30 minutes.

Bug fixes

  • The Regions/Nodes column on the will now render properly. This column displays for clusters with more than 1 node.
  • Fixed a bug where the would flicker between the job details and a loading animation while a job is still executing.
  • Fixed a bug where the would crash due to an invalid conversion to int error.
  • Fixed a bug that caused an infinite re-render on the when a custom time period was selected.
  • Fixed a bug on the SQL Activity, where the database filter would not return results even when statements existed for the selected database. This is now fixed so that selecting a database filter from the filters menu on the will function as expected.
  • Fixed a bug where the was not updating automatically on rolling window options.
  • Fixed a bug where on the were not always showing. This is now fixed with statement diagnostics displaying for the correct time period.
  • Fixed a bug where the Sort dropdown on the would not persist the selected value because a page reload was triggered.
  • Fixed a bug where the index recommendation on the would use the fully qualified table name to create an index name, which would cause an error due to the invalid syntax. Indexes can now be created directly from the DB Console without encountering this error.
  • Fixed a bug where would fail when upgrading to version v23.1.5 because the job record did not have a clusterID field set.
  • Fixed a bug where UPDATE, UPSERT, DELETE statements running concurrently with of a virtual computed column on the same table would fail.
  • Fixed a bug where would fail. This is now fixed by reducing the contention on the system.statement_statistics table.
  • Fixed a bug where running a that targets a table with a user-defined type column and with the set to any value other than wrapped would cause a node panic due to a nil dereference.

Contributors

This release includes 16 merged PRs by 11 authors.

v23.1.6

Release Date: July 24, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.6.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.6.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.6.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.6.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.6.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.6.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.6.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.6.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.6.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.1.6.windows-6.2-amd64.zip
( SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Bug fixes

  • Fixed a bug in v23.1.5 where were empty in the crdb_internal.cluster_settings.txt file. Debug zips now properly show the information from cluster_settings.
  • Fixed a bug where some primary indexes would incorrectly be treated internally as secondary indexes, which could cause schema change operations to fail. The bug could occur if was used on v21.1 or earlier, and the cluster was upgraded.
  • Extended the cockroach debug doctor to detect which could potentially lose data by being dropped when a column is stored inside them and added a check inside to prevent dropping indexes with this problem to avoid data loss.

Contributors

This release includes 3 merged PRs by 15 authors.

v23.1.5

Release Date: July 5, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.5.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.5.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.5.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.5.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.5.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.5.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.5.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.5.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.5.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Security updates

  • The full set of TLS ciphers that was present in v22.1 have been included in the existing cipher suites list, which can be enabled with the COCKROACH_TLS_ENABLE_OLD_CIPHER_SUITES environment variable.

Enterprise edition changes

  • Added new in the server.oidc_authentication.generate_cluster_sso_token namespace that support using OIDC to generate a .

SQL language changes

  • Improved the inline documentation and error messages related to .
  • Inbound on TTL tables are now allowed.
  • Added the columns default_value and origin ( with the values default, override, external-override ) to the command.
  • Added the VIEWACTIVITY and VIEWACTIVITYREDACTED for the crdb_internal.cluster_queries and crdb_internal.node_queries .
  • Fixed the error message to be more understandable when attempting to create under a virtual or temporary schema.

Command-line changes

  • Running for a node that has already been decommissioned will now exit with code 0, as had been the case in CockroachDB versions prior to v23.1.0.

DB Console changes

  • The (route /reports/range/:rangeID ) shows the Hot Ranges menu item as highlighted in the left-side menu. The back button in the Range Report page redirects back to the Hot Ranges page.
  • Added description to the tooltip for the Idle status only for the Active Transactions view. Excluded Idle status filter option for the Active Statements view.

Bug fixes

  • Added more precision to small percentage values on the percentage bars on the DB Console.
  • Fixed a crash when using DurationToNumber with empty duration object on SQL Activity tables.
  • SpanStats is no longer subject to stale information, and should be considered authoritative.
  • Fixed a bug in MuxRangefeed implementation that may cause MuxRangefeed to become stuck if enough ranges encountered certain error concurrently.
  • no longer fails on v22.2 and v23.1 mixed-version clusters.
  • no longer causes the grantee to be unable to log in. This was due to a bug where ALL would include the NOSQLLOGIN . Since NOSQLLOGIN is the only “negative” privilege, it is now excluded from the ALL shorthand, and must be granted explicitly in order to restrict logins.
  • CockroachDB previously could encounter zero transaction timestamp in EvalContext when evaluating the command. The bug was introduced in v23.1.0 and is now fixed.
  • Fixed the data fetching for the Database and Table Details pages. Prior to this change, some databases/tables could be permanently stuck in a loading state, causing their corresponding page to permanently show a spinner. This change fixes the data fetching for these pages to ensure all databases and tables are loaded correctly.
  • Fixed a bug where queries incorrectly resulted in an “ambiguous column” error. The bug only presented if the target table had a computed column with an expression referencing a column with a DEFAULT value.
  • On the SQL Statistics pages, a transaction query is now available as long as the statement fingerprints associated with the transaction also exist in the payload.
  • Previously, CockroachDB would crash when evaluating statements when the AS clause selected data from crdb_internal.cluster_statement_statistics or crdb_internal.cluster_transaction_statistics virtual tables. The bug has been present since at least v22.1 and is now fixed.
  • Fixed a source of mutex contention within the storage engine that could increase tail latencies on high-CPU, high-throughput deployments.
  • Fixed a bug where nodes could terminate with the following message: server startup failed: cockroach server exited with error: ‹migration-job-find-already-completed›: key range id:X is unavailable: ‹failed to send RPC: no replica node information available via gossip for rX›.
  • Previously, cross-database type references were allowed through CREATE TABLE...AS statements if the source table was from another database and any of its columns was of a user-defined type. This introduced a bug where the source table could be dropped and the type could not be found for the CTAS table. This commit disallows such CTAS as a fix.
  • CockroachDB can now automatically delete statistics for dropped tables from system.table_statistics table. However, out of caution, this mechanism is disabled by default on v23.1 releases.
  • Fixed a race condition that can occur when multiple SQL servers are created simultaneously, causing simultaneous writes to an unprotected global variable used to configure a CCL audit logging feature.
  • Previously, referencing a user-defined type in the body of a would result in an error at the time of creating the function. This is now fixed.
  • CockroachDB now returns an error during creation if an input argument has type RECORD.

Performance improvements

  • If the sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled is disabled, the optimizer can now eliminate uniqueness checks for STRING and BYTES columns when the value is set to gen_random_uuid() (with an implicit or explicit cast to STRING or BYTES ). If you still want the checks, you can set sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled to true (the default is false ).

Contributors

This release includes 115 merged PRs by 44 authors.

v23.1.4

Release Date: June 20, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.4.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.4.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.4.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.4.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.4.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.4.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.4.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.4.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.4.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Security updates

  • The new cluster setting allows a user with the to grant and revoke non-admin roles. This cluster setting defaults to false, but is expected to become the default behavior in the future.

Enterprise edition changes

  • Fixed an initialization race condition in that could cause a node to crash with a null pointer exception.

SQL language changes

  • Users with can now view only sql.defaults instead of all cluster settings.

Operational changes

  • The archive now contains the files formerly located at nodes/*/ranges/*.json in one file per node, nodes/*/ranges.json.
  • The http-defaults and http-servers sections of the will now accept a headers field containing a map of key-value string pairs which will comprise custom HTTP headers appended to every request. Additionally, a compression value can now be set to gzip or none to select a compression method for the HTTP request body. By default, gzip is selected. Previous functionality did not compress by default.

Command-line changes

  • The new log config option allows you to . This is useful for APIs that consume JSON arrays, such as the Datadog logs API.

DB Console changes

  • The DB Console overview page now displays a warning when all nodes are running on a new version but the cluster upgrade has not been finalized.
  • The histogram window merge calculation now interpolates quantile values more accurately, and in the DB Console are smoother and more accurate.

Bug fixes

  • Fixed a bug where a transaction retry could miss job rows during the backfill of the .
  • Fixed a bug where admin or root user privileges were erroneously required to use .
  • Fixed a bug that prevented display of the column selector on the .
  • Fixed a bug where an invalid split could crash and prevent restarts of nodes that hold a replica for the right-hand side.
  • Fixed the debug recover make-plan command to ignore partial range metadata when the metadata can’t be fully read, and instead rely solely on replica info from storage to produce the recovery plan.
  • Fixed a metric bug that could cause volumes such as RAID logical volumes to be counted twice.
  • Fixed a bug in upstream etcd-io/raft which could cause an unlimited amount of log to be loaded into memory. This could cause a node to crash with an out-of-memory (OOM) exception. The log scan now has a limited memory footprint.

Contributors

This release includes 53 merged PRs by 30 authors.

v23.1.3

Release Date: June 13, 2023
A bug was discovered in a change included in v23.1.3 (this release). This bug can affect clusters upgrading to v23.1.3 from . In an affected cluster, jobs that were running during the upgrade could hang or fail to run after the upgrade is finalized. Users upgrading from v22.2.x are advised to use v23.1.2 to upgrade, or to set the cluster setting to delay finalization of the upgrade until they can upgrade to v23.1.4.

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.3.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.3.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.3.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.3.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.3.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.3.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.3.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.3.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.3.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Security updates

  • The new server.client_cert_expiration_cache.capacity allows you to configure the minimum time until a user’s set of client certificates will expire. When server.client_cert_expiration_cache.capacity is set to a non-zero value, the new metric security.certificate.expiration.client tracks the number of client certificates that have expired.

Enterprise edition changes

  • Role-based audit logging is now an Enterprise feature. Only Enterprise users will be able to configure role-based audit logging using the sql.log.user_audit .
  • The new sql.log.user_audit enables role-based auditing. When the setting is enabled, you can set an audit logging configuration using a table-like syntax. Each row in the configuration represents an audit setting in the configuration. An audit setting is comprised of the following columns: USER/ROLE and STATEMENT_FILTER:
  • Introduced the sql.log.user_audit.reduced_config.enabled . When enabled, this cluster setting computes a “reduced” based on the user’s current role memberships and the current value for the sql.log.user_audit cluster setting. The “reduced” audit configuration is computed at the first SQL event emit by the user, after the setting is enabled. When the cluster setting is enabled, CockroachDB can compute the audit configuration once at session start, which provides around a 5% increase in throughput. However, changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within a session. A new session should be started to reflect the configuration changes in auditing behavior.

SQL language changes

  • When the sql.trace.stmt.enable_threshold or sql.trace.txn.enable_threshold is enabled, the logging output is now emitted on the . Previously, this was emitted to the .
  • now lists privileges inherited by role membership. SHOW GRANTS ON ROLE statements no longer require any privileges and also lists implicit grantees.

Operational changes

  • The new leases.liveness shows the number of leases per node to track the liveness range leaseholder.
  • The new a gauge metric sql.conns_waiting_to_hash counts the number of connection attempts that are being limited due to the number of concurrent password hashing operations. This behavior has been present since v21.2 to . The metric is expected to be 0, or close to 0, in a healthy setup. If the metric is consistently high and connection latencies are high, then an operator should do one or more of the following:
    • Ensure applications using the cluster have properly configured .
    • Add more vCPU or more nodes to the cluster.
    • Increase the password hashing concurrency using the COCKROACH_MAX_PW_HASH_COMPUTE_CONCURRENCY .

DB Console changes

  • Added merge queue failure and merge queue processing time metrics to the and graphs respectively.
  • Removed the Circuit Breaker Tripped Events graph from the dashboard.
  • Added Completed time to and pages, and updated the time format on those pages to include seconds and milliseconds.
  • Added a Created SQL Connections chart on the dashboard under Metrics.
  • Added Ranges in Catchup Mode and Rangefeed Catchup Scans Duration charts to the dashboard.
  • The sort setting on the page is now persisted across page reloads and navigation.
  • The page now supports a large number of tables for a single database. If more than 40 tables are present in a database, the sort on the page will be disabled; however, it is still possible to filter by table name.
  • On the Statement Details page, renamed the “Idle Latency” metric to “Client Wait Time” and separated it into its own chart.
  • Added more search criteria options on the page:
    • For the Top dropdown: 1000, 5000, and 10000.
    • For the By dropdown on the Statements tab: Last Execution Time, Max Latency, Max Memory, Min Latency, Network, P50 Latency, P90 Latency, Retries, and Rows Processed.
    • For the By dropdown on the Transactions tab: Max Memory, Network, Retries, and Rows Processed.
  • Added a new link to the Range Status page on the dashboard that opens the Enqueue Ranges page with the node ID already completed.
  • The DB Console will no longer show DROP INDEX recommendations for unique indexes.
  • On the Transactions tab of the page, the Status will be Idle if the executing transaction is not currently executing a statement. Previously, the status would be Executing.
  • Fixed the job that updates the statement_activity and transaction_activity tables on the page. The table size is now constrained when there are a lot of unique queries. This fix helps to prevent slowing down the SQL Activity page.

Bug fixes

  • Fixed a panic that could occur while a statement is logged for telemetry purposes.
  • Fixed a bug where disk space used by deleted and data would not be reclaimed in a timely manner, especially when a store has low-write workload.
  • Fixed a problem that could lead to erroneously refused lease transfers, causing the following error message: refusing to transfer lease to [...] because target may need a Raft snapshot: replica in StateProbe.
  • Fixed a bug where in v23.1.0 and beta versions would incorrectly encode data with multiple . The data must be dropped and re-imported to be encoded correctly.
  • Fixed a bug where running a that manipulates a store (e.g., debug compact ) without first terminating the node using the store, could result in corruption of the node’s store if encryption-at-rest was enabled.
  • Fixed a bug where did not work correctly if the database name or schema name being inspected had upper-case or special characters.
  • Fixed a bug that could cause queries with or to omit rows where column values are NULL in very rare cases. This bug was present since v20.2.
  • Fixed a bug that could cause goroutines to hang during .
  • The sys.cpu.combined.percent-normalized metric now uses GOMAXPROCS, if lower than the number of CPU shares when calculating CPU utilization.
  • The warning message about a missing --advertise-addr flag is no longer displayed when the flag is specified on server start.
  • Fixed a rare bug where stale multi-column table could cause table statistics forecasts to be inaccurate, leading to un-optimal query plans.
  • Fixed a bug in v23.1.0 where the node_id field would be omitted from logs. The node_id value has now been restored to the logs.
  • Fixed a bug where the collection of KV bytes read and KV gRPC calls execution statistics during could be incorrect (it would remain at zero) in some cases. The bug was introduced in the v23.1.0 release.
  • Fixed an incorrect results bug in v22.2.10 and v23.1.2 and above when the optimizer_use_improved_computed_column_filters_derivation is true. Predicates on are derived when an ORed predicate on a column in the computed column expression is present.
  • The no longer panics if an error is encountered while cleaning up stale samples. Instead, if the job encounters an error, the job will try again later.
  • Fixed a bug where it was possible for a SQL row to be split across two ranges. When this occurred, SQL queries could return unexpected errors. The real keys are now inspected rather than just request keys to determine load-based split points.
  • Fixed a bug which could cause a panic when a statement used the .
  • Fixed a rare race condition that could allow large jobs to fail with an unable to find store error.
  • Fixed a bug where CockroachDB would not ignore the messages that it should, if there was an error while in the .
  • Fixed a bug in which some -related errors would be returned with an uninformative error.
  • Fixed a bug where in rare cases a panic could occur during shutdown in relation to the SQL activity computation. This bug was introduced in v23.1.0.
  • The backfill of system.job_info upgrade migration that runs during upgrades from v22.2 now processes rows in batches to avoid cases where it could become stuck due to and transaction retries.
  • Fixes a bug in which would fail to show a that contained .

Performance improvements

  • If is set to a non-zero value, CockroachDB now ensures that any single scan never reads more than transaction_rows_read_err + 1 rows. This prevents transactions that would error due to the transaction_rows_read_err setting from causing a large performance overhead due to large scans.
  • Improved the efficiency of the an internal job that during upgrades deleted descriptors of dropped functions. Previously, the job would check every single ID until the max descriptor ID, which was particularly inefficient when this was large. Now, the job only queries the upper bound ID of each batch.

Contributors

This release includes 111 merged PRs by 41 authors.

v23.1.2

Release Date: May 30, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.2.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.2.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.2.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.2.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.2.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.2.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.2.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.2.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.2.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Backward-incompatible changes

  • Schema names in the session variable now respect case and must be delimited with double quotation marks. Previously, if a search_path was specified in the connection string parameters, it would be treated case insensitive by default.
#101493

General changes

  • Queries with invalid syntax are now logged at in the SQL_EXEC log channel. Previously, these were logged at the ERROR level.

Enterprise edition changes

  • now support wrapped envelope with diff ( envelope='wrapped', diff ).
  • will make fewer duplicate schema registrations.
  • Added logic to set the cluster’s multi-region system database’s to the max non-system database’s survival whenever an ALTER DATABASE...SURVIVE...FAILURE is issued.
  • (JWT) can now read SQL usernames from any JWT claims instead of requiring the subject claim to be used. The claim can be controlled by the server.jwt_authentication.claim with an empty string or “sub” equivalent to the previous behavior.

SQL language changes

  • Added a new unbounded_parallel_scans, which controls whether scans will be parallelized across in more cases. Note that using this feature can lead to increased likelihood of , so it should be used with care (namely when you expect that the scan should read a “reasonable” number of rows - probably less than 10k). Also note that aren’t affected by this variable; cross-range parallelism of scans continue to be disabled for such queries.
  • Statements of type are not longer displayed on the .
  • Fixed , so it generates even if an error occurs when getting the names.
  • Added a new SQL activity updater job which updates the system.transaction_activity and system.statement_activity tables based on the tables.
  • Added two views to the : crdb_internal.statement_activity, which surfaces data in the persisted system.statement_activity table and crdb_internal.transaction_activity, which surfaces the system.transaction_activity table.
  • Tables with settings can now have outbound .
  • Span statistics are now unavailable on mixed-version clusters.
  • Introduced the to_char(date, format) , which converts a given date to a string using the given format string.
  • Renamed an existing metric changefeed.table_metadata_nanos to changefeed.schemafeed.table_metadata_nanos and introduced a new metric changefeed.schemafeed.table_history_scans, which records the number of table history scans the performs.
  • Changed the generation for pg_catalog. For example column, index and constraint OID ‘s will have different values. Relation, type and function OID ‘s remain unchanged.
  • Added a new optimizer_use_improved_computed_column_filters_derivation, which defaults to FALSE. When TRUE, the optimizer will derive filters on computed columns in more cases.
  • Crdb_internal.transaction_contention_events, crdb_internal.node_contention_events, and crdb_internal.cluster_locks will now redact keys provided the user has . Crdb_internal.node_contention_events can only be viewed if the user has any of admin, VIEWACTIVITY or VIEWACTIVITYREDACTED.

Operational changes

  • Added the rebalancing.replicas.cpunanospersecond histogram , which provides insight into the distribution of replica CPU usage within a store.
  • Added the rebalancing.replicas.queriespersecond histogram , which provides insight into the distribution of queries per replica within a store.
  • The amount of traffic in flight from a single to a follower has been reduced from 256 MB to 32 MB. This reduces the chance of running out-of-memory during bulk write operations. This can be controlled via the environment variable COCKROACH_RAFT_MAX_INFLIGHT_BYTES.
  • Added the leases.requests.latency, which records a histogram of lease request latencies.
  • When local corruption of data is encountered by a background job in the , a node will now exit immediately.
  • When the flag is enabled, the crdb node will always attempt to query SRV records of an address when dialing remote targets, and fall back to use the address verbatim if the SRV query fails. Previously, SRV queries were only attempted once when a node starts.
  • The default Raft scheduler concurrency, controlled by COCKROACH_SCHEDULER_CONCURRENCY and defaulting to 8 per CPU core capped at 96, is now divided evenly across stores instead of applying individually per store. This avoids excessive Go scheduler pressure and memory usage on nodes with many stores. The common case of 1 store per node is not affected.
  • Workload generators now export Go runtime metrics via endpoint.
  • Serverless databases that are created without a primary region will now inherit regions from the Serverless cluster’s regions.

Command-line changes

  • The command now accepts an --include-range-info flag, which determines whether CockroachDB retrieves individual nodes/*/ranges/*.json files, which was previously done by default. For large clusters, this can dramatically reduce the size of the generated artifacts. This flag defaults to FALSE.
  • now jitters the teardown of connections to prevent a thundering herd of queries impacting P99 latency results.
  • Workload utility now has flags to tune the used for testing. See --conn-healthcheck-period, --min-conns, and --max-conn-* flags for details.
  • Workload now supports every PostgreSQL query mode available via the underlying pgx driver.
  • The \connect client-side command for the SQL shell (included in cockroach sql, cockroach demo, cockroach-sql ) now recognizes the option autocerts as its last argument. When provided, \c will now try to discover a client certificate and key in the same directory(ies) as used by the previous connection URL. This feature makes it easier to switch usernames when TLS client/key files are available for both the previous and new username.

DB Console changes

  • The Application Name column is now shown by default in the pages. Statements and transactions fingerprints will be displayed per application on the Overview pages rather than grouped into a single fingerprint ID.
  • When going from the pages or the pages to the Fingerprint Details page, the Details page will fetch data for the statement with the provided application name. For Overview pages, this is the application name of the selected row. For Insight details, this is the application of the execution that generated the insight.
  • Updated the side nav name and Network Diagnostics page title to Network. Updated the page title to Advanced Debug.
  • Added an option to select the trace rate for collection.
  • Added a time scale selector to the page, making it possible to see bundles only from the selected period.
  • Added draining node as its own value on the page, instead of counting it as a dead node.
  • Added the ability for users to view timestamps in in their preferred timezone via the cluster setting ui.display_timezone. Previously, only the timezones Coordinated Universal Time and America/New_York were supported.
  • An alert on page is shown when the cluster setting cluster.preserve_downgrade_option is set, and no longer waits 48 hours to show.
  • Added for Serverless.
  • Added _status/load to the list of Raw Status Endpoints on the page.
  • If a page crashed, a force refresh is no longer required to be able to see the other pages on .
  • The filter on the page is now working properly. Fixed the type on the JSON object from stmtTyp to stmtType.
  • Added missing information on the page about latency information of most used fingerprints.

Bug fixes

  • Fixed the sql.mem.distsql.current so it would no longer double count the memory usage of remote DistSQL flows.
  • Fixed a rare bug introduced prior to v22.1 where distributed plans could cause the graceful drain of a node to become stuck retrying forever during . This bug led to errors like drain details: distSQL execution flows:, together with a non-zero number of flows that does not reduce over a long period of time.
  • Fixed a bug that caused a to fail occasionally due to incorrect schema ID resolution when restoring a backup with .
  • Fixed a bug that caused suboptimal query plans to be generated by when the table being queried contained infinite values, e.g., '+Infinity'::DECIMAL. This bug was present since v22.1 (and likely earlier). It could also be triggered in rare cases when forecasts created a forecasted bucket with an infinite value.
  • Fixed a rare internal error in that existed since before v22.1, which could occur while enforcing orderings between SQL operators.
  • Fixed a bug so that crdb_internal.deserialize_session internal function works properly with prepared statements that have more param type hints than params.
  • Fixed a bug that caused internal errors when executing with empty bodies. This bug was only present in alpha pre-release versions of 23.1.
  • The search_path now supports schema names that have commas in them. Also, fixed a bug in parsing a search_path with a quote in it when specified in the .
  • Fixed a bug that has existed since were introduced that could cause a function call to resolve to the wrong function after changes to the .
  • Fixed an internal error that could occur when the enforce_home_region is on and the input to the lookup join is a SELECT of scalar expressions (e.g., 1+1 ). Also, with no home region now error out with enforce_home_region set.
  • Previously, CockroachDB alpha and beta versions of 23.1 would panic on command when the GOMEMLIMIT environment variable was set and the --max-go-memory flag wasn’t specified. This is now fixed.
  • Fixed a bug whereby some tables’ physical disk space could not be calculated by .
  • Fixed a bug that caused errors in test builds and potentially incorrect results in release builds when invoking a with a subquery argument. This bug was only present in v23.1 alpha versions.
  • Point and that write to a remote region of a table created with the clause will now error out.
  • Fixed a bug in the pg_get_indexdef and col_description that could cause the functions to return errors if the user created tables named pg_indexes or pg_attribute. Or, if the user created a schema named system with a table named comments. This bug was only present in pre-release versions of v23.1.
  • The descriptions of rebalancing.readbytespersecond and rebalancing.writebytespersecond metrics now correctly reference bytes read and bytes written, respectively.
  • Fixed a bug to ensure that the used per index is shown even when there is a max-size limit on the SQL API.
  • Fixed a bug where, when CockroachDB failed to retrieve , the full page would return an error. Now, the Insights page will load even when there is an issue with decoding contention information.
  • Fixed a bug where a operation with skip_localities_check could fail with errors if regions were missing on a cluster.
  • Fixed a bug in that could cause an internal error in rare cases for a query with that could be simplified to non-outer joins and at least one semi-join. This bug was present since before v22.1.
  • Fixed a bug where CockroachDB previously incorrectly evaluated statements that had projections or rendering on top of the EXPORT (e.g. the WITH cte AS (EXPORT INTO CSV 'nodelocal://1/export1/' FROM SELECT * FROM t) SELECT filename FROM cte; ). Such statements would result in panics or incorrect query results. Note that the exported data wasn’t affected, only the presentation of the query result. This bug had been present since v22.1 or earlier.
  • Fixed a bug in introduced in v22.2.0 that could cause queries containing a with a lateral join, in which the right side of the lateral join was an , to return an internal error in some cases. For example, it could cause an error if the subquery was provided as an argument to an .
  • Fixed handling of expressions in IN clauses such as (c1, c2) IN (SELECT c3+1, c4+1 FROM...). Previously, such query expressions would error out during type checking.
  • Fixed a potential bug whereby a failed or cancelled could leave some of the imported rows behind after it was cancelled, in the rare event that the writing processes were slow enough to continue writing after the cleanup process had started.
  • Fixed a bug that could cause incorrect results for queries invoking STRICT . This bug was only present in pre-release versions of 23.1.
  • Fixed a bug where CockroachDB’s implementation would incorrectly parse arrays if they were sent as placeholder arguments to a prepared statement, and the argument had spaces in between the array elements.
  • Fixed a very rare bug that could cause keys to be unexpectedly deleted locally within a by during a write heavy workload.
  • Fixed a bug in the behavior of the enforce_home_region that may have allowed a hash join to be favored over a lookup join, or failed to error out remote accesses done by uniqueness checks for mutations on . Also, fixed static erroring of some locality-optimized lookup joins to now be handled dynamically during query execution.
  • Fixed a bug introduced in testing releases of v23.1 where a node could crash when evaluating a command when the schema had INT2 or INT4 type.
  • Fixed a bug where a with a key’s revision history split across multiple may not have correctly restored the proper revision of the key.
  • Fixed a bug in testing releases of v23.1 where a user could be prevented from logging in or viewing or changing if the cluster had a long enough period of inactivity.
  • Previously, CockroachDB could encounter a “command is too large” error when evaluating statements such that the new values combined exceeded the size of the kv.raft.command.max_size cluster setting. This bug had been present since before v21.1 and initially all write operations ( , , ) were affected; however, in v21.2 those three were fixed, but UPSERT was forgotten about. This is now fixed.
  • Fixed a bug introduced in v22.1.19, v22.2.8, and pre-release versions of 23.1 that could cause queries to return spurious insufficient errors. For the bug to occur, two databases would need to have duplicate tables each with a reference to another table. The error would then occur if the same SQL string was executed against both databases concurrently by users that have over only one of the tables.
  • Fixed a bug where was incorrectly allowed and would modify these columns node-wide.
  • Fixed a bug where the internal node pseudo-role was not viewable through introspection of pg_catalog tables.
  • Fixed a bug where statements would always fail when used in a prepared statement. CockroachDB now matches the pgwire handling of prepared COPY... TO statements.
  • Fixed a bug where the statement would fail because the sequence object was mapped to an incorrect internal privilege object.
  • Fixed a minor bug that caused an internal error for some queries with nested instead of the more appropriate “could not decorrelate subquery” error. This bug was only present in pre-release alpha and beta versions of 23.1.
  • Fixed a bug that allowed values to be inserted into an -type column that did not conform to the inner-type of the array. For example, it was possible to insert ARRAY['foo'] into a column of type CHAR(1)[]. This could cause incorrect results when querying the table. The insert now errors, which is expected. This bug was present since v21.1.
  • Fixed an issue where running SHOW HISTOGRAM to see the histogram for an -type column could cause a panic and crash the cockroach process. This issue has existed since v20.2.0.
  • Fixed the behavior of to return its results as a row instead of a tuple when UDFs are called in a query as a data source. This is now compatible with PostgreSQL behavior.
  • Fixed a bug in updates within its side-transport. Previously, during asymmetric partitions, a node that transfers a lease away, and misses a liveness heartbeat, could then erroneously update the closed timestamp during the stasis period of its liveness. This could lead to closed timestamp invariant violation, and node crashes; in extreme cases, this could lead to inconsistencies in read-only queries.
  • Fixed a bug where jobs would incorrectly process a table that spanned multiple ranges in rare cases. This bug had been present since v22.2.0. You were affected by this bug if you saw the error message "error decoding EncDatum of...: did not find terminator... in buffer...".
  • The Retry.Max field of the option for changefeeds was not correctly defined in the docs. The existing docs mention that it is “The maximum amount of time the sink will retry a single HTTP request to send a batch”, but this is incorrect. It actually represents the maximum number of retries which will be attempted when sending a batch in an HTTP request fails. This is now fixed to correctly capture its behavior. Also, fixed a bug where the retry time would wait for 4 seconds, regardless of Retry.Max. With this change, the new maximum retry time is 30 seconds. The initial backoff will keep doubling every time a retry occurs until the maximum of 30 seconds is reached. E.g. If Retry.Max = 4 and the initial backoff is 10 seconds, at most 4 retries will be performed with the backoff times 10, 20, 30, 30 seconds respectively.
  • Stopped using a NULL value for pg_constraint.conparentid. Now the value is hard-coded to 0, since CockroachDB does not support constraints on .
  • Fixed a bug where in v23.1.0 and beta versions would incorrectly encode data with multiple column families. The data must be dropped and re-imported to be encoded correctly.
  • Optimized over-head of and , which can lead to performance regression relative to v22.2
  • Timeseries counts will now show cumulative counts for a histogram rather than a windowed count. A -sum timeseries is also exported to keep track of the cumulative sum of all samples in the histogram.
  • Fixed a bug where CockroachDB could produce incorrect results when evaluating queries with clause in rare circumstances. In particular, some rows could be duplicated if all of the following conditions were met:
    1. The query had a LIMIT clause.
    2. The SORT operation had to spill to disk (meaning that LIMIT number of rows used up non-trivial amounts of memory, e.g. the rows were “wide”).
    3. The ORDER BY clause contained multiple columns and the ordering on the prefix of those columns was already provided by the index. The bug has been present since at least v22.1.
  • Fixed a bug where CockroachDB could previously encounter a nil pointer crash when populating data for page in some rare cases. The bug was present in v22.2.9 and v23.1.1 releases.
  • Fixed calls to undefined objects.
  • Fixed a bug where 0 with exponents < -6 would display as 0E(exponent) instead of printing all 0s, e.g. 0E-7 should be 0.0000000.
  • Fixed a bug that could prevent from working if the backup had a refresh materialized view mutation in it.
  • In earlier patch releases of v23.1, it was possible for to be excessively slow, slower than they were in earlier releases. It was also possible for them to fail with errors of the following form: operation "Export Request for span..." timed out after 5m0.001s. At least one of the reasons for this behavior is now addressed. This problem also affected v22.2 clusters if using a hidden-by-default, default-as-disabled admission.elastic_cpu.enabled cluster setting.
  • Fixed a crash/panic that could occur if placeholder arguments were used with the with_min_timestamp(to_timestamp($1)) .
  • Fixed a panic that could occur if a statement had a subquery that was logged with redaction markers.
  • Fixed a bug where and did not validate transactionally, which could prevent cleaning up removed regions after a .
  • now correctly returns a 2BP01 error when the given role has been granted privileges on a schema.
  • Fixed a bug where, under high CPU load, HTTP requests to certain API endpoints such as the health endpoint would start failing and then never succeed again until the node was restarted. This bug was introduced in v23.1.
  • When the option WITH TABLES or WITH INDEXES is passed to , the per-object start/end key columns now properly refers to the part of the object included inside the range identified by the current row. Previously, they could incorrectly point to keys outside of the current range’s boundaries. This bug had been introduced in v23.1.
  • Fixed a bug in VALUES clauses containing a call to a record-returning that could manifest as an internal error in some queries.
  • Fixed a bug with choosing optimal plan where using placeholders in recursive CTEs sometimes did not re-optimize correctly after plugging in the parameters.
  • Fixed a bug where kv was read when fetching a qualified name of a leased .

Performance improvements

  • Added an opt-in pacing mechanism to closed timestamp notifications. Pacing is controlled by the kv.rangefeed.closed_timestamp_smear_interval , which defaults to kv.rangefeed.closed_timestamp_refresh_interval. Lowering the smear interval makes the rangefeed closed timestamp delivery less spikey, which ultimately reduces its impact on foreground SQL latencies.
  • Queries that have in equality expressions are now more efficiently planned by when optimizer_hoist_uncorrelated_equality_subqueries is set to true.
  • dashboards now default to using a table optimized with the top data for the most used cases. Else, they use persisted data if available, and in-memory data otherwise.
  • Statistics on the system.jobs table are now automatically collected, which will enable to produce better query plans for internal queries that access the system.jobs table. This may result in better performance of the system.
  • Improved to decrease the commit-to-emit latency (i.e. The difference between an event’s MVCC timestamp and the time it is ready to emit to a downstream sink). Previously, it is determined by a non-documented cluster setting ( changefeed.experimental_poll_interval ) which defaults to 1s. To enable this performance improvement, users should “lock” the watched table with , which would disallow schema changes on <tbl>. If a schema change statement is attempted on a locked table, CockroachDB will reject it and return an error. The user could lock the table either before creating a changefeed or, when a changefeed is running, CockroachDB will be able to detect that and enable this performance improvement automatically. If the user is running a changefeed on a locked table but wishes to perform schema changes to the table, they need to explicitly unlock the table first with . After the schema change completes, the user can lock the table again to re-gain this performance improvement. The changefeed job itself does not need to be modified in any way by the user (e.g. the user does not need to pause the job when locking/unlocking a table). This change is a “pure” optimization in that if the table is not locked, everything should still work the way it used to.
  • Improved performance when joining with the pg_description table.
  • Added concurrency to speed up the phase of the that ingests backed up table statisitcs.
  • Added support for constrained scans using computed columns which are part of an when there is an IN list or OR ‘ed predicate on the columns that appear in the computed column expression.
  • Added two new statistics which are useful for tracking the efficiency of . Some snapshots will always fail due to system level “races”, but the goal is to keep it as low as possible.
    • range.snapshots.recv-failed - The number of snapshots sent attempts that are initiated but not accepted by the recipient.
    • range.snapshots.recv-unusable - The number of snapshots that were fully transmitted but not used.

Build changes

  • Updated the reported Build Tag for nightly (non-release) builds.

Contributors

This release includes 329 merged PRs by 70 authors. We would like to thank the following contributors from the CockroachDB community:
  • Eric.Yang

v23.1.1

Release Date: May 16, 2023

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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.1.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.1.linux-amd64.tgz
(SHA256)
ARMcockroach-v23.1.1.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.1.linux-arm64.tgz
(Experimental)

(SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.1.darwin-10.9-amd64.tgz
(SHA256)
cockroach-sql-v23.1.1.darwin-10.9-amd64.tgz
( SHA256)
ARMcockroach-v23.1.1.darwin-11.0-arm64.tgz
(SHA256)
cockroach-sql-v23.1.1.darwin-11.0-arm64.tgz
( SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.1.windows-6.2-amd64.zip
(SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Bug fixes

  • In CockroachDB v23.1.0 and its testing releases, executing to a target table that has multiple column families could corrupt the table. If data was copied into a table with existing rows, the data in those rows may be irrecoverable. The data would need to be dropped and re- to be encoded correctly. This has now been fixed. See for more information.

Contributors

This release includes 2 merged PRs by 2 authors.

v23.1.0

Release Date: May 15, 2023 With the release of CockroachDB v23.1, we’ve added new capabilities in CockroachDB to help you migrate, build, and operate more efficiently. Check out a summary of the most significant user-facing changes and then .

Downloads

This patch release has been withdrawn due to . We’ve removed the links to the downloads and Docker image.All the changes listed as part of this release will be in the next release. Do not upgrade to this release.

Feature highlights

This section summarizes the most significant user-facing changes in v23.1.0. For a complete list of features and changes, including bug fixes and performance improvements, see the release notes for previous testing releases. You can also search for .
The features highlighted below are freely available in CockroachDB self-hosted and do not require an to test enterprise features in a local, temporary cluster.

SQL

Queries
FeatureDescription
Full-text search using TSVector and TSQueryA full-text search is used to perform queries on natural-language documents such as articles, websites, or other written formats, with results often sorted by relevance.

You can rely on new built-in functions to make use of the new TSVECTOR and TSQUERY data types.
Improved developer experience for multi-region appsIf you have functionality that requires low latency and cannot tolerate delays between regions, you can enable the enforce_home_region option, whichensures that queries are executed within a single region. If a query doesn’t have a home region or is running outside of its home region, the optimizer now provides improved feedback and suggestions for executing the query within a single region.
Streamline migrations with improved COPY performanceEnhancements to the functionality behind COPY statements resulted in 2x faster migrations using AWS DMS.
Redact PII from statement bundlesLeverage statement bundles for debugging without introducing data privacy concerns. You can nowredact personally identifiable information (PII) from statement bundlesfor PCI compliance.
User-Defined Function (UDF) enhancementsUser-defined functions offer enhanced flexibility, performance, and reusability. This release brings a number of UDF enhancements, including: Inlining of supported UDFs within the query plan to improve performance; support for subqueries in statements, support for expressions with a * such as SELECT * , and support for returning a set of results (using SETOF). UDFs can now also be used in Changefeed expressions (Enterprise) and CHECK constraints, and referenced from other objects. Validations have been added to guarantee that all statements in the function body should be as strict as the expected UDF volatility. UDFs are also now included in backup and restore operations.
DELETE FROM … USINGWe have added support for theUSING clause on DELETE, which allows joining multiple tables for a DELETE clause. This change is in line with PostgreSQL functionality and extends the flexibility of DELETE.
Schemas
FeatureDescription
Support user-defined composite typesYou can now create your own enumerated data types.

For example:

CREATE TYPE t AS (a INT, b INT); CREATE TABLE a (a t); INSERT INTO a VALUES((1, 2)) SELECT (a).b FROM a
Declarative schema changer supports user-defined functions UDFsThe statements CREATE FUNCTION and DROP FUNCTION are now supported by the declarative schema changer.
Declarative schema changer fully supports constraintsThe statements ALTER TABLE…ADD CONSTRAINT and ALTER TABLE…DROP CONSTRAINT are now supported by the declarative schema changer.
Add configurable setting to adjust grant lease optionsA new session variable allow_role_memberships_to_change_during_transaction has been introduced which, when true, will make granting and revoking of role memberships faster at the cost of allowing some in-progress transactions to observe the previous role membership. By default, when granting or revoking a role from another role, the system waits until all transactions that are consulting the current set of role memberships to complete. This is done to preserve CockroachDB’s default isolation level. However, the downside of this wait is that grant and revoke will take longer than the longest currently executing transaction. In some cases, you may not care about whether concurrent transactions will immediately see the side-effects of the role grant or revoke operation, but would instead prefer that the operation finish quickly. For more information about this setting and how it works, seeGRANT limitations.
Sessions
FeatureDescription
New SQL shell editor with tab completionThe SQL shell has a new user interface that allows tab completion and more advanced navigation, streamlining developer workflows. After pressing tab, you can navigate database objects, keywords, and functions using arrow keys, pressing tab again to select one and return to the console. You can also use pattern matching to filter these entities and find what you need faster.
Support multiple active portals (Preview)Themultiple active portals feature of the Postgres wire protocol (pgwire)is available in CockroachDB, with limitations. This allows for more efficient data retrieval by reducing the number of roundtrips required between the client and server. Third-party tools such as asyncpg use this feature to implement efficient asynchronous communication between the PostgreSQL server and client. This can allow for faster, more scalable applications that can handle large amounts of data without slowing down the user experience.
Full support for asyncpgCockroachDB now offers full support for asyncpg, a PostgreSQL database interface library designed specifically for Python’s asyncio framework. It provides an efficient implementation of the PostgreSQL server binary protocol for high-performance asynchronous database applications. Asyncpg is commonly used with ORM libraries such as SQLAlchemy to provide a simple, flexible, and efficient adapter for working with PostgreSQL databases. This makes it ideal for handling large volumes of data and scaling applications to meet demanding performance requirements.

Security and compliance

FeatureDescription
Improvements to the redaction of data in observability artifactsWe have made a number of improvements to ensure that sensitive data can be redacted in observability artifacts produced by CockroachDB, such as debug.zip and statement bundles. These improvements, available to all Self-Hosted customers, also help Cockroach Labs to comply with PCI DSS in CockroachDB Dedicated.
FIPS-ready CockroachDB binariesFIPS-ready binaries and Docker images are available for CockroachDB 23.1.0 and above. Federal Information Processing Standards (FIPS) 140-2 is a standard used to approve cryptographic modules by the U.S. and Canadian governments for systems maintained by relevant agencies and organizations working with them for the purposes of encrypting and decrypting sensitive data. FIPS-ready CockroachDB binaries are designed for workloads that require FIPS 140-2. FIPS-ready CockroachDB delegates cryptographic operations to the OpenSSL library available on the host operating system, rather than Go’s cryptographic libraries. We recommend that OpenSSL has a FIPS 140-2 certificate. FIPS mode must be enabled in the Linux kernel to ensure that FIPS 140-2 is enforced by the operating system.
Support Oauth authentication protocol for changefeedsSee this item in Change Data Capture (Changefeeds).
Support encrypted backups with keys stored in Azure Key VaultYou can now take and restore encrypted backups using RSA keys stored in Azure Key Vault.
Expand on External Connections for ChangefeedsSee the Changefeeds section for more information.
New fine-grained system privilege to view all jobsThe new VIEWJOB system privilege allows a user to view all jobs when running commands like SHOW JOBS, without granting additional capabilities. This helps ensure alignment with the principle of least privilege by removing the need to assign broader privileges or role options like CONTROLJOB.

Recovery and I/O

Change data capture (Changefeeds)
FeatureDescription
Create scheduled exports using changefeedsChangefeeds can offer benefits over existing export functionality for customers who need higher levels of scale and observability. You can now create Changefeeds as Export functionality.
Use a webhook as a changefeed sinkThe use of a webhook sink to deliver changefeed messages to an arbitrary HTTPS endpoint has been promoted from Preview to GA.
CDC QueriesCDC Queries (formerly CDC Transformations) have been promoted from Preview to GA.
Use External Connections (GA) to remove a data exfiltration vectorUse external connections to specify and interact with resources that are external from CockroachDB. WithCREATE EXTERNAL CONNECTION, you define a name for an external connection while passing the provider URI and query parameters. BACKUP, RESTORE, IMPORT, EXPORT, and CREATE CHANGEFEED queries can interact with the defined external connection instead of a required, provider-specific URI. As a result, you can decouple the management and permissions of the external resource from the operation in which you’re using them. With the move from Preview to GA, this feature brings many new capabilities, such as fine-grained permission and support for schema registries, webhook and GC PubSub sinks, and the SHOW command.
Changefeed localityCREATE CHANGEFEED now accepts a WITH execution_locality option torestrict execution of the changefeed process to nodes within the specified locality filter.
Improved changefeed resilienceChangefeeds are more stable as the result of improved error handling. Changefeeds now default to retrying requests when encountering any error, except those deemed terminal.
Support Oauth authentication protocol for changefeedsOauth authentication uses a third-party software provider to authenticate with Kafka instead of providing CockroachDB with direct access to Kafka cluster credentials. The third-party authentication server provides a temporary credential token that CockroachDB then uses to connect to a customer’s Kafka cluster. This represents a security best practice, allowing users to authenticate without directly storing or sharing their credentials.
Disaster Recovery
FeatureDescription
Restrict backups to a localityYou can nowto a specific region/locality. Only the nodes in the specified locality filter will execute the backup, so only those nodes will need access to the backup storage bucket. If the node executing the backup does not have a specific range to be backed up, it will read it from the closest replica it can.
Support implicit authentication on AzureYou can now use implicit authentication on Azure for cloud storage authentication. If the node executing the backup does not have a specific range to be backed up, it will read it from the closest replica it can.
Support encrypted backups with keys stored in Azure Key VaultYou can now take and restore encrypted backups using RSA keys stored in Azure Key Vault.
Enforce supported backup versionsTo help ensure backups and restores are successful, CockroachDB now enforces its previous support for restoring backups on a cluster on a specific major version into a cluster that is on the same version or the next major version. Previously, restoring backups produced from even earlier versions was possible, but unreliable. Now, this operation is prevented with an error.

Database Operations

Observability
FeatureDescription
Key Visualizer (Preview)Using a visual heatmap of the latest historical range activity across the cluster, you can quickly identify hot spots and full table scans, enabling you to target ranges for performance investigations.
Enhanced Intelligent Insights experience includes transaction-level insights and metricsWe have expanded the Insights section of the Console, offering improved discoverability and data for tuning and optimizing your workload. Contention insights reveal the waiting statement for cases where blocking conflicts occur. Transaction-level insights help you identify impacted areas of your application and prioritize your investigations, enabling you to drill down to individual statements with additional insights such as suboptimal plans.
Enhanced statement metricsEasily correlate high-level cluster metrics (e.g., CPU, latency, etc.) with per-statement CPU utilization, latency metrics (P50, P90, P99, min, max), idle/client wait time, and MVCC garbage statistics.
Faster performance and an enhanced UX for the SQL Activity pagesReliably and quickly find SQL activity information using a new interactive ‘Search Criteria’ capability in the console.
Supplement troubleshooting flows with additional observability into indexes used per statementObservability information is available to correlate statements (and their plans) to indexes. You can now map index usage statistics with statements and transactions which streamlines troubleshooting flows such as dropping infrequently used indexes, creating or updating table statistics, reducing MVCC garbage, and alleviating resource hot spots.
KV Layer
FeatureDescription
Decommission Pre-Flight ChecksDecommissioning operations now check that each replica on a node that is slated to be decommissioned can be moved to another node. Any ranges that are not yet fully upreplicated will block the decommission process. When errors are detected that would prevent successful decommissioning,, the errors are printed to STDERR and the decommissioning command exits.
Delegated Snapshots: Send Raft snapshots between follower replicasDelegated Snapshots make multi-region deployments more cost-efficient by decreasing the use of remote snapshots if there is a local snapshot with the data. Sending data locally reduces your network costs and frees up the WAN bandwidth for the important data that must be transferred Previously, customers with multi-site deployments paid more for network bandwidth than strictly necessary due to system operations that required snapshots. Additionally, because of congested TCP channels between regions, transferring snapshots could negatively impact user traffic and slow snapshot transfers. Delegated Snapshots fixes this problem by sending snapshots from a local replica whenever a close-by replica exists and isn’t busy.
Faster leaseholder recoveryThe default CockroachDB lease duration has been reduced from 9 seconds to 6 seconds, to reduce range unavailability following leaseholder loss. Some other related settings have also had their defaults reduced, including heartbeat intervals, Raft election timeouts, and network timeouts.
Lower default TTL for garbage collection (GC)The default GC TTL value in 23.1.0 is being reduced from 25 hrs to 4 hrs for new clusters. This change is being made to improve read performance, storage utilization, and cluster stability in high write traffic scenarios. Scheduled backups will not be affected by this change as protected timestamps will ensure data isn’t garbage-collected until it has been backed up. Changefeeds will also not be affected. If you want a 25-hour or larger GC TTL value (for example, to support AS OF SYSTEM TIME queries that go further back in time), you can explicitly set GC TTL to the desired value. This change will only apply to new clusters. Existing clusters will retain the 25-hour default when upgrading, unless you have previously overridden it with an explicit value, in which case, that value will be retained. Backups taken from clusters running versions prior to v23.1 will similarly retain the GC TTL configured when the backup was taken.

Backward-incompatible changes

Before , be sure to review the following backward-incompatible changes, as well as key cluster setting changes, and adjust your deployment as necessary.
  • Replaced the cdc_prev() in favor of a cdc_prev tuple. This is an incompatible change that may break that use the previous cdc_prev() function.
  • now includes rows for all indexes that support the table. Prior to this change, SHOW RANGES FOR TABLE foo was an alias for SHOW RANGES FOR INDEX foo@primary. This was causing confusion, as it would miss data for secondary indexes. It is still possible to filter to just the primary index using SHOW RANGES FOR INDEX foo@primary. The statement output now also includes the index name.
  • CockroachDB now supports sharing storage ranges across multiple indexes/tables. This behavior is not enabled by default in v23.1, but will be enabled by default in a future release. When the behavior is enabled, there will no longer be a guarantee that there is at most one SQL object (e.g., table/index/sequence/materialized view) per storage range. As a result, the columns table_id, database_name, schema_name, table_name and index_name in crdb_internal.ranges and .ranges_no_leases will become meaningless, since a range will no longer be attributed to a single table/index. In v23.1, the default behavior of is retained, but you should consider setting the cluster setting to false. This will have the following effects that will become the defaults in a future release:
    • The aforementioned columns in the crdb_internal virtual tables will be removed. Existing code can use the updated output of the statement instead, optionally using WITH KEYS to expose the raw start/end keys.
    • SHOW RANGES FROM DATABASE continues to report one row per range, but stops returning the database / schema / table / index name.
    • SHOW RANGES FROM TABLE continues to report one row per range, but stops returning the index name. Suggested replacements:
      • Instead of: SELECT range_id FROM crdb_internal.ranges WHERE table_name = 'x', use: SELECT range_id FROM [SHOW RANGES FROM TABLE x]
      • Instead of SELECT range_id FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2 (variable / unpredictable table name or ID), use: SELECT range_id FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES] WHERE table_name = $1 OR table_id = $2
      • Instead of SELECT start_key FROM crdb_internal.ranges WHERE table_name = 'x', use: SELECT raw_start_key FROM [SHOW RANGES FROM TABLE x WITH KEYS]
      • Instead of SELECT start_key FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2 (unpredictable / variable table name or ID), use: SELECT raw_start_key FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES, KEYS] WHERE table_name = $1 OR table_id = $2
  • When the , the format of the columns start_key and end_key for and SHOW RANGES FROM TABLE have been extended to include which table/index the key belongs to. This is necessary because a range can now contain data from more than one table/index.
  • When the , the output of no longer includes range_size, range_size_mb, lease_holder, or lease_holder_localities by default. This ensures that SHOW RANGES remains fast in the common case. Use the new option to include these columns.
  • The format of the columns start_key and end_key for SHOW RANGE... FOR ROW has been changed to be consistent with the output of SHOW RANGES FROM INDEX.
  • Changefeeds using “preview” expressions (released in v23.1.0) and that access the previous state of the row using the cdc_prev() function will no longer work and will need to be recreated with new syntax.
  • Some of the transformations specific to changefeeds have been deprecated and replaced. These functions were released in limited access in v22.2. Deprecated changefeed transformations continue to function. Closely monitor changefeeds that are created during upgrade. While effort was made to maintain backward compatibility, the updated changefeed transformation may produce slightly different output, such as different column names.
  • Fixed a bug where, when server.identity_map.configuration was used, CockroachDB did not verify the client-provided username against the target mappings. Note that this means that the client must now provide a valid DB username. This requirement is compatible with PostgreSQL; it was not previously required by CockroachDB but it is now. This does not apply when identity maps are not in use.
  • Previously, the type of the replicas, voting_replicas,non_voting_replicas and learner_replicas in crdb_internal.ranges were overridden to INT2VECTOR causing incompatible indexing between .ranges and .ranges_no_leases. Now the types of those columns in the two tables are set to INT[].
  • The output of the command for the crdb_internal.ranges and crdb_internal.ranges_no_leases tables has been updated, and the previous output is deprecated. To enable the new command output, set the sql.show_ranges_deprecated_behavior.enabled to false. The new output will become default in v23.2.
  • Previously, if a user specified a in the connection string parameters, it would always be treated as case sensitive. Now, in order to have the schema names in the search_path respect case, the user must include double quotes around the name.
  • The deprecated CLI command debug unsafe-remove-dead-replicas has been removed. Use debug recover instead.

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.
CategoryDescriptionChange TypeBackport version
SQL language changeThe cluster setting sql.ttl.default_range_concurrency and table storage parameter ttl_range_concurrency are no longer configurable. #89392No longer configurablev22.2.1
SQL language changeThe sql.distsql.max_running_flows cluster setting has been removed. #84888RemovedNone
Operational changeThe cluster settings server.web_session.purge.period and server.web_session.purge.max_deletions_per_cycle, which were specific to the cleanup function for system.web_sessions, have been replaced by server.log_gc.period and server.log_gc.max_deletions_per_cycle which apply to the cleanup function for system.eventlog, system.rangelog and system.web_sessions equally. #90789Removed, repurposedNone
Operational changeThe cluster setting server.web_session.auto_logout.timeout has been removed. #90789Removed, defaults to trueNone
Operational changeThe load-based splitter now supports using request CPU usage to split ranges. This is introduced with the previous cluster setting kv.allocator.load_based_rebalancing.objective, which when set to cpu, will use request CPU usage. The threshold above which CPU usage of a range is considered for splitting is defined in the cluster setting kv.range_split.load_cpu_threshold, which has a default value of 250ms. (Relates to #100211 in this table.) #96128RepurposedNone
Operational changeThe kv.range_split.load_cpu_threshold cluster setting now has a minimum setting value of 10ms. Previously there was no minimum so, while unlikely, this could have an impact if you had chosen a custom setting lower than the established minimum. #98250New minimumNone
Security updateThe new cluster setting server.user_login.downgrade_scram_stored_passwords_to_bcrypt.enabled, which allows you to migrate passwords from SCRAM to bcrypt during user authentication, defaults to true. If it is true and if server.user_login.password_encryption is crdb-bcrypt, then during login, the stored hashed password will be migrated from SCRAM to bcrypt. #97429New settingv22.2.6
Security updateThe default value for the server.user_login.password_hashes.default_cost.scram_sha_256 cluster setting is now 10610. (Previously the default was 119680.) The old value was found to have been too high for many types of client hardware, and in some cases could cause regressions in connection latency. The new value was chosen by running tests with clients that have 1 or 2 vCPUs provisioned. Additionally, the new cluster setting server.user_login.rehash_scram_stored_passwords_on_cost_change.enabled was added, and defaults to true. If it is true and the stored SCRAM password for a user has a different cost than the configured default cost, then the next time the user logs in, their password will automatically be rehashed using the configured default cost. If the rehashing is not desired, then operators should update the server.user_login.password_hashes.default_cost.scram_sha_256 cluster setting to the value they desire before upgrading. This change is being backported to . #98254Changed defaultv22.2.7
Command-line changeThe —drain-wait argument to thecockroach node draincommand will be automatically increased if the command detects that it is smaller than the sum of the cluster settings server.shutdown.drain_wait, server.shutdown.connection_wait, server.shutdown.query_wait times two, and server.shutdown.lease_transfer_wait. If the —drain-wait argument is 0, then no timeout is used. This recommendation was already documented, but now the advice will be applied automatically.New effectv22.2.1
Bug fixRPC connections between nodes now require RPC connections to be established in both directions, otherwise the connection will be closed. This is done to prevent asymmetric network partitions where nodes are able to send outbound messages but not receive inbound messages, which could result in persistent unavailability. This behavior can be disabled by the cluster setting rpc.dialback.enabled.New setting, enabled by defaultNone
Bug fixFixed a rare bug introduced in v22.2.0 that could cause a node to crash with an attempting to append refresh spans after the tracked timestamp has moved forward error when querying virtual tables in thecrdb_internalorpg_catalogsystem catalogs. If you are experiencing this bug, set the sql.distsql.use_streamer.enabled cluster setting to false before upgrading a cluster to v23.1.New guidancev22.2.8
Bug fixTheHot Ranges pageDB Console page would show hot ranges by CPU and not QPS (queries per second), depending on the value of the kv.allocator.load_based_rebalancing.objective cluster setting (default cpu). Now the page will always collect statistics based on QPS. (Relates to #96128 in this table.) #100211Repurposed settingNo

Deprecations

  • Ordinal column references (e.g., SELECT @1, @2 FROM t ) are now deprecated. By default, statements using this syntax will now result in an error. If desired, such statements can be allowed using the session setting SET allow_ordinal_column_references=true. Support for ordinal column references is scheduled to be removed in upcoming version v23.2.
  • The CONTROLCHANGEFEED will be deprecated in the future (see issue #94757 ). With this change, usages of the CONTROLCHANGEFEED role option will come with a deprecation warning. Its existing behavior remains the same. The SELECT and CHANGEFEED privileges will be used for changefeeds henceforth:
    • The SELECT privilege on a set of tables allows a user to run core changefeeds against them.
    • The CHANGEFEED privilege on a set of tables allows a user to run enterprise changefeeds on them, and also manage the underlying changefeed job (ie. view, pause, cancel, and resume the job). Notably, a new changefeed.permissions.require_external_connection_sink.enabled is added and set to false by default. Enabling this setting restricts users with CHANGEFEED on a set of tables to create enterprise changefeeds into external connections only. To use a given external connection, a user typically needs the USAGE privilege on it. Note that ALTER DEFAULT PRIVILEGES can be used with both the CHANGEFEED and SELECT privileges to assign coarse-grained permissions (i.e., assign permissions to all tables in a schema rather than manually assign them for each table).
  • Deprecated the PGDUMP and MYSQLDUMP formats for . They are still present, but will be removed in a future release. See the page for alternatives.

Known limitations

For information about new and unresolved limitations in CockroachDB v23.1, with suggested workarounds where applicable, see .

Additional resources

ResourceTopicDescription
Cockroach UniversityIntroduction to Distributed SQL and CockroachDBThis 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 UniversityPractical First Steps with CockroachDBThis 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 UniversityBuilding a Highly Resilient Multi-region Database using CockroachDBThis 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.
Cockroach UniversityIntroduction to Serverless Databases and CockroachDB ServerlessThis course introduces the core concepts behind serverless databases and gives you the tools you need to get started with CockroachDB Serverless. You will learn how serverless databases remove the burden of configuring, sizing, provisioning, securing, maintaining and dynamically scaling your database based on load. This means you simply pay for the serverless database resources you use.
DocsThis 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.
DocsDeveloper Guide OverviewThis page provides an overview of resources available to developers building applications on CockroachDB.
DocsSecurity OverviewThe 23.1 release encapsulates a number of security milestones. See the security overview for a summary.
DocsArchitecture OverviewThis page provides a starting point for understanding the architecture and design choices that enable CockroachDB’s scalability and consistency capabilities.
DocsSQL Feature SupportThe page summarizes the standard SQL features CockroachDB supports as well as common extensions to the standard.
DocsChange Data Capture OverviewThis 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.
DocsBackup ArchitectureThis page describes the backup job workflow with a high-level overview, diagrams, and more details on each phase of the job.

v23.1.0-rc.2

Release Date: May 4, 2023

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-rc.2.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.0-rc.2.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-rc.2.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.0-rc.2.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-rc.2.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-rc.2.darwin-10.9-amd64.tgz
( SHA256 )
ARMcockroach-v23.1.0-rc.2.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-rc.2.darwin-11.0-arm64.tgz
( SHA256 )
Windows
(Experimental)
Intelcockroach-v23.1.0-rc.2.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Bug fixes

  • Fixed a bug introduced in versions 22.1.19, 22.2.8, and pre-release versions of 23.1 that could cause queries to return spurious insufficient errors. For the bug to occur, two databases would need to have duplicate tables, each with a reference to another table. The error would then occur if the same SQL string was executed against both databases concurrently by users that have over only one of the tables.

Contributors

This release includes 4 merged PRs by 4 authors.

v23.1.0-rc.1

Release Date: May 2, 2023

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-rc.1.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.0-rc.1.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-rc.1.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.0-rc.1.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-rc.1.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-rc.1.darwin-10.9-amd64.tgz
( SHA256 )
ARMcockroach-v23.1.0-rc.1.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-rc.1.darwin-11.0-arm64.tgz
( SHA256 )
Windows
(Experimental)
Intelcockroach-v23.1.0-rc.1.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

SQL language changes

  • Two views have been added to the : crdb_internal.statement_activity surfaces data in the persisted system.statement_activity table, and crdb_internal.transaction_activity surfaces the system.transaction_activity table.
  • Span statistics are now unavailable on mixed-version clusters.

DB Console changes

  • Timestamps are now displayed in DB Console in the timezone specified in the ui.display_timezone , if set. Currently supported timezones are Coordinated Universal Time and America/New_York.
  • DB Console now limits historical data for SQL Activity pages to 200000 rows by default, based on the new sql.stats.activity.persisted_rows.max . A background job automatically prunes the system tables transaction_activity and statement_activity.
  • Improved performance when viewing the in DB Console if there are a large number of rows.

Bug fixes

  • Fixed a bug introduced prior to v22.1 where an EXPORT statement could be incorrectly evaluated and result in a node panic or incorrect query results if it had projection or rendering on top of the EXPORT, such as the statement WITH cte AS (EXPORT INTO CSV 'nodelocal://1/export1/' FROM SELECT * FROM t) SELECT filename FROM cte;. Only the presentation of the query result was affected, not the exported data.
  • The descriptions of the rebalancing.readbytespersecond and rebalancing.writebytespersecond metrics now correctly reference bytes read and bytes written, respectively.
  • Fixed a rare bug introduced prior to v22.1 where distributed plans could cause the graceful drain of a node to become stuck retrying forever during . This bug leads to errors like drain details: distSQL execution flows:, together with a non-zero number of flows that is not reducing over a long period of time.
  • Fixed a bug where a operation with skip_localities_check could fail with errors if regions were missing on a cluster.
  • Fixed a bug introduced in testing releases of v23.1 that could cause incorrect results for queries with STRICT .
  • Fixed a rare bug that could cause keys to be unexpectedly deleted locally within a store by replica rebalancing during a write heavy workload.
  • Fixed a bug where a failed or cancelled operation could leave some of the imported rows behind after it was cancelled, if the writing processes were slow enough to continue writing after the cleanup process started.
  • Fixed a bug in the behavior of the enforce_home_region that may have allowed a hash join to be favored over a lookup join, or failed to error out remote accesses done by uniqueness checks for mutations on .
  • Fixed a bug introduced in testing releases of v23.1 where a node could crash when evaluating a command when the schema had INT2 or INT4 type.
  • Fixed a bug where a backup of a key’s revision history may not correctly be restored to the proper revision of the key if it is split across multiple sorted string tables.
  • Fixed a bug introduced in testing releases of v23.1 where a user could be prevented from logging in or viewing or changing if the cluster had a long period of inactivity.
  • Fixed a bug where a node that transferred a lease away and missed a liveness heartbeat could then erroneously update the closed timestamp during the stasis period of its liveness. This could lead to closed timestamp invariant violation and could cause the node to crash. In extreme cases, this could lead to inconsistencies in read-only queries.
  • Fixed a bug that caused memory leaks when a closed or cancelled connection was released.

Performance improvements

  • dashboards now default to using a table optimized with the top data for the most used cases. Otherwise, they use persisted data if available, and in-memory data otherwise.
  • Static erroring of some locality-optimized lookup is now handled dynamically during query execution.

Miscellaneous

  • Two new statistics help to track the efficiency of snapshot transfers and to keep the number of failures due to system-level races as low as possible. range.snapshots.recv-failed shows the number of snapshot send attempts that are initiated but not accepted by the recipient. range.snapshots.recv-unusable shows the number of snapshots that were fully transmitted but not used.

Contributors

This release includes 59 merged PRs by 39 authors. We would like to thank the following contributors from the CockroachDB community:
  • ajwerner

v23.1.0-beta.3

Release Date: April 24, 2023

Downloads

CockroachDB v23.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.
Operating SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-beta.3.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.0-beta.3.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-beta.3.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.0-beta.3.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-beta.3.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-beta.3.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-beta.3.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-beta.3.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-beta.3.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.1.0-beta.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Backward-incompatible changes

  • Previously, if a user specified a in the connection string parameters, it would always be treated as case sensitive. Now, in order to have the schema names in the search_path respect case, the user must include double quotes around the name.

SQL language changes

  • Statements of type are no longer displayed on the .

Operational changes

  • The amount of traffic in flight from a single to a follower has been reduced from 256 MB to 32 MB. This reduces the chance of running out of memory during bulk write operations. This can be controlled via the environment variable COCKROACH_RAFT_MAX_INFLIGHT_BYTES.

DB Console changes

  • When a user activates diagnostics on the page, there is now an option to select the trace rate for statement diagnostics collection.
  • Updated the Network Latency side navigation name and Network Diagnostics page title to Network. Updated the Advanced Debugging page title to .
  • Introduced a “draining node” Node Status on the so that “draining node” has it own value instead of counting as a “dead node”.
  • Added a time scale selector to the under the Statement Details page. This allows users to view bundles from the selected period only.

Bug fixes

  • Fixed a bug that caused internal errors when executing with empty bodies. This bug was only present in alpha pre-release versions of 23.1.
  • Fixed a bug that caused a to fail occasionally due to incorrect schema ID resolution when restoring a with .
  • Fixed a bug in parsing a with a quote in it when specified in the . Also, the search_path now supports schema names that have commas in them.
  • Fixed a bug that has existed since were introduced that could cause a function call to resolve to the wrong function after changes to the .
  • Previously, CockroachDB v23.1 alpha and beta versions would panic on command when the GOMEMLIMIT environment variable was set and the --max-go-memory flag wasn’t specified. This is now fixed.
  • Fixed a bug that caused errors in test builds and potentially incorrect results in release builds when invoking a with a argument. This bug was only present in v23.1 alpha versions.
  • Fixed an internal error that could occur when the enforce_home_region is on and the input to the is a SELECT of (e.g., 1+1 ). Also, with no now error out with enforce_home_region set.
  • Point and that write to a remote region of a table created with the clause will now error out.
  • Fixed a bug in the pg_get_indexdef and col_description that could cause the functions to return errors if the user created tables named pg_indexes or pg_attribute. Or, if the user created a schema named system with a table named comments. This bug was only present in pre-release versions of v23.1.
  • Fixed a bug where, when CockroachDB failed to retrieve , the full would return an error. Now the Insights page will load even when there is an issue with decoding contention information.
  • Fixed a bug to ensure that the used per is shown even when there is a max-size limit on the SQL API.

Contributors

This release includes 36 merged PRs by 15 authors.

v23.1.0-beta.2

Release Date: April 17, 2023

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-beta.2.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.0-beta.2.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-beta.2.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.0-beta.2.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-beta.2.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-beta.2.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-beta.2.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-beta.2.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-beta.2.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Enterprise edition changes

  • now support wrapped envelope with diff ( envelope='wrapped', diff ).

SQL language changes

  • Added the multiple_active_portals_enabled. This setting is only for a . When set to true, it allows multiple portals to be open at the same time, with their execution interleaved with each other. In other words, these portals can be paused. The underlying statement for a pausable portal must be a read-only query without or postqueries (such as executed by checks), and such a portal is always executed with a .

DB Console changes

  • Update sort label on Search Criteria to match the name on the table columns on the and pages.
  • By default, we now show the Application Name column in the fingerprints overview pages. and will be displayed per application on the overview pages rather than grouped into a single fingerprint ID.
  • When going from the Fingerprint Overview pages or the Insight Details pages to the Fingerprint Details page for or , the details page will fetch data for the statement with the provided application name. For overview pages, this is the app name of the selected row. For insight details, it is the app of the execution that generated the insight.

Bug fixes

  • Fixed a bug so that the text search @@ (“matches”) can work with variable expressions. Fixed a bug where incorrect results were returned when one of the arguments was a expression and the other argument was a TEXT or TSQuery expression.
  • Fixed a bug where running when that column is used in an that includes other columns caused a panic.
  • Fixed a rare race condition on that could cause an invalid memory address or nil pointer dereference error.
  • Fixed a bug that was causing nodes running on Windows to crash on startup. This bug only existed in v23.1 alphas.
  • Fixed a rare condition that could allow a to get stuck indefinitely waiting on a released row-level if the per-range lock count limit was exceeded while the transaction was waiting on another lock.
  • Fixed a rare internal error in the that has existed since before version v22.1, which could occur while enforcing orderings between SQL operators.
  • Fixed a bug so that the crdb_internal.deserialize_session internal function works properly with prepared statements that have more param type hints than params. Before this bugfix, deserializing a containing a prepared statement with more parameter type hints than parameters would panic. For example: PREPARE p (int) AS SELECT 1. These extra type hints are now ignored by crdb_internal.deserialize_session.

Performance improvements

  • Google Cloud Pub/Sub sink can now support higher throughputs by enabling the changefeed.new_pubsub_sink_enabled . Enabling this setting will cause changefeeds to use a newer Pub/Sub sink, which uses capitalized top-level fields in the message: {Key:..., Value:..., Topic:...}. As a result, you may need to reconfigure downstream systems to parse the new message format. If you do not enable changefeed.new_pubsub_sink_enabled, the top-level message fields remain all lowercase: {key:..., value:..., topic:...}.

Contributors

This release includes 57 merged PRs by 29 authors.

v23.1.0-beta.1

Release Date: April 13, 2023

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-beta.1.linux-amd64.tgz
(SHA256)
cockroach-sql-v23.1.0-beta.1.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-beta.1.linux-arm64.tgz
(Experimental)

(SHA256)
cockroach-sql-v23.1.0-beta.1.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-beta.1.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-beta.1.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-beta.1.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-beta.1.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-beta.1.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Enterprise edition changes

  • The schema registry URI now allows an additional timeout=T query parameter, which allows you to change the default timeout for contacting the schema registry.

SQL language changes

  • Changed the on the SQL Stats table to 1h on CockroachDB Dedicated and Self-Hosted clusters. This change is not applicable to CockroachDB Serverless clusters.
  • When there is no data persisted, show the in-memory data.
  • Added two new that enable users to change the number of histogram samples and buckets collected when building histograms as part of table statistics collection. While the default values should work for most cases, it may be beneficial to increase the number of samples and buckets for very large tables to avoid creating a histogram that misses important values:
    • sql.stats.histogram_samples.count
    • sql.stats.histogram_buckets.count
  • Added two new table storage parameters, sql_stats_histogram_buckets_count and sql_stats_histogram_samples_count. These parameters can be used to override the sql.stats.histogram_buckets.count and sql.stats.histogram_samples.count at the table level, allowing you to change the number of histogram samples and buckets collected when building histograms as part of table statistics collection. While the default values should work for most cases, it may be beneficial to increase the number of samples and buckets for very large tables to avoid creating a histogram that misses important values.

Operational changes

  • Introduced seven new timeseries for better visibility into the behavior of storage engine iterators and their internals.
  • Added a new range.snapshots.delegate.in-progress and renamed two metrics:
    • range.snapshot.delegate.successes -> range.snapshots.delegate.successes
    • range.snapshot.delegate.failures -> range.snapshots.delegate.failures
  • Added two new timeseries , providing some observability into the volume of keys preserved by open LSM snapshots:
    • storage.compactions.keys.pinned.count
    • storage.compactions.keys.pinned.bytes

DB Console changes

  • Fixed an issue with properly rendering placeholders on the Node Map view for clusters.

Bug fixes

  • Fixed a bug which could cause to hang and return an opaque error while cluster finalization is ongoing.
  • Fixed a bug that could cause internal errors and corrupt partial indexes when deleting rows with the DELETE FROM.. USING syntax. This bug is only present in alpha versions of v23.1.0.
  • The DB Console page would show hot ranges by CPU and not QPS (queries per second), depending on the value of the kv.allocator.load_based_rebalancing.objective (default cpu ). Now the page will always collect statistics based on QPS.
  • In rare cases involving overload and schema changes, users could sometimes, transiently, see errors of the form deadline below read timestamp is nonsensical; txn has would have no chance to commit. These errors carried and internal pgcode and could not be retried. This form of error is now classified as a retriable error and will be retried automatically either by the client or internally.
  • Fixed a bug in the declarative schema changer in v23.1 where unique without index can be incorrectly added in tables with duplicate values if it was added with a in one ALTER TABLE statement.
  • Fixed an issue where the enforce_home_region did not prevent a locality-optimized anti-join from looking up rows in remote regions. This bug is only present in alpha versions of v23.1.0.

Performance improvements

  • Audit logging should no longer incur extra latency when resolving table/view/sequence names.
  • The webhook sink is now able to handle a drastically higher maximum throughput by enabling the changefeed.new_webhook_sink_enabled .

Contributors

This release includes 116 merged PRs by 44 authors.

v23.1.0-alpha.9

Release Date: April 4, 2023

Downloads

CockroachDB v23.1.0-alpha.9 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.9.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.9.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.9.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.9.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.9.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.9.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.9.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.9.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.9.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.1.0-alpha.9.windows-6.2-amd64.zip
(
SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Backward-incompatible changes

  • The output of the command for the crdb_internal.ranges and crdb_internal.ranges_no_leases tables has been updated, and the previous output is deprecated. To enable the new command output, set the sql.show_ranges_deprecated_behavior.enabled to false. The new output will become default in v23.2.

Enterprise edition changes

  • The statement now allows you to limit the nodes that can execute a changefeed by including a locality filter in the WITH clause. A node can execute the changefeed only if it was started with a matching --locality flag. Replace with a comma-separated list of key-value pairs.

SQL language changes

  • The new prepared_statements_cache_size helps to prevent leaks by automatically deallocating the least-recently-used prepared statements when the cache reaches a given size.

Operational changes

  • The new COCKROACH_DISABLE_NODE_AND_TENANT_METRIC_LABELS allows you to suppress metrics from a cluster’s if they conflict with labels that are applied by external tools that collect metrics from the endpoint. Set the environment variable to a comma-separated list of key-value pairs.

DB Console changes

  • The section of the Databases page now displays the list of most-frequently-used index fingerprints to all users, rather than only to admin users, because the page now queries a view rather than a system table directly.
  • When you search or filter within the or , if you interactively sort the results using a column that was not part of the original query, a warning displays if you are viewing only a subset of the results, along with a suggestion to update the original query.

Miscellaneous

  • Several computed columns have been added to the statement_statistics_persisted and transaction_statistics_persisted views in the system catalog and indexed in the corresponding system tables:
    • execution_count
    • service_latency
    • cpu_sql_nanos
    • contention_time
    • total_estimated_execution_time
    • p99_latency

Bug fixes

  • Fixed pagination bugs when searching or filtering within the or viewing the details of a database.
  • Fixed a rare bug introduced in v22.2.0 that could cause a node to crash with an attempting to append refresh spans after the tracked timestamp has moved forward error when querying virtual tables in the or system catalogs. If you are experiencing this bug, set the sql.distsql.use_streamer.enabled to false before upgrading a cluster to v23.1.
  • Fixed a bug that could erroneously cause multiple garbage-collection jobs to be created when executing a command, one job for each table and one for the cascaded DROP itself.
  • Fixed a bug in the that prevented a recommendation to drop an index from being executed if the index’s name contained a space.
  • Fixed a rare bug that prevented the garbage-collection job for a command from successfully finishing if the table descriptor had already been garbage-collected. The garbage-collection job now succeeds in this situation.
  • Fixed a rare bug that could cause a query of a virtual table in the or system catalog to hang indefinitely if the query returned an error.
  • Fixed a bug introduced prior to v21.2 that could cause the SQL gateway node to crash if you with a circular or self-referencing dependencies. This situation no longer crashes the node, and a cyclic view dependency for relation error is now logged.
  • Several rare bugs have been fixed that could cause corruption in the existing primary index when a rollback occurs concurrent to adding or removing a . This could lead to subsequent unavailability of the table.
  • Fixed a bug that could cause a node to crash with an out-of-memory (OOM) exception when viewing details in the or .

Contributors

This release includes 75 merged PRs by 41 authors.

v23.1.0-alpha.8

Release Date: March 27, 2023

Downloads

CockroachDB v23.1.0-alpha.8 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.8.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.8.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.8.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.8.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.8.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.8.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.8.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.8.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.8.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.1.0-alpha.8.windows-6.2-amd64.zip
(
SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Security updates

  • Previously, users could gain unauthorized access to they did not create if they requested the bundle through an HTTP request to /_admin/v1/stmtbundle/<id> and correctly guessed its (non-secret) ID. This change ensures that only authorized SQL users can request statement diagnostic bundles.

General changes

  • Increased the specificity of log messages to help troubleshoot issues.

Enterprise edition changes

  • The MuxRangefeed client, which is enabled with the changefeed.mux_rangefeed.enabled , is now more efficient when running against large-scale workloads.
  • The server.oidc_authentication.claim_json_key for DB Console SSO now accepts list-valued token claims.
  • Added the WITH key_column option to override the message metadata key for . This changes the key hashed to determine Kafka partitions. It does not affect the output of key_in_value or the domain of the per-key ordering guarantee.
  • The now shows normalized CPU usage.

SQL language changes

  • Fixed a bug where the check constraint on an OID type column results in a panic in the legacy schema changer.
  • Added a new WITH REDACT option to the following statements: , , and which replaces constants and literals in the printed CREATE statement with the redacted marker, ‹×›.
  • Added support for the REDACT flag to the following variants of : EXPLAIN (OPT), EXPLAIN (OPT, CATALOG), EXPLAIN (OPT, MEMO), EXPLAIN (OPT, TYPES), and EXPLAIN (OPT, VERBOSE). These EXPLAIN statements will have constants, literal values, parameter values, and any other user data redacted in the output.
  • Disallowed the of backups taken on a cluster version older than the minimum binary version the current cluster can interoperate with. This is described in an updated version of the policy outlined in .
  • Bulk statements are now processed with a vectorized insert and can be anywhere from 0.5x to 5x faster. Typical hardware and schemas should see a 2x improvement. Vectorized inserts are only used for COPY statements and are not yet applied to regular inserts. Both the vectorize and copy_fast_path_enabled session variables can be used to disable this feature.
  • Added stemming and stopword-eliminating text search configurations for English, Danish, Dutch, Finnish, French, German, Hungarian, Italian, Norwegian, Portuguese, Russian, Spanish, Swedish, and Turkish.
  • Added the system.statement_activity and system.transaction_activity tables. These tables are used to populate the pages, and contain the top N statements and transactions based on different key columns.
  • Added helper text for to include FROM <source>.
  • Added the default_text_search_config variable for compatibility with single-argument variants to the following text search functions: to_tsvector, to_tsquery, phraseto_tsquery, and plainto_tsquery, which use the value of default_text_search_config instead of expecting one to be included as in the two-argument variants. The default value of this setting is english.
  • Added the ts_rank function for ranking text search query results.
  • Renamed the coordinator_locality option in BACKUP to . This option allows the user to control the nodes involved in the execution of a backup job, including the processing of row data and job coordination. For example, defining an execution locality for a backup job could reduce latency when a cluster is running heavy workloads and has a frequent backup schedule.

Operational changes

  • Checkpoint directories that can be created in the rare event of range inconsistency are now clearly indicated as pending until they are fully populated. This helps operators distinguish valid checkpoints from corrupted ones.
  • metrics available at the _status/vars path now contain a node_id label that identifies the node they were scraped from.

DB Console changes

  • The pages no longer poll data, to simplify the user experience and reduce any performance impact.
  • Data on the page no longer updates automatically every 5mins.
  • Updated the Jobs table column name from “Last Modified Time” to “Last Execution Time”.
  • On the pages, users will not see stats that have not yet been flushed to disk.
  • Users can now request top-k statements by % runtime on the SQL Activity Fingerprints pages.
  • Added Search Criteria to the and pages, and updated the UX with improvements.
  • Added badges for each selected filter on the and pages.
  • The default request sort for the page is now % of All Runtime.
  • Fixed a bug where the table’s CREATE statement would not display correctly on the page.
  • Added an assertion on the KV side to prevent other existing or future attempts of LeafTxn issuing locking requests. This ensures the KV API is used as agreed upon and can be helpful in debugging latency issues caused by holding locks.

Bug fixes

  • Fixed a rare panic in upstream etcd-io/raft when a message appends race with log compaction.
  • In the DB Console Stats pages, issuing a new request for stats while one is pending is now allowed and will replace the pending request.
  • Fixed a bug in which could produce a crash on subsequent operations.
  • Fixed a bug where using could result in a memory leak.
  • Fixed internal errors in statements that have a WITH clause.
  • Previously, the statement would crash the node and leave the table in a corrupt state. The root cause is a nil pointer dereference. The bug is now fixed by returning an unimplemented error and hence disallowing using the as the default value when backfilling.
  • Fixed a bug that could prevent a cached query with a user-defined type reference from being invalidated even after a schema change that should prevent the type from being resolved.
  • Fixed a bug that could prevent a cached query from being invalidated when a referenced by that query was altered or dropped.
  • Fixed the replacement of in-flight requests for KeyedCachedDataReducer s to prevent permanent loading on requests stuck on an inFlight status.
  • Improved the reliability of latency data in v23.1 clusters.

Performance improvements

  • The Raft tick interval has been increased from 200ms to 500ms in order to reduce per-replica CPU costs, and can now be adjusted via COCKROACH_RAFT_TICK_INTERVAL. Dependant parameters such as the Raft election timeout ( COCKROACH_RAFT_ELECTION_TIMEOUT_TICKS ), reproposal timeout ( COCKROACH_RAFT_REPROPOSAL_TIMEOUT_TICKS ), and heartbeat interval ( COCKROACH_RAFT_HEARTBEAT_INTERVAL_TICKS ) have been adjusted such that their wall-time value remains the same.
  • The Raft scheduler is now sharded to relieve contention during range Raft processing, which can significantly improve performance at high CPU core counts.

Build changes

  • Running ./dev ui test (or bazel test //pkg/ui/workspaces/db-console:jest ) now uses less memory.

Contributors

This release includes 174 merged PRs by 65 authors. We would like to thank the following contributors from the CockroachDB community:
  • Eric.Yang

v23.1.0-alpha.7

Release Date: March 20, 2023

Downloads

CockroachDB v23.1.0-alpha.7 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.7.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.7.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.7.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.7.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.7.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.7.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.7.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.7.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.7.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.1.0-alpha.7.windows-6.2-amd64.zip
(
SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Security updates

  • The default value for the server.user_login.password_hashes.default_cost.scram_sha_256 is now 10610. (Previously the default was 119680.) The old value was found to have been too high for many types of client hardware, and in some cases could cause regressions in connection latency. The new value was chosen by running tests with clients that have 1 or 2 vCPUs provisioned. Additionally, the new cluster setting server.user_login.rehash_scram_stored_passwords_on_cost_change.enabled was added, and defaults to true. If it is true and the stored SCRAM password for a user has a different cost than the configured default cost, then the next time the user logs in, their password will automatically be rehashed using the configured default cost. If the rehashing is not desired, then operators should update the server.user_login.password_hashes.default_cost.scram_sha_256 cluster setting to the value they desire before upgrading. This change is being backported to .

General changes

  • CockroachDB now uses the soft memory limit of Go runtime by default. This feature of Go has been available since v22.2 by setting the GOMEMLIMIT environment variable. Now it is enabled by default, which should reduce the likelihood of the CockroachDB process . This soft memory limit can be disabled by specifying --max-go-memory=0 to .
  • Previously, the output of was limited to show unfinished jobs and finished jobs from the last 14 days. This change makes the command show all changefeed jobs, regardless of if they finished and when they finished. Note that jobs still obey the jobs.retention_time. Completed jobs older than that time are deleted.

Enterprise edition changes

  • Sinkless that use the syntax now require an enterprise license.
  • can now be used as the URI value for a Confluent schema registry. For example, CREATE EXTERNAL CONNECTION reg AS "https://example.cloud?opt=val"; CREATE CHANGEFEED FOR foo WITH format='avro',confluent_schema_registry='external://reg'
  • created or altered to have the option on_previous_running will have the full backup schedule created with the user specified option, but will override the incremental backup schedule to always default to on_previous_running = wait. This ensures correctness of the backup chains created by the incremental schedule by preventing duplicate incremental jobs from racing against each other.
  • to a Kafka sink now support the OAUTHBEARER sasl_mechanism.
  • running with the changefeed.mux_rangefeed.enabled set to true are more efficient, particularly when executing against large tables.

SQL language changes

  • A regions field was added to the statistics column of , reporting the of the nodes on which the statement was executed.
  • The enforce_home_region was extended with a new optional preview feature and session setting, which is disabled by default, to dynamically detect and report the home region for queries based on the of the queried rows, if different from the region of the .
  • Added a URL to errors related to the enforce_home_region that users can view to see additional information about the error.
  • Added a new enforce_home_region_follower_reads_enabled as a preview feature to allow errors triggered by the enforce_home_region to perform reads using in order to find and report a query’s .
  • Added a new aggregate array_cat_agg. It behaves similarly to array_agg(unnest(array_column)): it takes arrays as its input, unnests them into the array elements which are then aggregated into a single result array. It’s similar to concatenating all input arrays into a single array.
  • Added a new optimizer_always_use_histograms, which ensures that the always uses histograms when available to calculate the of every plan that it explores. Enabling this setting can prevent the optimizer from choosing a suboptimal when statistics for a table are stale.
  • Added the MODIFYSQLCLUSTERSETTING . This privilege allows users the ability to view all , but only modify those settings with the sql.defaults.* prefix. This re-introduces the modify functionality seen with MODIFYCLUSTERSETTING CockroachDB .
  • Added a status column to the following virtual tables: crdb_internal.cluster_txn_execution_insights and crdb_internal.node_txn_execution_insights.
  • Added a new session variable allow_role_memberships_to_change_during_transaction which can be used to make the and of faster at the cost of some claims. By default, when granting or revoking a role from another role, CockroachDB waits for all that are consulting the current set of role memberships to complete. This means that by the time the transaction which performed the grant or revoke operation returns successfully, the user has a proof that no ongoing transaction is relying on the state that existed prior to the change. The downside of this waiting is that it means that GRANT and REVOKE will take longer than the longest currently executing transaction. In some cases, users do not care about whether concurrent transactions will immediately see the side-effects of the operation, and would instead prefer that the grant or revoke finish rapidly. In order to aid in those cases, the session variable allow_role_memberships_to_change_during_transaction has been added. Now, the grant or revoke will only need to wait for the completion of statements in which do not have this option set. One can set the option as enabled by default in all sessions in order to accelerate and grant and revoke role operations.
  • Fixed a bug where CockroachDB panicked when a user tried to which had an ongoing change. CockroachDB still does not support truncating a table in this scenario, but instead of panicking an “unimplemented” error is returned.

Operational changes

  • will no longer be transferred to which are IO overloaded.
  • The environment variable COCKROACH_IGNORE_CLUSTER_SETTINGS can be used to so that it ignores all stored values in an emergency.
  • Introduce two to control disk utilization thresholds for : kv.allocator.rebalance_to_max_disk_utilization_threshold, which controls the maximum disk utilization before a store will never be used as a rebalance target, and kv.allocator.max_disk_utilization_threshold, which controls maximum disk utilization before a store will never be used as a rebalance or allocation target and will actively have moved off of it.
  • The kv.trace.slow_request_stacks.threshold can be used to attach available stack history from to traces of .
  • Added a new changefeed.schema_registry.retry_count. This measures the number of request retries performed when sending requests to the . Observing a nonzero value may indicate improper configuration of the schema registry or changefeed parameters.
  • The kv.range_split.load_cpu_threshold now has a minimum setting value of 10ms.
  • The kv.allocator.lease_io_overload_threshold_enforcement value which disables enforcement is updated to be spelled correctly as “ignore” rather than “ingore”.
  • The duration can now be adjusted via the environment variable COCKROACH_RANGE_LEASE_DURATION. Users are advised to exercise caution when adjusting this, and consider the relationship with e.g. election timeouts and network timeouts.

Command-line changes

  • and now support the client-side command \s to display the previous command history.
  • Added a new flag --max-go-memory to the command. It controls the soft memory limit on the Go runtime which adjusts the behavior of the Go garbage collector to try keeping the memory usage under the soft memory limit (the limit is “soft” in a sense that it is not enforced if live objects (RSS) exceed it). Similar to the , the new flag --max-go-memory accepts numbers interpreted as bytes, size suffixes (e.g. 1GB and 1GiB) or a percentage of physical memory (e.g. .25). If left unspecified, the flag defaults to 2.25x of --max-sql-memory (subject to --max-go-memory + 1.15 x --cache not exceeding 90% of available RAM). Set to 0 to disable the soft memory limit (not recommended). If the GOMEMLIMIT env var is set and --max-go-memory is not, then the value from the env var is used; if both are set, then the flag takes precedence.
    • Here are a few examples of how the default value is calculated on a machine with 16GiB of RAM. In the first two lines we use the default formula 2.25x --max-sql-memory. In the third line, the default formula results in exceeding the upper bound on total usage (including the cache), so we use the upper bound determined as 0.9 * total RAM - 1.15 * cache size. In the fourth line, the default formula results in 225MiB which is smaller than the lower bound of 256MiB, so we bump the value to that lower bound. In the fifth line, we use the value specified by the user (even though it is smaller than the lower bound on the default value).
      Command line flagsComputed max SQL memoryComputed cache sizeComputed max Go memory
      —max-sql-memory=.25 —cache=.254GiB4GiB9GiB
      —max-sql-memory=.1 —cache=.51.6GiB8GiB3.6GiB
      —max-sql-memory=.25 —cache=.44GiB6.4GiB7.04GiB
      —max-sql-memory=100MiB100MiB128MiB256MiB
      —max-sql-memory=.4 —cache=.2 —max-go-memory=100MiB6.4GiB3.2GiB100MiB
  • The --drain-wait argument to the command will be automatically increased if the command detects that it is smaller than the sum of the server.shutdown.drain_wait, server.shutdown.connection_wait, server.shutdown.query_wait times two, and server.shutdown.lease_transfer_wait. If the --drain-wait argument is 0, then no timeout is used. This recommendation , but now the advice will be applied automatically.

DB Console changes

  • Fixed the error Cannot read properties of undefined (reading 'length') which could cause pages to fail to load.
  • Added a new metric to the showing the system-wide CPU usage in addition to the existing CockroachDB CPU usage.
  • Users will see an upgrade error message when a response from the SQL-over-HTTP API (from /api/v2/sql/ ) says that a relation or column does not exist.
  • The description of the average QPS graph in the no longer claims the average is exponentially weighted.
  • The metric rebalancing.cpunanospersecond is now included in the .
  • Added an error code column to the insights table for a failed execution to the statement and transaction detail views on the . Added a status column to the statement and transaction workload insights tables on the .

Bug fixes

  • RPC connections between nodes now require RPC connections to be established in both directions, otherwise the connection will be closed. This is done to prevent asymmetric network partitions where nodes are able to send outbound messages but not receive inbound messages, which could result in persistent unavailability. This behavior can be disabled by the rpc.dialback.enabled.
  • The owner of the public schema can now be changed using .
  • Fixed a bug in which (CTEs) marked as WITH RECURSIVE which were not actually recursive could return incorrect results. This could happen if the CTE used a UNION ALL, because the incorrectly converted the UNION ALL to a UNION. This bug had existed since support for recursive CTEs was first added in v20.1.
  • Internal queries that are executed in order to serve a client-initiated query already appeared in with an application_name prefixed by the string $$. But this name was not used in the output of . Now, SHOW QUERIES also shows the $$ prefix for these types of queries.
  • Fixed a bug in evaluation of ANY, SOME, and ALL that would cause expressions like NULL = ANY(ARRAY[]::INT[]) to return NULL instead of False.
  • Fixed a bug that could crash the process when a query contained a literal with more than two elements and only a single label, e.g., ((1, 2, 3) AS foo).
  • Fixed a bug where certain special character combinations in the were not properly supported by CockroachDB.
  • Fixed a bug where the stats columns on the was continuously incrementing. The fix was to ensure we don’t re-use the stats object between re-renders by creating a new copy of the stats for every aggregation.
  • Fixed a bug where that performed a across multiple but never performed writes could fail to eagerly clean up their after commit. Future transactions that encountered these abandoned locks could be delayed for 50ms before unlocking them.
  • Fixed a bug which could result in some statements to fail with the error failed to verify keys for Scan.
  • Fixed a bug where CockroachDB could encounter an internal error concurrent txn use detected. The bug was introduced in .
  • Fixed a bug where if an was performed during an on-going or on a table, the update could incorrectly fail due to a duplicate key error.
  • Fixed a bug where it was possible for CockroachDB to temporarily not respect other than . This could only happen for a short window of a few seconds after nodes with existing were , and self-rectified (also within seconds).
    • This manifested in a few ways:
    • If was set to something other than 3, we would still add or remove replicas to get to 3x replication.
    • If was set explicitly to get a mix of voting and , it would be ignored. CockroachDB could possibly even remove non-voting replicas.
    • If or were changed from their default values of 128 MiB and 512 MiB respectively, we would instead try to size ranges to be within [128 MiB, 512MiB]. This could appear as an excess amount of or , as visible in the under “Range Operations”.
    • If was set to something other than the default 90000 seconds (25h), we would still only GC data older than 90000s. If the GC TTL was set to something larger than 25h, queries going further back could start failing. For GC TTLs less than the default, clusters would observe increased disk usage due to more retained .
    • If , or were set, they would be ignored. Range data and would possibly be moved outside where prescribed.
  • Allow users with the VIEWACTIVITY / VIEWACTIVITYREDACTED to access the table, necessary to view important DB Console pages (specifically, the , including database details, and database tables).
  • Fixed a bug that caused incorrect results when comparisons of were done using the ANY . For example, an expression like (x, y) = ANY (SELECT a, b FROM t WHERE...) could return true instead of the correct result of NULL when x and y were NULL, or a and b were NULL. This could only occur if the , i.e., it references columns from the outer part of the query. This bug was present since the was introduced in .

Miscellaneous

  • Added two views to the catalog: crdb_internal.statement_statistics_persisted, which surfaces data in the persisted system.statement_statistics table, and crdb_internal.transaction_statistics_persisted, which surfaces the system.transaction_statistics table.

Contributors

This release includes 245 merged PRs by 65 authors.

v23.1.0-alpha.6

Release Date: March 13, 2023

Downloads

CockroachDB v23.1.0-alpha.6 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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.6.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.6.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.6.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.6.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.6.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.6.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.6.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.6.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.6.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.1.0-alpha.6.windows-6.2-amd64.zip
(
SHA256)

Docker image

Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. Within the multi-platform image:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

SQL language changes

  • Previously, an ALTER TABLE.. ADD UNIQUE.. NOT VALID statement would be processed by ignoring the NOT VALID qualifier. This is not in keeping with PostgreSQL, which would throw an error instead. Now, CockroachDB throws the same error as PostgreSQL for such a statement: “UNIQUE constraints cannot be marked NOT VALID”.
  • Introduced a new internal virtual table crdb_internal.node_memory_monitors, which exposes all of the current reservations with the memory accounting system on a single node. Access to the table requires the VIEWACTIVITY (or the legacy VIEWACTIVITY ), or the VIEWACTIVITYREDACTED (or the legacy VIEWACTIVITYREDACTED ) defined.
  • Each type cast is now expressible as a function, e.g., now()::date can be expressed as date(now()).
  • Added support for a new syntax to provide options to the statement. The options can now be given in a comma-separated list enclosed by parentheses. The old syntax is still supported.
  • Added support for the syntax CREATE DATABASE IF NOT EXISTS... WITH OWNER.
  • Added a new internal , crdb_internal.redactable_sql_constants, which can be used to redact SQL statements passed in as strings.
  • Added an error_code column to the crdb_internal.cluster_execution_insights and crdb_internal.node_execution_insights virtual tables, which contains the error code for a failed execution. Also added a last_error_code column to the crdb_internal.cluster_txn_execution_insights and crdb_internal.node_txn_execution_insights virtual tables, which contains the error code of the last failed statement in that transaction.
  • Added a new internal , crdb_internal.redact, which replaces substrings surrounded by redaction markers with the redacted marker.

Command-line changes

  • The operation now validates the ability of the node to complete a decommission before attempting it, given the cluster configuration and the ranges with replicas present on the node. When errors are detected that would result in the inability to complete node decommission, they will be printed to stderr and the command will exit, instead of marking the node as decommissioning and beginning the node decommission process. Strict readiness evaluation mode can be used by setting --checks=strict. In this case, any ranges that need preliminary actions prior to replacement for the decommission process (e.g., ranges that are not yet fully up-replicated) will block the decommission process. Validation can be skipped by using the flag --checks=skip.

DB Console changes

  • Updated the description for and added a Learn more link to it.

Bug fixes

  • The unquoted value none is now allowed as the value in a statement.
  • IMPORT INTO... DELIMITED DATA will now correctly handle quoted fields that contain unescaped newlines.
  • Previously, casting an inet to a string type omitted the mask if a mask was not provided. This was not in keeping with PostgreSQL and is now resolved.
  • Fixed link encoding on links to database/table/index pages.
  • Fixed the commands so they handle database names that have mixed-case, hyphens, or quotes.
  • Tables referenced in index recommendations are now fully qualified, ensuring that they are not ambiguous.
  • Changed the database used for calls, to no longer use defaultdb, which was causing error messages on some pages when that database no longer exists.

Build changes

  • Changes to source files in pkg/ui/workspaces/db-console now properly bust the build cache, and are consistently included in local builds.

Contributors

This release includes 69 merged PRs by 39 authors.

v23.1.0-alpha.5

Release Date: March 6, 2023

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.5.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.5.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.5.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.5.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.5.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.5.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.5.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.5.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.5.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Security updates

  • The new server.user_login.downgrade_scram_stored_passwords_to_bcrypt.enabled, which allows you to migrate passwords from SCRAM to bcrypt during user authentication, defaults to true. If it is true and if server.user_login.password_encryption is crdb-bcrypt, then during login, the stored hashed password will be migrated from SCRAM to bcrypt.

General changes

  • Users with the CONTROLJOB can now owned by admins.
  • Users with the VIEWJOB can now . This role can be revoked by granting the NOVIEWJOB role option.

Enterprise edition changes

  • Jobs that utilize a protected timestamp system (such as BACKUP, CHANGEFEED, or IMPORT ) now produce metrics that can be monitored to detect cases when a job leaves a stale protected timestamp that will prevent garbage collection from occurring.
  • now automatically expire protected timestamp records for paused jobs if the changefeed is configured with the gc_protect_expires_after option.
  • User-defined functions (UDFs) can now be referenced from column expressions when creating a new table or issuing the SET DEFAULT command. Backup and restore operations also back up and restore UDF IDs that are referenced in a column’s DEFAULT expression. If UDF dependencies are missing and the skip_missing_udfs flag is provided, the DEFAULT expressions are dropped during a restore operation.

SQL language changes

  • String literals are now allowed for region names in DDL syntax, in addition to quoted syntax.
  • It is now possible to use * inside a statement. The list of columns is expanded at the time the view is created, so that new columns added after the view was defined are not included in the view. This behavior is the same as in PostgreSQL.
  • The default value of sql.stats.cleanup.rows_to_delete_per_txn has been increased to 10000 to increase efficiency of the cleanup job for SQL statistics.
  • The new optimizer_use_improved_split_disjunction_for_joins allows the optimizer to split disjunctions ( OR expressions) in more JOIN conditions by building a UNION of two JOIN expressions. If this setting is true, all disjunctions in inner, semi, and anti JOIN s will be split. Otherwise, only disjunctions that potentially contain an equijoin condition will be split.
  • Builtins have been added for tsvector, to_tsquery, phraseto_tsquery, and plainto_tsquery, which parse input documents into tsvectors and tsqueries, respectively. The new ts_parse builtin is used to debug the text search parser.
  • The new inject_retry_errors_on_commit_enabled returns a if it is run inside of an explicit transaction when it is set to true. The transaction retry error continues to be returned until inject_retry_errors_on_commit_enabled is set to false. This setting allows you to test your transaction retry logic.
  • Previously, ignored the NOT VALID qualifier. This behavior was not compatible with PostgreSQL. CockroachDB now throws the error PRIMARY KEY constraints cannot be marked NOT VALID.

Operational changes

  • The following , which control rebalancing and upreplication behavior in the face of IO-overloaded storage, have been deprecated:
    • kv.allocator.l0_sublevels_threshold
    • kv.allocator.l0_sublevels_threshold_enforce These cluster settings have been replaced by internal mechanisms.
  • Max timeout-to-intent resolution has been added to prevent intent resolution from becoming stuck indefinitely and blocking other ranges attempting to resolve intents.
  • Nodes are now considered suspect when rejoining a cluster and cannot accept lease transfers for one server.time_after_store_suspect window, which defaults to 30 seconds.

Command-line changes

  • The SQL shell ( , ) now supports the client-side commands \l, \dn, \d, \di, \dm, \ds, \dt, \dv, \dC, \dT, \dd, \dg, \du and \dd in a similar manner to PostgreSQL, including the modifier flags S and +, for convenience for users migrating from PostgreSQL. A notable difference is that when a pattern argument is specified, it should use the SQL LIKE syntax (with % representing the wildcard character) instead of PostgreSQL’s glob-like syntax (with * representing wildcards).

DB Console changes

  • The following new metrics track memory usage of prepared statements in sessions:
    • sql.mem.internal.session.prepared.current
    • sql.mem.internal.session.prepared.max-avg
    • sql.mem.internal.session.prepared.max-count
    • sql.mem.internal.session.prepared.max-max
    • sql.mem.internal.session.prepared.max-p50
    • sql.mem.internal.session.prepared.max-p75
    • sql.mem.internal.session.prepared.max-p90
    • sql.mem.internal.session.prepared.max-p99
    • sql.mem.internal.session.prepared.max-p99.9
    • sql.mem.internal.session.prepared.max-p99.99
    • sql.mem.internal.session.prepared.max-p99.999
    • sql.mem.sql.session.prepared.current
    • sql.mem.sql.session.prepared.max-avg
    • sql.mem.sql.session.prepared.max-count
    • sql.mem.sql.session.prepared.max-max
    • sql.mem.sql.session.prepared.max-p50
    • sql.mem.sql.session.prepared.max-p75
    • sql.mem.sql.session.prepared.max-p90
    • sql.mem.sql.session.prepared.max-p99
    • sql.mem.sql.session.prepared.max-p99.9
    • sql.mem.sql.session.prepared.max-p99.99
    • sql.mem.sql.session.prepared.max-p99.999
  • Active execution information is now shown on the even when there is a max size limit error.
  • “Retrying” is no longer a status shown in the page.

Bug fixes

  • Transaction uncertainty intervals are now correctly configured for reverse scans, to prevent reverse scans from serving stale reads when clocks in a cluster are skewed.
  • The formatting of uniqueness violation errors now matches the corresponding errors from PostgreSQL.
  • Previously, when a new column name would require quoting due to mixed-case or special characters, would not run in an explicit or multi-statement transaction. This is now fixed.
  • Fixed a bug when formatting which require quoting which might prevent those statements from round-tripping.
  • Using subqueries in user-defined functions without an AS clause is now supported, for consistency with the syntax supported outside of user-defined functions.
  • Fixed a rare bug introduced before v22.1.x that could cause a projected expression to replace column references with the wrong values.
  • Cross-descriptor validation on lease renewal is now disabled, because it can starve when there are many descriptors with many foreign key references.
  • Fixed a bug with pagination on the page.
  • Columns referenced in partial index predicates and partial unique constraint predicates can no longer be dropped. The statement now returns an error with a suggestion to drop the indexes and constraints first. This is a temporary safeguard to prevent users from hitting #96924. This restriction will be lifted when that bug is fixed.
  • The page now displays an error state when an error is encountered during data fetching.
  • Fixed a bug introduced in v22.1 that caused the internal error no bytes in account to release....
  • The command now respects the statement_timeout and transaction_timeout .
  • commands now appear in the output of the command.
  • Fixed an error where querying a pg_catalog table included information about a temporary table created in another session.

Performance improvements

  • If the optimizer_use_improved_split_disjunction_for_joins is true, the optimizer now creates a better query plan in some cases where an inner, semi, or anti join contains a join predicate with a disjuction ( OR condition).

Miscellaneous

  • UDFs can now return the RECORD result type, which represents any tuple. For example, CREATE FUNCTION f() RETURNS RECORD AS 'SELECT * FROM t' LANGUAGE SQL; is equivalent to CREATE FUNCTION f() RETURNS t AS 'SELECT * FROM t' LANGUAGE SQL;.
  • The parameters for have been marked as internal.
  • Fixed an error when calling with a if the user-defined type was modified after the original was created. The command now succeeds as long as the function body returns output that matches the modified user-defined type.
  • Columns with referenced constraints can now be dropped.
  • Index cascades with a dependent inbound foreign key can now be dropped.

Contributors

This release includes 120 merged PRs by 51 authors. We would like to thank the following contributors from the CockroachDB community:
  • Eric.Yang (first-time contributor)

v23.1.0-alpha.4

Release Date: February 27, 2023

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.4.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.4.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.4.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.4.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.4.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.4.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.4.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.4.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.4.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Enterprise edition changes

  • Some of the transformations specific to changefeeds have been deprecated and replaced. These functions were released in limited access in v22.2. Deprecated changefeed transformations continue to function. Closely monitor changefeeds that are created during upgrade. While effort was made to maintain backward compatibility, the updated changefeed transformation may produce slightly different output, such as different column names.
  • Add support for implicit authentication to Azure Storage and KMS.
  • Add support for CREATE EXTERNAL CONNECTION... AS "postgresql://" or "postgres://". These external connections may be specified as the source in streaming replication.
  • Add support for referencing from other objects. Backup and restore operations can now read and write UDF descriptors.

SQL language changes

  • UDFs can now return a set of results by setting the return type to SETOF.
  • UDFs with implicit record return types will return an error when called if the return type has been altered and is no longer compatible with the body of the UDF.
  • The COPY... TO STDOUT statement allows you to export a table or arbitrary query in the PostgreSQL wire-compatible format. Text and CSV formats are supported.
  • Add the read-only “ssl” session variable. Value is “off” if the server was started in insecure mode (which disables TLS), or “on” otherwise. This is based on the Postgres variable of the same name.
  • Add a hard limit of how much data can be flushed to system tables for sql stats.
  • Add support for the REDACT flag to the following variants of EXPLAIN:
    • EXPLAIN
    • EXPLAIN (PLAN)
    • EXPLAIN (VEC)
    • EXPLAIN ANALYZE
    • EXPLAIN ANALYZE (PLAN) These explain statements (along with EXPLAIN ANALYZE (DEBUG), which already supported REDACT) will have constants, literal values, parameter values, and any other user data redacted in output.
  • Previously UDFs are not allowed in tables and any other object. This patch enables UDF usage in CHECK constraints of tables in both legacy schema changer and delcarative schema changer. Circular ependencies are not allowed, namely if a UDF depends on a table, then the table can’t use that UDF.
  • A version gate has been added to prevent UDF usage in CHECK constraints before a cluster is fully upgraded to v23.1 or above.
  • Previously users were able to use UDFs from tables with SET DEFAULT and SET ON UPDATE even when they are disallowed from CREATE TABLE and ADD COLUMN. This patch disallows those two cases from ALTER TABLE ALTER COLUMN.

    Operational changes

  • Add COCKROACH_RAFT_LOG_QUEUE_CONCURRENCY env var which controls the number of parallel workers doing Raft log truncations. It can be used to make the in-memory log truncations more agressive and reduce the amount of Raft log data flushed to disk.
  • The new timeseries metric storage.keys.tombstone.count shows the current count of point and range deletion tombstones across the storage engine.
  • The value of kv.range_split.load_cpu_threshold controls the CPU per-second threshold above which a range will be split. Its default value has been increased from 250ms to 500ms, based on performance experiments.
  • CPU balancing is enabled as the default load based rebalancing objective. This can be reverted by setting kv.allocator.load_based_rebalancing.objective to qps.

DB Console changes

  • Add columns p50, p90, p99, max and min latency for Statement table on SQL Activity page.
  • Show a warning for Statement Insights when the SQL API returns a “max size exceed” error.
  • Show a warning for Transaction Insights when the SQL API returns a “max size exceed” error.
  • Show a warning for Schema Insights when the SQL API returns a “max size exceed” error.

Bug fixes

  • Fixed a bug where the AS OF SYSTEM TIME clause was handled incorrectly in an implicit transaction that had multiple statements.
  • This patch fixes asymmetric typing of > and < expressions which may cause erroring of expressions which are legal.
  • This patch fixes possible internal errors in SOME, ANY and ALL expressions of the form: expr > SOME(expr1, expr2, expr3...)
  • Fixed the syntax error for SELECT... QUERY (without AS ) statement.
  • Decommissions that would violate constraints set on a subset of replicas for a range (e.g. num_replicas = 3, <constraint>: 1 ) will no longer be able to execute, respecting constraints during and after the decommission.
  • Adjusted the size reported for TIME, TIMETZ, TIMESTAMP, TIMESTAMPTZ, and DATE types in the pgwire protocol.
  • The ParameterStatus message is now only sent over the pgwire protocol if the value of the parameter changed. (The parameters that are sent this way are timezone, intervalstyle, datestyle, is_superuser, and application_name.)
  • Users can now go to the next page of results when there are more than 20 active statements or transactions in the Active Execution page.
  • Since 22.1 when rangefeed enablement overrides in span configs were introduced, rangefeed requests that reached spans outside the range would not cause range cache invalidation due to the setting being checked first, thus requests could repeatedly hit the same incorrect range, causing errors until cache invalidation or node restart. This fix correctly checks that the span is within the range prior to checking the enablement settings, thus invalidating the cache when a request reaches an incorrect range and causing subsequent requests to successfully reach the correct range.
  • A bug has been fixed that caused errors when creating multiple user-defined functions with the same name and different argument types in the same type family. For example, it was impossible to create both functions f(i INT2) and f(INT4).
  • The following spammy log message was removed: > lease […] expired before being followed by lease […]; foreground traffic may have been impacted
  • Previously, ALTER TABLE... INJECT STATISTICS command would fail if a column with COLLATED STRING type had histograms to be injected, and this is now fixed. The bug has been present since at least 21.2.
  • Fixed a bug in the query engine that could cause incorrect results in some cases when a zigzag join was planned. The bug could occur when the two indexes used for the zigzag join had a suffix of matching columns but with different directions. For example, planning a zigzag join with INDEX(a ASC, b ASC) and INDEX(c ASC, b DESC) could cause incorrect results. This bug has existed since at least v19.1. It is now fixed, because the optimizer will no longer plan a zigzag join in such cases.

Performance improvements

  • The optimizer now plans inverted index scans for queries that filter by JSON fetch value operators (->) that contain both a string and an integer index value after the IN operator. For example the optimizer plans inverted index scans for the following filters: json_col->0 IN ('1', '2'), json_col->'a' IN ('1', '2').

Build changes

  • Starting with CockroachDB v23.1.0-alpha.4, a FIPS compliant tarball and Docker image are produced for the Linux x86_64 platform. The tarball uses OpenSSL libraries for crypto operations by dynamically loading the corresponding FIPS-validated dynamic libraries. The Docker image comes with the FIPS-validated OpenSSL library pre-installed.

Miscellaneous

  • Fix a bug in which RESTORE, BACKUP, and IMPORT jobs would fail if the coordinator node of the job was drained.

Contributors

This release includes 124 merged PRs by 48 authors. We would like to thank the following contributors from the CockroachDB community:
  • DQ (first-time contributor)

v23.1.0-alpha.3

Release Date: February 21, 2023

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.3.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.3.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.3.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.3.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.3.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.3.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.3.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.3.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.3.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

General changes

  • Added new metrics to count for every job type. For example, the metric for paused changefeed jobs is jobs.changefeed.currently_paused. These metrics are updated at an interval defined by the cluster setting jobs.metrics.interval.poll, which defaults to 10 seconds.

Enterprise edition changes

  • Added support for Azure Key Vault KMS, which will allow users to using keys stored in Azure Key Vault. App Registration authentication (Azure RBAC) for Azure Storage is also now supported.
  • Introduced a new locality filter option ( coordinator_locality ) that can be specified when a is created. This option restricts the backup metadata writing to the designated nodes.
  • Fixed a bug that caused the server to crash if trying to restore a table from a backup generated by BACKUP TABLE from a schema that includes , and the restore target database does not have a schema with the same name.
  • Changefeeds with the unordered option can use multi-region .
  • Fixed a bug in changefeeds where long running will fail to generate checkpoints. Failure to generate is particularly bad if the changefeed restarts. Without checkpoints, the changefeed will restart from the beginning, and in the worst case, when exporting substantially sized tables, the changefeed initial scan may not complete.

SQL language changes

  • Added in seconds to the statement statistics on crdb_internal.statement_statistics, system.statement_statistics, and crdb_internal.cluster_statement_statistics, with information about: min, max, p50, p90, and p99. Also added the columns: latency_seconds_min , latency_seconds_max , latency_seconds_p50 , latency_seconds_p90 , and latency_seconds_p99 to crdb_internal.node_statement_statistics`.
  • Deprecated the PGDUMP and MYSQLDUMP formats for . They are still present, but will be removed in a future release. See the page for alternatives.
  • will no longer error.
  • Added last_error_code column to the crdb_internal.node_statement_statistics table. Added last_error_code field to the statistics JSON blob in the crdb_internal.statement_statistics and system.statement_statistics tables.
  • Added support for expressions of the form COLLATE "default", COLLATE "C", and COLLATE "POSIX". Since the default cannot be changed currently, these expressions are all equivalent. The expressions are evaluated by treating the input as a normal string, and ignoring the collation. This means that comparisons between strings and collated strings that use "default", "C", or "POSIX" are now supported. Creating a column with the "C" or "POSIX" collations is still not supported.
  • The insights subsystem in sqlstats is now able to detect failed executions, regardless if they were slow or not.
  • The internal statement_statistics and transaction_statistics tables now include sampled execution statistics on storage iteration.
  • Introduced the declare_cursor_statement_timeout_enabled that disables statement timeouts during FETCH when using DECLARE CURSOR.

Operational changes

  • A that encounters too many retryable errors will now fail instead of pausing to allow subsequent backups the chance to succeed.
  • Added an option to balance CPU time ( cpu ) instead of queries per second ( qps ) among stores in a cluster. This is done by setting kv.allocator.load_based_rebalancing.objective='cpu'. kv.allocator.cpu_rebalance_threshold is also added, similar to kv.allocator.qps_rebalance_threshold to control the target range for store CPU above and below the cluster mean.
  • The now supports using request CPU usage to split ranges. This is introduced with the previous cluster setting kv.allocator.load_based_rebalancing.objective, which when set to cpu, will use request CPU usage. The threshold above which CPU usage of a range is considered for splitting is defined in the cluster setting kv.range_split.load_cpu_threshold, which has a default value of 250ms.
  • Added the flag --disable-max-offset-check to disable node self-termination when it detects with the rest of the cluster beyond --max-offset. The operator assumes responsibility for ensuring that real clock skew never exceeds --max-offset.

DB Console changes

  • Added execution insights to the and pages.
  • Transaction insights that were not found will now display a message Insight not found.
  • Added a waiting statement ID and fingerprint to the details page. Added a blocking transaction ID and fingerprint to the the page.

Bug fixes

  • Fixed a bug where casting a to an results in displaying second offsets, even if they are zero.
  • Allowed and to behave consistently with PostgreSQL. Previously, the VALIDATE CONSTRAINT would fail and cause the whole statement to fail.
  • Resolved the to match PostgreSQL. We previously included the minute/second offset for TIMESTAMPTZ in certain places when casting it to , even when they were zero.
  • Resolved using negative years instead of BC when casting a to a .
  • Fixed the command so it works correctly. Previously, this would return an error saying that the public role does not exist.
  • Statement source (square bracket) syntax is no longer allowed in . Prior to this fix, using this syntax in a UDF would cause a panic. This restriction will be lifted in the future.

Performance improvements

  • The execution of multiple and constraint checks have been parallelized in some cases. As a result, these checks should be completed faster, particularly in multi-region environments where the checks require cross-region reads.

Contributors

This release includes 137 merged PRs by 56 authors. We would like to thank the following contributors from the CockroachDB community:
  • Ivan Gorbachev (first-time contributor)

v23.1.0-alpha.2

Release Date: February 13, 2022

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.2.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.2.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.2.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.2.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.2.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.2.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.2.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.2.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.2.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Backward-incompatible changes

  • CockroachDB now supports sharing storage ranges across multiple indexes/tables. As a result, there is no longer a guarantee that there is at most one SQL object (e.g., table/index/sequence/materialized view) per storage range. Therefore, the columns table_id, database_name, schema_name, table_name and index_name in crdb_internal.ranges and .ranges_no_leases have become nonsensical: a range cannot be attributed to a single table/index anymore. As a result:
    • The aforementioned columns in the crdb_internal virtual tables have been removed. Existing code can use the statement instead, optionally using WITH KEYS to expose the raw start/end keys.
    • SHOW RANGES FROM DATABASE continues to report one row per range, but stops returning the database / schema / table / index name.
    • SHOW RANGES FROM TABLE continues to report one row per range, but stops returning the index name. Suggested replacements:
      • Instead of: SELECT range_id FROM crdb_internal.ranges WHERE table_name = 'x', use: SELECT range_id FROM [SHOW RANGES FROM TABLE x]
      • Instead of SELECT range_id FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2 (variable / unpredictable table name or ID), use: SELECT range_id FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES] WHERE table_name = $1 OR table_id = $2
      • Instead of SELECT start_key FROM crdb_internal.ranges WHERE table_name = 'x', use: SELECT raw_start_key FROM [SHOW RANGES FROM TABLE x WITH KEYS]
      • Instead of SELECT start_key FROM crdb_internal.ranges WHERE table_name = $1 OR table_id = $2 (unpredictable / variable table name or ID), use: SELECT raw_start_key FROM [SHOW RANGES FROM CURRENT_CATALOG WITH TABLES, KEYS] WHERE table_name = $1 OR table_id = $2
  • The format of the columns start_key and end_key for SHOW RANGES FROM DATABASE and SHOW RANGES FROM TABLE have been extended to include which table/index the key belongs to. This is necessary because a range can now contain data from more than one table/index.
  • The format of the columns start_key and end_key for SHOW RANGE... FOR ROW has been changed to be consistent with the output of SHOW RANGES FROM INDEX.
  • The output of no longer includes range_size, range_size_mb, lease_holder, or lease_holder_localities by default. This ensures that SHOW RANGES remains fast in the common case. Use the new option WITH DETAILS to include these columns.
  • Changefeeds using “preview” expressions (released in v22.2.0) and that access the previous state of the row using the cdc_prev() function will no longer work and will need to be recreated with new syntax.
  • Fixed a bug where, when server.identity_map.configuration was used, CockroachDB did not verify the client-provided username against the target mappings. Note that this means that the client must now provide a valid DB username. This requirement is compatible with PostgreSQL; it was not previously required by CockroachDB but it is now. This does not apply when identity maps are not in use.
  • Previously, the type of the replicas, voting_replicas,non_voting_replicas and learner_replicas in crdb_internal.ranges were overridden to INT2VECTOR causing incompatible indexing between .ranges and .ranges_no_leases. Now the types of those columns in the two tables are set to INT[].

Security updates

  • Added an option to re-enable “old” cipher suites for use with very old clients. Fixes issue #1989.
  • Previously, the ENCRYPTION_PASSPHRASE option passed to would appear as ‘redacted’. It now appears as ’**’ which is consistent with and .

General changes

The previously defaulted to 25h. This value was configurable using ALTER RANGE DEFAULT CONFIGURE ZONE USING gc.ttlseconds = <value>, but it was also possible to scope to specific schema objects using ALTER {DATABASE,TABLE,INDEX} CONFIGURE ZONE USING.... The GC TTL value determined how long overwritten values were retained before being garbage collected. With CockroachDB v23.1, the RANGE DEFAULT value is lowered to 4h but only for freshly created clusters. When existing clusters upgrade to this release, CockroachDB will respect whatever value was in use before the upgrade for all schema objects. This value will therefore be 25h if the GC TTL was never altered, or some specific value if the GC TTL had been set explicitly. Full cluster backups taken on earlier version clusters, when restored to clusters that started off at v23.1, will use the GC TTL recorded in the backup image. Cockroach Labs has found the 25h value to translate to higher-than-necessary storage costs, especially for workloads where rows are deleted frequently. It can also make for costlier reads with respect to CPU since we currently have to scan over overwritten values to get to the one of interest. Finally, we’ve also observed cluster instability due to large unsplittable ranges that have accumulated an excessive amount of MVCC garbage. We chose a default of 25h originally to accommodate daily incremental backups with revision history. But with the introduction of scheduled backups introduced in v22.2, we no longer need a large GC TTL. Scheduled backups “chain together” and prevent garbage collection of relevant data to ensure coverage of revision history across backups, decoupling it from whatever value is used for GC TTL. The GC TTL determines how far back AS OF SYSTEM TIME queries can go, which now if going past now()-4h, will start failing informatively. To support larger windows for AS OF SYSTEM TIME queries, users are encouraged to pick a more appropriate GC TTL and set it using ALTER... CONFIGURE ZONE using gc.ttlseconds = <value>. The earlier considerations around storage use, read costs, and stability still apply.

Enterprise edition changes

  • The changefeed.active_protected_timestamps.enabled has been removed and is now always treated as if it was true.
  • Improved logic to rely on the optimizer to evaluate star expansion.
  • Changefeed expressions now support system columns.
  • Changefeed expressions now have access to the cdc_prev tuple which contains the previous state of the row.
  • Changefeed expressions now support non-volatile user defined functions (UDFs).
  • Changefeed transformations (e.g., CREATE CHANGEFEED... AS SELECT... ) no longer require the schema_change_policy=stop option.
  • Changefeed transformations introduced in the v22.2 release in preview mode are no longer experimental. This feature can now be considered to be fully production-ready.
  • The statement now supports URIs with the prefixes azure, gs, gcpubsub, http, https, webhook-https, nodelocal, s3, and kafka for use by changefeeds.
  • The CONTROLCHANGEFEED will be deprecated in the future (see issue #94757 ). With this change, usages of the CONTROLCHANGEFEED role option will come with a deprecation warning. Its existing behavior remains the same. The SELECT and CHANGEFEED privileges will be used for changefeeds henceforth:
    • The SELECT privilege on a set of tables allows a user to run core changefeeds against them.
    • The CHANGEFEED privilege on a set of tables allows a user to run enterprise changefeeds on them, and also manage the underlying changefeed job (ie. view, pause, cancel, and resume the job). Notably, a new changefeed.permissions.require_external_connection_sink.enabled is added and set to false by default. Enabling this setting restricts users with CHANGEFEED on a set of tables to create enterprise changefeeds into external connections only. To use a given external connection, a user typically needs the USAGE privilege on it. Note that ALTER DEFAULT PRIVILEGES can be used with both the CHANGEFEED and SELECT privileges to assign coarse-grained permissions (i.e., assign permissions to all tables in a schema rather than manually assign them for each table).
  • Changefeeds created/altered with a metrics_label set while server.child_metrics.enabled is set to false will now provide the user a notice upon creation.
  • Fix a bug in that would panic when altering changefeeds to remove a table that has already been dropped.
  • Reduced the default size of scan RPC replies to improve cluster stability during changefeed accounting for transient memory.
  • Changefeed expressions now support the changefeed_created_timestamp function.
  • Increased the default changefeed.memory.per_changefeed_limit to 1/2GiB. This should result in changefeeds being able to produce larger files.
  • The confluent_schema_registry URI for avro changefeeds now supports client_cert and client_key parameters.

SQL language changes

  • Added the pg_get_function_arguments . This returns the argument list (with defaults) necessary to identify the function with a given OID.
  • Added voting_replicas and non_voting_replicas columns to the output of SHOW RANGE and SHOW RANGES statements.
  • It is now possible to create and alter indexes using the alias INVISIBLE. The alias can be used anywhere NOT VISIBLE is used when creating or altering indexes. NOTE: the INVISIBLE alias is not supported for NOT VISIBLE columns.
  • The system.table_statistics table now contains a column called fullStatisticsID to store an id referencing the full table statistic the partial statistic was derived from.
  • Ordinal column references (e.g., SELECT @1, @2 FROM t ) are now deprecated. By default, statements using this syntax will now result in an error. If desired, such statements can be allowed using the session setting SET allow_ordinal_column_references=true. Support for ordinal column references is scheduled to be removed in upcoming version v23.2.
  • The optimizer will now use table statistics that are merged combinations of the newest partial statistic and latest full statistic collection. And, if forecasting is enabled, the merged statistic will be used in the forecast.
  • Added the column indexes_usage and the index indexes_usage_idx on value on the table system.statement_statistics.
  • Add the log_timezone session variable, which is read-only and always UTC.
  • Added Two new virtual tables crdb_internal.index_spans and .table_spans, which list the logical keyspace used by each index/table.
  • The following new statements are introduced:
    • SHOW RANGES FROM CURRENT_CATALOG and SHOW RANGES without a parameter: functions as an alias for SHOW RANGES FROM DATABASE on the session’s current database.
    • SHOW RANGES FROM DATABASE... WITH TABLES: reports at least one row per table. It is possible for the same range ID to be repeated across multiple rows, when a range spans multiple tables.
    • SHOW RANGES FROM DATABASE... WITH INDEXES: reports at least one row per index. It is possible for the same range ID to be repeated across multiple rows, when a range spans multiple indexes.
    • SHOW RANGES FROM TABLE... WITH INDEXES: reports at least one row per index. It is possible for the same range ID to be repeated across multiple rows, when a range spans multiple indexes.
    • SHOW CLUSTER RANGES [ WITH { INDEXES | TABLES } ]: reports ranges across the entire cluster, including ranges that do not contain table data. The behavior of WITH INDEXES and WITH TABLES is the same as SHOW RANGES FROM DATABASE. Additionally, the following new options have been added to the SHOW RANGES statement: - WITH KEYS: produces the raw bytes of the start/end key boundaries.
    • WITH DETAILS: produces more details, using computations that require extra network roundtrips. This option will make the operation slower overall.
    • WITH EXPLAIN: produces the text of the SQL query used to run the statement.
  • Implemented the pg_timezone_names pg_catalog table, which lists all supported timezones.
  • Improved the performance of trigram operations.
  • Previously, CockroachDB would crash if a user creates a whose function signature includes a implicit record type (essentially a table) which has a column using a user defined enum type. The root cause was a hydration deadloop when looking up descriptors during hydration. This fix adds a new flag to avoid hydration in order to avoid the deadloop.
  • Previously, error messages for missing users sometimes had different forms. This is now unified in the form role/user "user" does not exist.
  • with subqueries in the body of the function are now supported.
  • Previously, setting a table’s locality was not allowed if the table contained any hash sharded index. This restriction is now removed.
  • Users can now add a super region when creating a database.
  • now logs an error during the insert phase on the SQL_EXEC logging channel.
  • Added a new REDACT flag to which causes constants, literal values, parameter values, and any other user data to be redacted in explain output. Redacted statement diagnostics bundles can now be collected with .
  • Added two new virtual tables displaying execution insights for transactions:
    • crdb_internal.cluster_txn_execution_insights
    • crdb_internal.node_txn_execution_insights
  • Some queries which previously resulted in the error “could not decorrelate subquery” now succeed.
  • If copy_from_retries_enabled is set, is now able to retry certain safe circumstances: namely when copy_from_atomic_enabled is false, there is no transaction running COPY and the error returned is retriable. This prevents users who keep running into TransactionProtoWithRefreshError from having issues.
  • Fixed the databases list API when the database name has special characters.
  • The pgwire protocol implementation can now accept arguments of the JSON[] type (oid=199). Previously, it could only accept JSONB[] (oid=3804). Internally, JSON[] and JSONB[] values are still identical, so this change only affects how the values are received over the wire protocol.
  • CPU time spent during SQL execution is now visible in the output of queries run with . This measure does not include CPU time spent while serving KV requests, and CPU time is not shown for queries that perform mutations or for plans that aren’t vectorized. This can be useful for diagnosing performance issues and optimizing SQL queries.
  • The and statements now use a column name of privilege_type rather than privilege. For external connections, the name column has been changed to connection_name. This makes the commands consistent with other SHOW GRANTS commands.
  • The statement will now show the expression used to define an index, if one was used.
  • It is now possible to run efficient tsvector @@ tsquery searches when there is an inverted index on the tsvector column being searched.
  • Added a cpuNanos field to the statistics column of the crdb_internal.statement_statistics and system.statement_statistics tables that reports the amount of CPU time in nanoseconds during SQL execution for queries that track CPU time.
  • Previously, options would get parsed as kv_options, which meant that a user could not pass multiple values to a SHOW BACKUP option, causing feature gaps in SHOW BACKUP relative to and . This patch rewrites the show backup option parser, closing the following feature gaps:
    • A user can now pass and check multiple KMS URIs in SHOW BACKUP
    • A user can pass locality-aware incremental_locations, allowing a user to also pass the check_files parameter to a locality-aware backup chain that also specifies the backup incremental location.
  • Updated the name of the cpuNanos column to cpuSQLNanos on crdb_internal.statement_statistics and system.statement_statistics
  • Some queries with EXISTS subqueries which previously resulted in the error “could not decorrelate subquery” now succeed.
  • Users can query the crdb_internal.kv_dropped_relation table to see which tables, materialized views and sequences are currently already dropped but have not yet been garbage collected, along with the garbage collection TTL setting that is currently in force. This setting originates from the table’s own zone configuration, or from its parent database which it inherits, or in turn from the default zone configuration. These settings are typically set using ALTER TABLE... CONFIGURE ZONE USING gc.ttlseconds =...;.
  • Administrators may now call a new crdb_internal.upsert_dropped_relation_gc_ttl to retroactively set the garbage collection TTL on a table, materialized view, or sequence which has already been dropped. Effectively, this retroactively performs ALTER TABLE... CONFIGURE ZONE USING gc.ttlseconds =...;. Note that this statement is prevented from being executed on dropped tables because they can no longer be referenced by name at that point. Usage of this built-in is typically in conjunction with the recently-added crdb_internal.kv_dropped_relations virtual table. For example, garbage collection can be triggered ASAP for all dropped relations by querying: SELECT crdb_internal.upsert_dropped_relation_gc_ttl(id, '1 second') FROM crdb_internal.kv_dropped_relations;. Doing so for all tables in a dropped database requires filtering on the parent_id column, the database name being lost at that point.
  • Allow * expressions in .
  • Previously, could be created with any volatility no matter if the function body statements contained any expression which would violate the target volatility. For example, an immutable function might use random() in it. This change added validations to guarantee that all statements in the function body should be as strict as the expected UDF volatility.

Operational changes

  • Updated the metrics queue.gc.info.clearrangesuccess and queue.gc.info.clearrangefailed to include statistics about GC operations that perform ClearRange on parts of the range keyspace. Previously those metrics only included requests to remove range data completely when performing a schema change.
  • The load-based splitter has been redesigned to be more consistent with CPU-based rebalancing rather than QPS-based rebalancing to improve range splits. This redesign is disabled by default currently.
  • The storage.value_blocks.enabled, when set to true, writes the values of older versions of the same key to separate value blocks in the same sstable. For workloads that create many versions, this can improve the performance of reads by increasing locality. It can also help scan performance with single versions due to an optimization that avoids a key comparison (useful if the key are not very short). The default value of this setting is currently false.
  • The bytes read from SQL clients prior to authentication are now reported via the metric sql.pre_serve.bytesin. Previously, this was reported via the sql.bytesin metric.
  • Transaction errors will contain more detailed information in redacted logs.
  • Added the COCKROACH_RAFT_MAX_INFLIGHT_BYTES environment variable, which helps strictly limit inflight traffic from a Raft leader to its followers, particularly in situations when many large messages are sent and significantly exceed COCKROACH_RAFT_MAX_SIZE_PER_MSG * COCKROACH_RAFT_MAX_INFLIGHT_MSGS which is a softer limit.
  • Log messages for write stalls have been adjusted slightly.
  • Histogram metrics can now optionally use the legacy HdrHistogram model by setting a new environment variable COCKROACH_ENABLE_HDR_HISTOGRAMS to true on CockroachDB nodes. Note that this is not recommended unless users are having difficulties with the newer Prometheus-backed histogram model. Enabling legacy historgrams can cause performance issues with timeseries databases like Prometheus, as processing and storing the increased number of buckets is taxing on both CPU and storage. Note that the legacy HdrHistogram model is slated for full deprecation in upcoming releases.
  • Prometheus histograms will now export more buckets across the board to improve precision & fidelity of information reported by histogram metrics, such as quantiles. This will lead to an increase in storage requirements to process these histogram metrics in downstream systems like Prometheus, but should still be a marked improvement when compared to the legacy HdrHistogram model. If users have issues with the precision of these bucket boundaries, they can set the environment variable COCKROACH_ENABLE_HDR_HISTOGRAMS=true to revert to using the legacy HdrHistogram model instead, although this is not recommended otherwise as the HdrHistogram strains systems like Prometheus with excessive numbers of histogram buckets. Note that HdrHistograms are slated for full deprecation in upcoming releases.
  • In the rare event of a range inconsistency, the consistency checker now saves a storage checkpoint on each storage the range belongs to. Previously, this was a full checkpoint, so its cost could quickly escalate on the nodes that went on running. This change makes the checkpoints partial, i.e., they now only contain the relevant range and its neighbors. This eliminates the time pressure on the cluster operator to remove the checkpoints.
  • The count of new SQL connections is now also reported on sql.pre_serve.new_conns.
  • The count of network bytes sent to report re-authentication errors to a SQL client is now reported via the metric sql.pre_serve.bytesout (instead of sql.bytesout previously). The count of pre-authentication errors is now reported via the metric sql.pre_serve.conn.failures (instead of sql.conn.failures previously).

Command-line changes

  • The TLS parameters to connect to a cluster from SQL clients have been simplified.
  • The password assigned to the demo user in can now be overridden by the env var COCKROACH_DEMO_PASSWORD. This is meant for use in automated tests, when tests cannot be configured to use TLS client certificate authentication using the client certificates in $HOME/.cockroach-demo.
  • and now support an \info client-side command to print the server details again.
  • is now able to preserve open web sessions across restarts of the cockroach demo command. The sessions are saved in the directory ~/.cockroach-demo alongside the TLS certificates and keys.
  • The file format used for transient loss of quorum recovery files has changed. It is not possible to use replica info files generated by earlier versions to be used with current and future versions.
  • Workloads that take a --seed argument previously defaulted to 1. Now, they use a randomly generated seed in each run. Users can still pass a custom seed with the --seed flag.
  • Added cpu_time_per_second to the hot-ranges.sh utility debug zip script.

DB Console changes

  • Secure clusters now show correct login information in the top right corner.
  • The databases filter dropdown in the Statements page now uses the getDatabasesList() API call, resulting in all cluster databases showing up.
  • Added information about the selected plan to the Explain Plan tab under Statement Details.
  • The Databases page and the Databases Details pages now each contain search and filter components, allowing the ability to search and filter through databases and their tables.
  • Graphs can now be clicked on to toggle legend “stickiness” and make the points stop following the mouse. This makes it easier to read dense graphs with many series plotted together.
  • The Statement Fingerprint Details page in the DB Console no longer infinitely loads after 5 minutes.
  • Added a time picker to the Workload Insights Overview pages in the DB Console.
  • Added all three session status options ( Active, Closed, and Idle ) and an empty results placeholder.
  • Added a list of all statement fingerprints that use a given index to the Index Details page.
  • Removed reset sql stats and reset index stats from the DB Console when the user is a non-admin.
  • Remove reset sql stats from the Transactions page for non-admins.
  • Added an insights type filter for the Workload Insights page, and added an execution status filter for the Active Execution pages.
  • Hid the apply option for index recommendation when the user is not an admin.
  • The Database list filter now shows all databases in the cluster on CC console.
  • Hid the filter for the Databases and Database Details pages if both the node and regions dropdowns are also hidden.
  • The introduction of the Key Visualizer makes it easy to identify historical hotspots. To support this new feature, three new are introduced:
    • keyvisualizer.enabled: enables the Key Visualizer.
    • keyvisualizer.sample_interval: controls the frequency at which the Key Visualizer collects samples.
    • keyvisualizer.max_buckets controls the maximum number of buckets in a sample.
  • Added a CPU Time chart to the Statement Details page.
  • Added CPU time as a column on the Statement and Transaction tables.
  • Hid the list of used fingerprints per index on the Index Details page for non-admin users.
  • Added write bytes, write keys, read bytes, read keys and cpu statistics to the /hotranges DB Console page. These statistics are the rated average over the last 30 minutes.
  • The loading spinner on the Insights Overview page now only shows when a request is pending and either the data is nullish or invalid (i.e., a new time range selected).
  • Previously, transaction start time for the Transaction Insights page was only available for transaction insights with high contention as the issue. This information is now available for all transaction insights: start time, end time, and time elapsed.
  • Added search, filter and time picker for the list of most-used statement fingerprints on the Index Details page.
  • Added CPU Time to the Statement and Transaction Insights page.
  • Previously, the stale node metrics displayed in the Cluster Overview Nodes table may mislead users in to thinking that they are current values when in fact they are stale. Now these metrics are displayed with a stale tag, allowing for users to be informed about the staleness of the data displayed to them regarding dead nodes.

Bug fixes

  • Fixed a bug where the session_id session variable would not be properly set if used from a subquery.
  • Fixed a bug where CockroachDB could, in rare cases, encounter an internal error when evaluating the crdb_internal.range_stats (which powers the command among other things). The bug was introduced in v22.2.0 and is now fixed.
  • Fixed a bug that could prevent CASE expressions that used placeholder return values from type-checking correctly.
  • Updated the volatility of the hmac, digest, and crypt built-ins to be immutable.
  • Server logs are now correctly fsynced at every syncInterval.
  • The stxnamespace, stxkind and stxstattarget columns are now defined in pg_statistics_ext.
  • Fixed a bug where, when experimental MVCC range tombstones are enabled (they are disabled by default), a bulk ingestion (e.g., an IMPORT ) could fail to take a committed-but-unresolved write intent into account during conflict checks when written above an MVCC range tombstone. It was therefore possible in very rare circumstances for the ingestion to write a value below the timestamp of the committed intent, causing the ingested value to disappear.
  • This patch fixes JOIN queries involving tables with unique constraints using LIMIT, GROUP BY, and ORDER BY clauses to ensure that the optimizer considers streaming group-by with no TopK operation, when possible. This is often the most efficient query plan.
  • Secure clusters now show correct login information in the top right corner.
  • Previously, CockroachDB could crash in rare circumstances when evaluating lookup and index joins. The bug has been present since the v22.2.0 release. You can also employ a temporary workaround without upgrading to the release with this fix by changing the value of the undocumented sql.distsql.use_streamer.enabled to false.
  • The CREATE ROLE, DELETE ROLE, GRANT, and REVOKE statements no longer function when the transaction is in read-only mode.
  • Fixed a bug where, when experimental MVCC range tombstones are enabled (they are disabled by default), a bulk ingestion (e.g., an IMPORT ) could, in some situations, fail to properly check for conflicts with existing MVCC range tombstones. This could cause the ingestion to write below a recently-written MVCC range tombstone, in turn losing the ingested data. This could only happen in rare circumstances where a bulk ingestion was applied concurrently with an import cancellation.
  • Fixed a bug where, in some cases, the start/end key columns of the output of was missing.
  • Fixed a bug where trigrams ignored unicode (multi-byte) characters from input strings.
  • Fixed a bug that could happen when type-checking an array expression that only contains NULLs and placeholder values. The bug was only present in v22.2.1.
  • Fixed a bug where tables which receive writes concurrently with portions of an ALTER TABLE... SET LOCALITY REGIONAL BY ROW may fail with an error: duplicate key value violates unique constraint "new_primary_key". This bug was introduced in 22.1.
  • Fixed a bug where CockroachDB could encounter an internal error when evaluating window functions with RANGE window frame mode with an OFFSET PRECEDING or OFFSET FOLLOWING boundary set when an ORDER BY clause has the NULLS LAST option set. This will now result in a regular error since the feature is marked as unsupported.
  • Previously, CockroachDB could delay the release of the locks acquired when evaluating SELECT FOR UPDATE statements in some cases. This delay (up to 5s) could then block future readers. The bug was introduced in 22.2.0, and the temporary workaround without upgrading to a release with this fix is to set the undocumented sql.distsql.use_streamer.enabled to false.
  • Record types can now be encoded with the binary encoding of the Postgres wire protocol. Previously, trying to use this encoding could case a panic.
  • Fixed a panic that could be caused when using a SQL cursor to access tables in the crdb_internal schema.
  • Fixed a bug in which RESTORE SYSTEM USERS would fail to restore .
  • Fixed a crash that could occur on the gateway node when collecting a statement diagnostics bundle (e.g., ) on a statement that fails with certain errors. This crash has existed in various forms since the introduction of statement bundles in v20.1.0.
  • Fixed a recursive CTE expressions which cause internal errors when explicit CASTs of initial expressions to output types are missing.
  • Previously, certain GRANT or REVOKE commands on a user which does not exist would error with the correct PG code. This is now fixed.
  • The pg_proc and pg_type virtual OID indexes no longer incorrectly show cross-db objects.
  • It is now possible to run cockroach version and cockroach start (and possibly other sub-commands) when the user running the command does not have permission to access the current working directory.
  • It is now possible to use a directory whose name is "disabled" via --external-io-dir. To actually disable external I/O, use --external-io-dir="".
  • This patch fixes an internal error occurring in CASE expressions when a column present in a THEN or ELSE expression is of an inequivalent type compared to that of a constant this column is compared to in an equality predicate, e.g., (CASE WHEN false THEN int_col ELSE 1 END) IN (int_col) AND int_col=3/2.
  • The pronamespace column of the pg_proc table now correctly reports the crdb_internal schema for that have the “crdb_internal” prefix.
  • In the SQL shell ( / ), when using \c / \connect to connect to a different server, CockroachDB would previously report an error if the new server had a different cluster ID. This has been fixed: this situation is merely a warning.
  • When using identity maps (via server.identity_map.configuration ), authentication now correctly verifies that the client-provided username matches at least one of the mappings for the system identity. Previously, the client-provided username was incorrectly ignored and authentication could fail if the first candidate mapping did not result in a valid DB username.
  • The prokind column of pg_catalog.pg_proc is now populated properly.
  • pg_catalog.pg_description and pg_catalog.obj_description() are now able to retrieve the descriptive help for .
  • Fixed a crash that could occur when formatting a tuple with an unknown type.
  • Fixed a bug where a DNS lookup was performed during gossip remote forwarding while holding the gossip mutex. This could cause processing stalls if the DNS server was slow to respond.
  • Fixed a bug where CLOSE ALL would not respect the “ALL” flag and would instead attempt to close a cursor with no name.
  • Fixed a bug where default expressions could have a type which differs from the type of the column as long as the expression’s type could be cast in an assignment context, which could lead to a panic during a backfill if such a default expression was added to a new column. This bug was introduced in v22.2.0.
  • DB Console features that check for the VIEWACTIVITYREDACTED privilege now also account for .
  • CockroachDB now supports receiving regXXX -type values in binary extended protocol.
  • Operations like can now reuse a previously created AWS KMS client if the client was created with the same parameters. This addresses the NoCredentialProviders errors on EC2 for backups with long incremental chains.
  • The syntax EXPLAIN (DDL) COMMENT ON is now possible.
  • Fixed a bug where a database would not grant CREATE and USAGE on the public schema to the public role.
  • Fixed the formatting of JSON values inside of a SQL array so they no longer have improper quoting.
  • Fixed a bug which could cause expressions with side-effects (e.g., volatile expressions or data-modifying statements like INSERT ) in NOT MATERIALIZED CTEs to be executed more than once. This bug was present since NOT MATERIALIZED was first supported in version 20.2.0.
  • Fixed pg_get_indexdef so that it shows the expression used to define an expression-based index. In addition, the function was previously including columns stored by the index, which was incorrect and has now also been fixed.
  • Reduced register session, deregister session, and session cancel query contention.
  • Fixed a bug that could cause arguments of a statement to be evaluated when previous arguments always evaluated to non-NULL values. This bug could cause query errors to originate from arguments of a COALESCE that should have never been evaluated.
  • Fixed the array_to_string so that nested arrays are traversed without printing ‘ARRAY’ at each nesting level.
  • Fixed a bug where using the statement to copy data into a column with collated strings would result in an error similar to internal error: unknown type collatedstring.
  • The content of column_default in information_schema.columns no longer has type annotations.
  • Fixed a long-standing bug that caused incorrect parsing of double-quoted identifiers separated by one or more newlines.
  • Fixed a rare internal errors in LATERAL queries with redundant function calls.
  • Fixed an internal error which may occur in the SHOW RANGE FROM TABLE statement when the FOR ROW clause specifies a BYTE literal and the corresponding column data type is BIT.
  • Fixed an internal errors which may occur on some AS OF SYSTEM TIME expressions.
  • Fixed a bug where a node with a disk stall would continue to accept new connections and preserve existing connections until the disk stall abated.
  • Fixed a bug where a flow could hang indefinitely in the face of a context cancellation, manifesting as a stuck restore job.
  • Fixed a bug where the NOSQLLOGIN had a bug that made CockroachDB ignore it entirely, so it had no effect. The bug was introduced in v22.2.0-alpha.1. The NOSQLLOGIN is unaffected by this bug.
  • The compatibility scalar functions in information_schema are now listed in the proper namespace in pg_catalog.pg_proc.
  • Fixed a bug in which the statement would not properly handle a placeholder for the revision_history option.

Performance improvements

  • The optimizer can now avoid planning a sort in more cases with joins that perform lookups into an index with one or more columns sorted in descending order. This can significantly decrease the number of rows that have to be scanned in order to satisfy a clause.
  • Significantly reduced CPU usage of the underlying gossip network in large clusters.
  • Refactored the query logic when fetching database index recommendations for the DatabaseDetails API endpoint, greatly reducing the query time and cost, particularly for large schemas.
  • Improved performance when populating crdb_internal.default_privileges.
  • Some types of are now inlined in query plans as relation expressions, which speeds up their evaluation. UDFs must be non-volatile and have a single statement in the function body to be inlined.
  • Improved the performance of pg_{function,table,type}_is_visible.
  • Long chains of incremental backups and restore of such chains will now allocate less memory during the unmarshaling of metadata.
  • Extended the RPC compression encoding with a length prefixing format, allowing more efficient decompression on receivers.
  • When planning lookup joins with a clause from a REGIONAL BY ROW input table, the optimizer will now explore a locality-optimized-search plan of two lookup joins to possibly avoid high latency of reading rows in a remote region.
  • Improve the performance of the SHOW FUNCTIONS statement.
  • Improved the performance of several PostgreSQL compatibility built-ins.
  • In some cases, when planning an inverted zigzag join, the optimizer can now detect whether it is necessary to re-apply the filter after the zigzag join. If it is not necessary, the optimizer can produce a more efficient plan.
  • Fixed a bug which could lead to very slow drop when tables or views have a very large number of columns (greater than 1000).
  • In 22.2, CockroachDB introduced support for DISCARD TEMP and made DISCARD ALL actually discard temp tables. This implementation ran expensive logic to discover temporary schemas rather than consulting in-memory data structures. As a result, DISCARD ALL, which is issued regularly by connection pools, became an expensive operation when it should be cheap. This problem is now resolved.
  • In 22.2, logic was added to make SET SESSION AUTHORIZATION DEFAULT not a no-op. This implementation used more general code for setting the role for a session which made sure that the role exists. This improves the performance of the DISCARD ALL and SET SESSION AUTHORIZATION DEFAULT statements.
  • The optimizer now plans inverted index scans for queries that filter by JSON fetch value operators ( -> ) with integer indices, e.g, json_col->0 = '{"b": "c"}'.
  • The optimizer now plans inverted index scans for queries that filter by JSON fetch value operators ( -> ) with integer indices alongside the “contains” or the “contained by” operators, e.g, json_col->0 @> '{"b": "c"}' or json_col->0 <@ '{"b": "c"}'.
  • Added delegated snapshots which can reduce WAN traffic for snapshot movement. If there is another replica for this range with a closer locality than the delegate, the leaseholder will attempt to have that delegate send the snapshot. This is particularly useful in the case of a decommission of a node where most snapshots are transferred to another replica in the same locality.
  • The Raft proposal pipeline has been optimized to reduce interference between Raft proposals. This improves average and tail write latency at high concurrency.

Build changes

  • The native binary for Cypress is now only downloaded and installed when UI end-to-end tests are run, instead of eagerly downloading it on all platforms at build-time. This restores the ability for non-{Windows, Darwin, Linux} platforms like FreeBSD and illumos to build CRDB without modifications, which broke in the initial 22.2 release.
  • Required NPM dependencies are now fetched from a Google Cloud Storage bucket managed by Cockroach Labs instead of from a git submodule committed in-tree.

Contributors

This release includes 820 merged PRs by 95 authors. We would like to thank the following contributors from the CockroachDB community:
  • HighPon (first-time contributor)
  • Vivian Kong

v23.1.0-alpha.1

Release Date: December 19, 2022

Downloads

CockroachDB v23.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 SystemArchitectureFull executableSQL-only executable
LinuxIntelcockroach-v23.1.0-alpha.1.linux-amd64.tgz
(SHA256 )
cockroach-sql-v23.1.0-alpha.1.linux-amd64.tgz
( SHA256)
ARMcockroach-v23.1.0-alpha.1.linux-arm64.tgz
(Experimental)

(SHA256 )
cockroach-sql-v23.1.0-alpha.1.linux-arm64.tgz
(Experimental)

( SHA256)
Mac
(Experimental)
Intelcockroach-v23.1.0-alpha.1.darwin-10.9-amd64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.1.darwin-10.9-amd64.tgz
(
SHA256)
ARMcockroach-v23.1.0-alpha.1.darwin-11.0-arm64.tgz
( SHA256)
cockroach-sql-v23.1.0-alpha.1.darwin-11.0-arm64.tgz
(
SHA256)
Windows
(Experimental)
Intelcockroach-v23.1.0-alpha.1.windows-6.2-amd64.zip
( SHA256)
cockroach-sql-v23.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:
  • The ARM image is Experimental and not yet qualified for production use and not eligible for support or uptime SLA commitments.
  • The Intel image is Generally Available for production use.
To download the Docker image:

Backward-incompatible changes

  • Replaced the cdc_prev() in favor of a cdc_prev tuple. This is an incompatible change that may break that use the previous cdc_prev() function.
  • now includes rows for all indexes that support the table. Prior to this change, SHOW RANGES FOR TABLE foo was an alias for SHOW RANGES FOR INDEX foo@primary. This was causing confusion, as it would miss data for secondary indexes. It is still possible to filter to just the primary index using SHOW RANGES FOR INDEX foo@primary. The statement output now also includes the index name.

Security updates

  • It is now possible to create for identity principals that are not a valid SQL username using and the new flag --disable-username-validation. This is meant to be used in combination with the server.identity_map.configuration and the map option in HBA rules ( server.host_based_authentication.configuration ). To test this feature, use cockroach sql. Cockroach Labs recommends passing the username separately from the connection URL.
  • There is a new SQL system_identity defined to contain the identity principal presented by the SQL clients during the initial connection. This may be different from session_user when the identity was mapped, either using GSSAPI and include_realm=0, or when using an identity map.

General changes

  • Upgraded gRPC to v1.49.0
  • The connection timeout for cluster-internal connections between nodes has been reduced to 5s to potentially reduce the impact of network issues. Previously, CockroachDB employed a 20s connection timeout.
  • CockroachDB no longer shares a TCP connection for the KV and Gossip subsystems. Each subsystem now uses their own connection, so the total number of outgoing and incoming TCP connections at each node in the cluster will increase by 30 to 50 percent.
  • Bulk operations now log the (sanitized) destinations they are connecting to. For example: backup planning to connect to destination gs://test/backupadhoc?AUTH=specified&CREDENTIALS=redacted.

Enterprise edition changes

  • no longer reveals Confluent schema registry user information, including a user’s secret key. This information is now redacted, meaning it will not be stored in CockroachDB internal tables at all.
  • JSON encoder performance is improved by 50%.
  • Changefeeds, using cloud storage sink, now have better throughput.
  • Added the changefeed.event_consumer_workers which allows changefeeds to process events concurrently.
  • Changefeed) exports are up to 25% faster due to uniform work assignment.
  • Changefeeds can emit files compressed with the ZSTD algorithm, which provides good compression and is much faster than GZIP. In addition, a new, faster implementation of GZIP is used by default.
  • When a changefeed is run with the option virtual_columns = "null", the virtual column will be ordered last in each row.
  • For Kafka , you can now add the optional JSON field "Compression" to the kafka_sink_config option. This field can be set to "none" (default), "GZIP", "SNAPPY", "LZ4", or "ZSTD". Setting this field will result in the specified compression protocol to be used when emitting events.
  • Fixed a bug that could cause changefeeds to fail during a rolling restart.
  • Changefeeds will now treat all errors, unless otherwise indicated, as retryable errors.
  • CockroachDB now supports passing in the optional external ID when . This is done by extending the values of the comma-separated string value of the ASSUME_ROLE parameter to the format <role>;external_id=<id>. Users can still use the previous format of just <role> to specify a role without any external ID. When using role chaining, each role in the chain can be associated with a different external ID.
  • can now be modified from within tenants to better support serverless use cases.
  • are now planned and evaluated using the SQL optimizer and distSQL execution. The state of the previous row is now exposed as the cdc_prev tuple.
  • Changefeeds no longer require the COCKROACH_EXPERIMENTAL_ENABLE_PER_CHANGEFEED_METRICS environment variable to be set in order to use the metrics_label option.
  • Changefeeds can now be scheduled at intervals specified in crontab notation.

SQL language changes

  • Added the crdb_internal.to_json_as_changefeed_with_flags to help debug JSON .
  • Added the regions column to the command which will output a string of ALTER DATABASE commands if the database is a multi-region database and NULL for everything else. Previously, the user did not have an easy way to see if a backed up database is multi-region.
  • Types with length modifiers can now be used to prefix literals.
  • A new column plan_gist was added to crdb_internal.{node,cluster}_queries representing the compressed logical plan.
  • You can generate easy-to-read statements for a table’s (secondary) indexes using the SHOW CREATE INDEXES FROM <table_name> and SHOW CREATE SECONDARY INDEXES FROM <table_name> statements.
  • enum_first, enum_last, and enum_range may now take NULL arguments as long as their type can be inferred from the expression.
  • support for ALTER PRIMARY KEY statements now extends to tables which have secondary indexes.
  • The backup.restore_span.target_size cluster setting now defaults to 384 MiB. This should reduce the number of ranges created during and thereby reduce the merging of ranges that needs to occur after the restore.
  • The transaction_timeout was added. transaction_timeout aborts an explicit transaction when it runs longer than the configured duration. When the timer times out, the current statement is cancelled and the transaction enters an aborted state. This timeout does not have any effect when no statement is being executed, so it should be used with idle_in_transaction_timeout for the best results.
  • The crdb_internal.check_consistency now does not include the diff between inconsistent replicas, should they occur. If an inconsistency occurs, the storage engine checkpoints should be inspected. This change is made because the maximum range size limit has been increased from 64 MiB to 512 MiB, so inlining diffs in consistency checks does not scale.
  • CockroachDB now shows a hash-sharded check constraint in if it is set to NOT VALID.
  • Added the SHOW FUNCTIONS and SHOW FUNCTIONS FROM <schema> statements, which list .
  • The default value of sql.metrics.statement_details.plan_collection.enabled is now false.
  • CockroachDB now supports executing statements of the form DELETE FROM... USING.
  • The sql.ttl.default_range_concurrency and table storage parameter ttl_range_concurrency are no longer configurable.
  • CockroachDB drops the associated scheduled incremental backup when or DROP SCHEDULES is called. Previously, whenever a user dropped a , the corresponding scheduled incremental backup would not be dropped.
  • Added the sql.auth.change_own_password.enabled . It defaults to false. When set to true, any user is allowed to change their own password to a non-null value. Changing other role options still has the same privilege requirements as before (either CREATEROLE or CREATELOGIN, depending on the option).
  • The sql.distsql.max_running_flows has been removed.
  • The query field in the crdb_internal.node_queries, crdb_internal.cluster_queries, and SHOW QUERIES commands now includes the original comments in the queries.
  • Added a new descriptor_validation which can be set to read_only or off to disable descriptor validation, which may be useful when mitigating or recovering from catalog corruption.
  • CockroachDB now supports using to add a new primary key without moving the existing primary key to a secondary index if the primary key name is a reserved SQL keyword. Previously, a constraint already exists error was returned.
  • Added the contention_events column to the cluster_execution_insights table to see which transaction is blocking the specific statement.
  • crdb_internal.scan and crdb_internal.list_sql_keys_in_range return the timestamp for the time at which the value for a key was written, in addition to the raw key and value.
  • Previously, the value was set at the start of the TTL job (with a TTL cutoff - 30s), but this results in an error for TTL jobs that run longer than gc.ttlseconds: error selecting rows to delete: ttl select defaultdb.public.events: batch timestamp 1666883527.780656000,0 must be after replica GC threshold 1666883574.542825089,0. CockroachDB now makes the AS OF SYSTEM TIME value relative to when each SELECT query is run (query time - 30s) to prevent this error from happening, but each SELECT query will run against a different table state. This should be ok because if records are missed during one job invocation they should still be picked up the next.
  • The system.sql_instances table now includes pre-allocated ID entries, where all the fields except id will be NULL.
  • The to_char(timestamp, string) has been added.
  • The to_char(interval, string) built-in has been added.
  • The system.table_statistics table now contains a column called partialPredicate to store a predicate for a partial statistic collection.
  • A new NumericStat, idleLat, was introduced to the statistics column of crdb_internal.statement_statistics. This reports the time spent waiting for the client to send the statement while holding a transaction open. Developers may use this stat to identify opportunities for restructuring their apps to reduce contention.
  • The set of supported compression algorithms in compress/decompress built-in is expanded to include lz4, snappy, and zstd.
  • A new column database was added to crdb_internal.{node,cluster}_queries and list sessions .
  • Fixed a bug in the legacy schema changer where comments were not dropped together with the database.
  • The round(decimal ) built-in no longer returns negative 0 for any input.
  • Added an estimate for the number of request units consumed by a query to the output of for tenant sessions.
  • Enabled forward indexes on arrays.
  • Users can now manually create partial single-column statistics at the extreme values on columns that are prefixes of their index. The output of now includes a column indicating the partial predicate for a partial statistic, or NULL for a full statistic.
  • A new SQL statement SHOW COMMIT TIMESTAMP has been added. This statement can be used to retrieve the commit timestamp of the current explicit transaction, current multi-statement implicit transaction, or previous transaction. The statement may be used in a variety of settings to maximize its utility in the face of connection pooling. When used as a part of an explicit transaction, the statement implicitly commits the transaction internally before being able to return a causality token.
  • Added support for the pg_blocking_pids built-in . It is hardcoded to return an empty array because CockroachDB has no equivalent concept of PIDs as in PostgreSQL.
  • Added a list of indexes used by the query on the statistics column on the system.statement_statistics and crdb_internal.statement_statistics tables. The format is tableID@indexID.
  • Added a list of used indexes (with the format tableID@indexID ) to the sampled query telemetry log.
  • A new NumericStat, idleLat, was introduced to the statistics column of crdb_internal.transaction_statistics. It reports the time spent waiting for the client to send statements while holding a transaction open.
  • Added an in-memory-only evaluation of tsvector and tsquery datatypes and the @@ matches operator.
  • Implemented the statement in the .
  • to_char now has caching for parse formats, marking a speedup when running to_char with the same format between sessions.
  • Casts from index name to REGCLASS are now supported. Previously, only table names could be cast to REGCLASS.
  • Added user-defined composite column types.
  • SQL queries running on remote nodes now show up in CPU profiles with distsql.* labels. Currently this includes appname, gateway, txn, and stmt.
  • CockroachDB now permits non-indexed storage of tsvector and tsquery datatypes
  • Implemented the parse_ident built-in , which splits a qualified identifier into an array of identifiers, removing any quoting of individual identifiers. By default, extra characters after the last identifier are considered an error; but if the second parameter is false, then such extra characters are ignored.

Operational changes

  • Reduced the length of the raft.process.handleready.latency metric help text to avoid it being rejected by certain Prometheus services.
  • Logs produced by increasing the vmodule setting for s3_storage are now directed to the DEV channel rather than STDOUT.
  • Added observability for when load-based splitting cannot find a key to indicate the reasons why the load splitter could not find a split key, which provides more insight into why a range is not splitting easier.
  • Added five new fields to the sampled_query telemetry events:
    • ScanCount: Number of scans in the query plan.
    • ScanWithStatsCount: Number of scans using statistics (including forecasted statistics) in the query plan.
    • ScanWithStatsForecastCount: Number of scans using forecasted statistics in the query plan.
    • TotalScanRowsWithoutForecastsEstimate: Total number of rows read by all scans in the query, as estimated by the optimizer without using forecasts.
    • NanosSinceStatsForecasted: The greatest quantity of nanoseconds that have passed since the forecast time (or until the forecast time, if it is in the future, in which case it will be negative) for any table with forecasted stats scanned by this query.
  • Added a new debug tool to allow for decrypting files in a store using . This tool is intended for use while debugging, or for providing debug artifacts to Cockroach Labs to aid with support investigations. It is intended to be run “in-situ” (i.e., on site), as it prevents having to move sensitive key material.
  • Added a new command that can be used by an operator to list the files present in the file registry.
  • Release version binaries can now be instructed via the enviroment variable COCKROACH_FORCE_DEV_VERSION to override their cluster version support to match that of development builds, which can allow a release binary to be started in a cluster that is run (or has previously run) a development build.
  • The consistency check failure message is now more informative, and suggests a few actions that operators should perform in the unlikely event a failure occurs.
  • Updated metric descriptions of rebalancing.* to include the recording period.
  • CockroachDB now prioritizes non-voters in voter additions, meaning that when selecting a store to add a voter on (in the allocator), CockroachDB will prioritize candidate stores that contain a non-voter replica higher. This reduces the number of snapshots that need to be sent over the WAN.
  • CockroachDB now uses response data rather than just the request span in the to pass more accurate data about the keys iterated over to the load splitter to find a suitable split key, enabling the load splitter to find a split key under heavy range query workloads.
  • Added the replicas.leaders_invalid_lease metric, which indicates how many replicas are Raft group leaders but holding invalid leases.
  • The server.web_session.purge.period and server.web_session.purge.max_deletions_per_cycle, which were specific to the cleanup function for system.web_sessions, have been replaced by server.log_gc.period and server.log_gc.max_deletions_per_cycle which apply to the cleanup function for system.eventlog, system.rangelog and system.web_sessions equally.
  • The server.web_session.auto_logout.timeout has been removed.
  • Splunk dashboard templates are available in the public repository under /monitoring/splunk-dashboard/.
  • The network timeout for RPC connections between cluster nodes has been reduced from 3 seconds to 2 seconds, with a connection timeout of 4 seconds, in order to reduce unavailability and tail latencies during infrastructure outages. This can now be changed by setting the COCKROACH_NETWORK_TIMEOUT environment variable, which defaults to 2s.
  • The Raft election timeout has been reduced from 3 seconds to 2 seconds, and the lease interval from 9 seconds to 6 seconds, with a corresponding reduction in the node heartbeat interval from 4.5 seconds to 3 seconds. This reduces the period of unavailability following leaseholder loss, but places tighter restrictions on network latencies (no more than 500ms roundtrip time). This can be adjusted by setting the COCKROACH_RAFT_ELECTION_TIMEOUT_TICKS environment variable, which now defaults to 10 and will scale all of these intervals proportionally.
  • The RPC heartbeat and gRPC keepalive ping intervals have been reduced to 1 second to detect failures faster. This is adjustable via the new COCKROACH_PING_INTERVAL environment variable. The timeouts remain unchanged.

Command-line changes

  • The interactive now retains a maximum of 1000 entries. There was no limit previously.
  • The deprecated CLI command debug unsafe-remove-dead-replicas has been removed. Use debug recover instead.
  • The \df metacommand was added to the , which will list all in the current database.
  • In the , you can now enable --splits with the --sequential flag and adjust splitting to uniformly partition the keyspace.
  • Added the --insert-count flag to insert rows before the begins.
  • CockroachDB will now include recommended remediation actions alongside log messages for some errors.
  • The input syntax of \set is now more flexible: it is now more accepting of space characters in various positions of the syntax and it supports quoted values, e.g., via \set prompt1 "a b c".
  • will now start up more quickly. The latency that will be injected will not be injected until after the initial cluster is set up internally.
  • The engine used as line editor in the interactive shell ( and ) has been updated. It includes numerous bug fixes and new features. The previous engine can still be accessed by setting the COCKROACH_SQL_FORCE_LIBEDIT environment variable to true. This support will be removed in a later version.
  • The interactive now supports an advanced debug mode for troubleshooting when --debug-sql-cli is specified on the command line. The debug mode can be enabled with Ctrl+@ or Ctrl+_ (Ctrl+space on macOS).
  • The following fields have been redacted and were added to the redacted debug zip:
    • crdb_internal.create_statements:
      • create_statement
        • create_nofks
      • alter_statements (each element is redacted)
    • crdb_internal.create_function_statements:
      • c reate_statement
    • crdb_internal.{node,cluster}_distsql_flows:
      • stmt
    • crdb_internal.{cluster,node}_sessions:
      • last_active
      • active_queries
    • crdb_internal.{cluster,node}_queries:
      • query
  • The interactive now supports a rudimentary form of tab completion to input the name of SQL objects and functions.
  • The command-line flag --empty to is not marked as deprecated anymore; it is more convenient than --no-example-database. However, the latter remains supported as an alias.
  • The command-line flags --logtostderr, --log-file-verbosity, --no-color, --redactable-logs, --log-file-max-size, --log-group-max-size, --log-dir, --sql-audit-dir are not marked as deprecated anymore; instead, they are defined as convenience aliases for various --log specifications.
  • now supports --pid-file for symmetry with .
  • The debug utility script hot-ranges.sh partitions output by statistics: queries_per_second, writes_per_second, read_bytes_per_second, write_bytes_per_second. It also decreased the number of ranges shown under each heading from 20 to 10.

DB Console changes

  • The High Contention Time insight description now accurately reflects the event’s contention duration in the .
  • Overview and Explain Plan tabs were added to the Active Statement Details page.
  • The Apply button was added on the Table Details page ( only) when there is a recommendation to drop an unused index.
  • Overview and Explain Plan tabs were added to the Statement Insight Details page.
  • The now includes a column picker.
  • The fingerprint ID values for statements and transactions on the pages are links that open the respective details page on the time period of the execution of that statement or transaction.
  • Requests to fetch table and database statistics now have limited concurrency. This may make loading the page slower, but in return should result in making those pages less disruptive.
  • The Transaction filter label on the SQL Activity page was fixed.
  • The metric graph tooltip styling was fixed to prevent content collapse.
  • Index recommendations were added to the Statement Active Execution Details page, and the plan gist was added as the first line of the explain plan.
  • Transaction insights pages now show insights about slow execution with unknown causes, index recommendations, and failed executions. The following fields have also been added on the Details page, but are not available for transactions where the insight is “High Contention” (i.e., user name, session ID, rows processed, rows read, rows written, retries, last retry reason, full scan, and transaction priority).
  • The fingerprint ID in hex format was added to the Statement Details page and Transaction Details page.
  • The contention time, schema, database, table, and index info was added to the Insights Statement Details page.
  • The query column in the insight recommendations table was removed. Instead, the statement is included in the description if the transaction being reported has multiple statements.
  • Graphs on the Metrics page now downsample using max value instead of average. Previously, zooming out on a graph would cause any spikes in the graph to smooth out, potentially hiding anomalies. These anomalies are now visible even when looking at a zoomed out interval.
  • The Statement Execution and Planning Time chart on the Statement Fingerprint page now includes a third value (“Idle”) representing the time spent by the application waiting to execute this statement while holding a transaction open.
  • A list of used index per explain plan was added, under the Explain Plan tab on the Statement Details page, with links to the table or index details pages.
  • The pages in the now show the seconds and milliseconds for all timestamp values.
  • Links were added on the fingerprint ID in the High Contention table on the Transaction Insights Details page.
  • The following new charts were added to the Metrics page, under SQL view: Service Latency: SQL Statements, 99.9th percentile and Service Latency: SQL Statements, 99.99th percentile.
  • Renamed the chart on the Statement Details page from Statement Execution and Planning Time to Statement Times.
  • The Transaction resource usage card on the Transaction Fingerprin t page now includes an “Idle latency” row, representing the time spent by the application performing other work while holding this transaction open.
  • The Databases table page now displays all the grants in a single row per user.
  • Added a goroutine scheduling latency graph to the Overload dashboard in the DB Console. It shows what the per-node p99 scheduling latency is for goroutines.
  • CockroachDB now prevents polling /settings, /nodes_ui, and /cluster endpoints on incorrect login.
  • The Statement and Transaction pages for tenant clusters gained region columns and filters for multi-region tenants.

Bug fixes

  • The flag --sql-advertise-addr now properly works even when the SQL and RPC ports are shared (because --sql-addr was not specified). Note that this port sharing is a deprecated feature in v22.2.
  • Fixed a bug introduced in v21.2 that could cause an internal error in rare cases when a query required a constrained index scan to return results in order.
  • Fixed a bug that existed from before v21.1 that could cause an internal error when executing a query with a limit ordering on the output of a window function.
  • Fixed an incorrect default value of cloudstorage.gs.chunking.retry_timeout to 60 seconds
  • Fixed a bug in pg_catalog tables that could result in an internal error if a schema is concurrently dropped.
  • Fixed a bug that caused ALTER CHANGEFEED to fail if the changefeed was created with a cursor option and had been running for more than gc.ttlseconds.
  • Fixed a bug that could cause a panic when running a query with EXPLAIN that attempts to order on a non-output column.
  • Fixed missing automatic statistics collection at cluster startup when the sql.stats.automatic_collection.enabled cluster setting is false, but there are tables with the storage parameter sql_stats_automatic_collection_enabled set to true.
  • Fixes an issue where when a statement bundle was collected for a query that results in an error due to a statement_timeout, the bundle would not be saved.
  • CockroachDB now excludes check constraints of hash-shared indexes from being invalidated when executing IMPORT INTO.
  • CockroachDB now flushes WAL when writing storage checkpoints on consistency checker failures.
  • Fixed optimizer selectivity and cost estimates of zigzag joins in order to prevent query plans from using it when it would perform poorly (e.g., when many rows are qualified).
  • Changefeeds will now never permanently error on a “failed to send RPC” error.
  • Fixed a bug that could occur when dropping a role that owned two schemas with the same name in different databases. The bug was introduced in v22.1.0.
  • CockroachDB now avoids a source of internal connectivity problems that would resolve after restarting the affected node.
  • CockroachDB now shows the correct value on table stats on UI, when there are no values to show.
  • Charts on the Statement Details page in the DB Console are no longer overlapping.
  • It is now possible to create tables, views, columns, etc. with the name nothing (e.g., CREATE TABLE nothing... ) without having to quote the name, like in PostgreSQL. This bug was introduced in CockroachDB v2.0.
  • Fixed detection and erroring out of queries using locality-optimized joins when the session setting enforce_home_region is true and the input table to the join has no home region or its home region does not match the gateway region.
  • Fixed an issue with the enforce_home_region session setting which may cause SHOW CREATE TABLE or other non-DML statements to error out if the optimizer plan for the statement involves accessing a multi-region table.
  • Fixed a bug in changefeed.batch_reduction_retry which resulted in only a single level of retry being able to occur.
  • During JWT based auth, CockroachDB now infers the algorithm type if it is not specified by the JWKS. This enables support for a wider range of keys.
  • Fixed an extremely rare out of bounds crash in the protected timestamp subsystem.
  • Fixed the calculation of the pg_attribute.attnum column for indexes so that the attnum is always based on the order the column appears in the index. Also fixed the pg_attribute table so that it includes stored columns in secondary indexes.
  • Fixed a bug in the DB Console where when the height of the filter was big, you had to scroll to get to the Apply button.
  • Fixed a bug in the DB Console to now send the proper start and end values to the endpoint used on the SQL Activity page so it returns the full hour as described on the UI.
  • Fixed a rare bug where concurrent follower read/split operations could lead to invalid read results.
  • Fixed a bug that could cause UPDATE.. FROM clauses to update the same row multiple times, resulting in incorrect UPDATED row counts and duplicate output rows for statements with a RETURNING clause. The bug only appeared when the target table had a hidden primary key column (e.g., an implicit rowid primary key column). The bug has been present since support for UPDATE.. FROM was added in v19.0.
  • Protected timestamps are now created during index validation. Before, index validation could be starved if it took longer than any GC jobs for a given table.
  • Fixed a bug where SELECT * operations on tables with virtual computed columns undergoing schema changes could potentially fail.
  • Fixed a bug where in large, multi-region clusters it was possible for the leasing mechanism used for jobs to get caught in a live-lock scenario whereby jobs could not be adopted.
  • CockroachDB now ensures changefeeds shut down when one of the aggregator nodes returns an error.
  • Fixed a bug the occurred when attempting to reduce the size of a fixed-size VARCHAR column.
  • Fixed a bug that caused ranges to remain without a leaseholder in cases of asymmetric network partitions.
  • Fixed a bug that would prevent data from a failed restore from being cleaned up quickly.
  • Fixed a bug which, in rare cases, could result in a changefeed missing rows which occur around the time of a split in writing transactions which take longer than the closed timestamp target duration (defaults to 3s).
  • Fixed a bug where point lookups on the pg_catalog.pg_type table would fail to find the implicit record type that gets created for tables in the pg_catalog, information_schema, and crdb_internal schemas.
  • Fixed a bug that prevented the usage of implicit record types for tables in the pg_catalog, information_schema, and crdb_internal schemas.
  • Fixed a bug that could result in transient errors when dropping a database and immediately recreating a database with the same name and connecting to it for use.
  • Fixes a bug that resulted in the regions listed for databases and tables including an incorrect list of regions due to the logic including information about tables which are adjacent in the keyspace.
  • Fixed a bug where the experimental scrub command did not handle type descriptors in the database.
  • Fixed a panic that could occur when calling st_distancespheroid or st_distancesphere with a spatial object containing an NaN coordinate. This now produces an error, with the message “input is out of range”.
  • Fixed a bug that could result in infrequent progress updates for very large backup or restore jobs.
  • Added leading zeros to fingerprint IDs with less than 16 characters.
  • Fixed a bug causing changefeeds to fail when a value is deleted while running on a non-primary column family with multiple columns.
  • Fixed a bug that existed since before v21.1 where the cgroup memory limit was undetected when using systemd.
  • Fixed a bug that existed since v20.2 that could cause incorrect results in rare cases for queries with inner joins and left joins.
  • Fixed an unhandled error that could happen if ALTER DEFAULT PRIVILEGES was run on the system database.
  • CockroachDB now prevents schema changes on the crdb_internal_expiration table.
  • When configured to true, the sql.metrics.statement_details.dump_to_logs cluster setting no longer causes a mutex deadlock.
  • Fixed a bug that could lead to errors when running multiple schema change statements in a single command using a driver that uses the extended pgwire protocol internally (for example the Npgsql C# driver). The error messages was “attempted to update job for mutation 2, but job already exists with mutation 1”.
  • Fixed the Statement Activity page so that it no longer shows multi-statement implicit transactions as “explicit.”
  • Server crashes that occur during startup are now more clearly reported in logs and the standard error output.
  • Fixed incorrect cancellation logic when attempting to detect stuck rangefeeds.
  • Fixed an internal error when comparing a tuple type with a non-tuple type.
  • Fixed incorrect selectivity estimation for queries with OR predicates all referencing a common single table.
  • Added sort setting to tables on the Transaction and Statement Insights Details pages.
  • Fixed an issue where changefeed.emitted_messages would be increased twice per message for changefeed cloud storage sinks.
  • Fixed a bug where attidentity in pg_attribute for the GENERATED BY DEFAULT AS IDENTITY column should be d.
  • CockroachDB previously could incorrectly evaluate queries that performed left semi and left anti “virtual lookup” joins on tables in pg_catalog or information_schema. These join types can be planned when a subquery is used inside of a filter condition. The bug was introduced in v20.2.0 and is now fixed.
  • Fixed a link to index details on the Drop Index Insights in the Cloud Console.
  • Fixed a bug where encoding of ARRAY type to Parquet format would fail in some cases during the EXPORT command.
  • Fixed a rare panic only present in v22.2.0 that occurs when using particular forms of existing statistics in table statistics forecasting.
  • In the presence of several backup files, CockroachDB now speeds up slow listing calls that could manifest as restore queries hanging during execution.
  • Prepared statements that use type hints can now succeed type-checking in more cases when the placeholder type is ambiguous.
  • Fixed a bug where glob patterns that matched no tables in GRANT or REVOKE statements would return an internal error with a confusing message as opposed to the appropriate “no objects matched” error.
  • Fixed a bug where empty COPY commands would not escape after an EOF character or error if encountering a \. with no input.
  • Fixed a bug where in PostgreSQL extended protocol mode it was possible for auto-commits to not execute certain logic for DDL, when certain DML (insert/update/delete) and DDL were combined in an implicit transaction.
  • Fixed the pg_table_is_visible built-in function so it correctly reports visibility of indexes based on the current search_path.
  • Fixed a bug that would result in incomplete backups when non-default, non-public resource limiting settings ( kv.bulk_sst.max_request_time or admission.elastic_cpu.enabled ) were enabled.
  • The pg_function_is_visible function now correctly reports visibility based on the functions that are visible on the current search_path.
  • Fixed a rare bug that could cause upgrades from v22.1 to v22.2 to fail if the job coordinator node crashes in the middle of a specific upgrade migration.
  • Fixed a bug for queries with disjunctions (i.e., contains OR ) where all the columns referenced in the disjunctions are known to have a single value.
  • Fixed a bug introduced in v22.1.0 in which the non-default nulls ordering, NULLS LAST, was ignored in window and aggregate functions. This bug would cause incorrect query results when NULLS LAST was used.
  • Fixed a bug that caused an internal error when trying to execute a UDF with an empty function body. This bug was present since UDFs were introduced in v22.2.0.
  • Fixed an issue where DISTINCT ON queries would fail with the error “SELECT DISTINCT ON expressions must match initial ORDER BY expressions” when the query included an ORDER BY clause containing ASC NULLS LAST or DESC NULLS FIRST.
  • Fixed a bug where selecting a small timeframe in the past in a timeseries query resulted in no data in the graphs.
  • Fixed a bug where CockroachDB would error when receiving Geometry/Geography using binary parameters.
  • Fixed an internal error that could occur when comparing a column of type void to NULL using col IS NULL or col IS NOT NULL.
  • Fixed a bug where a query would incorrectly pass if a given interval for AS OF SYSTEM TIME interval was a small positive duration.

Performance improvements

  • The will now plan scans for queries with JSON subscripting filters, like json_col['field'] = '"value".
  • CockroachDB now avoids wasteful contention on the gossip mutex caused by checking if the network needs tightening hundreds of times per second.
  • Some types of queries with comparisons with constant values now execute faster.
  • The now explores plans with a single expressions in rare cases where it previously planned two lookup join expressions.
  • Consistency checks are now properly cancelled on timeout, preventing them from piling up.
  • Raft ticks now adapt to scheduling delays. This helps preventing re-elections, and the corresponding performance effects, in the event of relatively short (sub-second) processing delays.
  • HTTP requests with Accept-encoding: gzip previously resulted in valid GZIP-encoded, but uncompressed, responses. This resulted in inefficient HTTP transfer times, as far more bytes were transferred than necessary. Those responses are now properly compressed, resulting in smaller network responses.
  • pg_catalog.col_description is now much faster when resolving columns for tables in the pg_catalog, crdb_internal, or information_schema namespaces.
  • The now does less copying of histograms while planning queries, which will reduce memory pressure a little.
  • Added early inlining of VALUES clauses and unnested arrays in WITH queries in order to eliminate unnecessary joins.
  • Added significantly faster JSON parsing, which should help with any workloads that insert large amounts of JSON data, including workloads.
  • Loading the Database Details page in the DB Console is now somewhat less expensive when there are a large number of databases and a large number of tables in each database and a large number of ranges in the cluster.
  • Tables in pg_catalog and information_schema (when not explicitly referenced as "".information_schema ) may now be much faster if the current database has a small number of relations relative to the total number in the cluster.
  • The overhead of running and EXPLAIN ANALYZE (DISTSQL) has been significantly reduced. The overhead of EXPLAIN ANALYZE (DEBUG) did not change.
  • Enabled more efficient by deriving new join constraints when equijoin predicates exist on the column(s) of a unique constraint on one table which are a proper subset of the referencing columns of a foreign key constraint on the other table. If an index exists on those foreign key constraint referencing columns, equijoin predicates are derived between the primary key and foreign key columns not currently bound by ON clause predicates.
  • The setup of the distributed query execution is now fully parallelized which should reduce the query latencies, especially in multi-region setups.
  • Performance of the LIKE and ILIKE operators using patterns without any wildcards has been improved.
  • The can now better calculate the properties of recursive in the presence of a LIMIT.
  • Certain types of reads will now have a far smaller contention footprint with conflicting concurrent writers.
  • In some cases, the key-value store client now needs to look up where to send requests. Prior to this change, such lookup requests were always routed to the leaseholder of the metadata range storing that information. Now the client can attempt to look up this metadata from followers. This can improve tail latency in multi-region clusters in cases where the range addressing cache is cold.
  • The garbage collection score triggering a MVCC GC run has been lowered. The GC Score is a ratio computed from MVCC stats and uses the ratio of live objects and estimated garbage age to estimate collectability of existing data. The reduced score will trigger garbage collection earlier, lowering the interval between runs 3 times, giving 2 times reduced peak garbage usage at the expense of 30% increase of wasteful data scanning on constantly updated data.
  • CockroachDB in some cases now correctly incorporates the value of the OFFSET clause when determining the number of rows that need to be read when the LIMIT clause is also present. Note that there was no correctness issue here, only that extra unnecessary rows could be read.
  • In 22.2, privileges on virtual tables (system catalogs like pg_catalog, information_schema, and crdb_internal ) were introduced. A problem with this new feature is that we now must fetch those privileges into a cache before we can use those tables or determine their visibility in other system catalogs. This process used to occur on-demand, when the privilege was needed. Now, CockroachDB will fetch these privileges eagerly during startup to mitigate latency when accessing pg_catalog right after the server boots up.

Contributors

This release includes 1655 merged PRs by 101 authors. We would like to thank the following contributors from the CockroachDB community:
  • Alex (first-time contributor)
  • Ambuj Kumar (first-time contributor)
  • Faizaan Madhani (first-time contributor)
  • GirishV (first-time contributor)
  • Klaus Rettinghaus (first-time contributor)
  • Vivian Kong (first-time contributor)
  • e-mbrown
  • likzn
  • nnaka2992
  • quanuw (first-time contributor)
  • rharding6373
  • shralex