CockroachDB v23.1 (LTS) is a required Regular Release.
Refer to Major release types before installing or upgrading for release timing and support details. To learn what’s new in this release, refer to its Feature Highlights.
On this page, you can read about changes and find downloads for all production and testing releases of CockroachDB v23.1 (LTS)
For key feature enhancements in v23.1 and other upgrade considerations, refer to the notes for v23.1.0.
For details about release types, naming, and licensing, refer to the Releases page.
Be sure to also review the Release Support Policy.
After downloading a supported CockroachDB binary, learn how to install CockroachDB or upgrade your cluster.
Get future release notes emailed to you:
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.28.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.28.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.28.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.28.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.28.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.28.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.28.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.28.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.28
Source tag
To view or download the source code for CockroachDB v23.1.28 on Github, visit v23.1.28 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.27...v23.1.28
Security changes
SHOW JOBS
and its variantsSHOW CHANGEFEED JOB
andSHOW CHANGEFEED JOBS
no longer expose user sensitive information likeclient_key
. #129910
General changes
Operational changes
- Added the
ranges.decommissioning
metric that represents the number of ranges which have a replica on a decommissioning node. #130254
DB Console changes
- DB Console will show an alert message when the license is expired or there are less than 15 days left before it expires. #130439
- DB Console will show a notification alerting customers without an Enterprise license to upcoming license changes with a link to more information. #130439
Bug fixes
- Fixed a bug where the
schema_locked
table parameter did not prevent a table from being referenced by a foreign key. #129752 - Fixed a bug where the
require_explicit_primary_keys
session variable would overly aggressively prevent allCREATE TABLE
statements from working. #129905 - 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. #130124 - 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. #130623 - Fixed a potential memory leak in changefeeds using a cloud storage sink. The memory leak could occur if both
changefeed.fast_gzip.enabled
andchangefeed.cloudstorage.async_flush.enabled
aretrue
and the changefeed received an error while attempting to write to the cloud storage sink. #130613
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.27.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.27.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.27.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.27.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.27.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.27.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.27.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.27.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.27
Source tag
To view or download the source code for CockroachDB v23.1.27 on Github, visit v23.1.27 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.26...v23.1.27
Bug fixes
- 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. #131679
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.26.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.26.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.26.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.26.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.26.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.26.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.26.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.26.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.26
Source tag
To view or download the source code for CockroachDB v23.1.26 on Github, visit v23.1.26 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.25...v23.1.26
Security updates
For clusters using Cluster SSO using JSON Web Tokens (JWTs), the cluster setting
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:- A string that contains a single valid issuer URI. Example:
https://accounts.google.com
- A string that contains a JSON array of valid issuer URIs. Example:
['example.com/adfs','https://accounts.google.com']
- 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, whenJWKSAutoFetchEnabled
is set, the JWKS URI is fetched from the issuer'swell-known/
endpoint. #128669- A string that contains a single valid issuer URI. Example:
Operational changes
- New structured logging events 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 byserver.shutdown.connections.timeout
expires.node_shutdown_transaction_timeout
: Logged if there are still open transactions on those open client connections after the timeout defined byserver.shutdown.transactions.timeout
expires. #128709
Bug fixes
Fixed a bug introduced in v23.1 in which output of
EXPLAIN (OPT, REDACT)
of the followingCREATE
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 computed columns in rare cases when the virtual column expression's type did not match the type of the virtual column. #129008
Fixed a bug where errors like
ERROR: column 'crdb_internal_idx_expr' does not exist
could be logged when accessing a table with an expression index where the expression evaluates to anENUM
type. Example:CREATE INDEX ON t ((col::an_enum))
#129091Fixed a bug introduced in v23.1 where a user-defined function's return type's parameters could not be named when dropping a user-defined function or procedure. #115906
Fixed a slow-building memory leak when a cluster uses GSSAPI Kerberos authentication. #130320
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.25.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.25.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.25.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.25.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.25.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.25.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.25.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.25.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.25
Source tag
To view or download the source code for CockroachDB v23.1.25 on Github, visit v23.1.25 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.24...v23.1.25
Security updates
Secrets are now sanitized from URLs before being written to unredacted logs when used in the following SQL statements:
The cluster setting
server.jwt_authentication.issuers
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 whereserver.jwt_authentication.jwks_auto_fetch.enabled
is set CockroachDB obtains the JWKS URI first from the issuer's well-known endpoint and then uses this endpoint. #128751- Simple string that Go can parse as a valid issuer URL:
SQL language changes
- Added the
sql.auth.grant_option_inheritance.enabled
cluster setting. The default value istrue
, which results in behavior that matches the existing behavior of CockroachDB. When set tofalse
, theGRANT OPTION
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. #126862 - Added the
sql.auth.grant_option_for_owner.enabled
cluster setting. The default value istrue
, which results in behavior that matches the existing behavior of CockroachDB. When set tofalse
, then theGRANT OPTION
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. #127005
DB Console changes
- The Database details and Table details pages in the DB Console now display the correct
"stats last created"
value. #126415 - The Database and Tables pages in the DB Console will show a loading state while loading information for databases and tables including size and range counts. #127699
- In the Database details page, the table name will no longer appear with quotes around the schema and table name. #127763
ALTER ROLE
events in the DB Console event log now render correctly when the event does not contain any role options. #126563- Fixed a bug where the Databases page crashed if the range information was not available. #127090
Bug fixes
- Fixed a bug in which the
DISCARD
statement was disallowed withdefault_transaction_read_only = on
. #127549 - Fixed a bug where
ALTER DATABASE ... DROP REGION
could fail if any tables under the given database have indexes on expressions. #126600 - Fixed a bug when restoring a database with a composite type. #126847
- Fixed a bug when inputting
public
role as user name for built-in compatibility functions, such ashas_database_privilege
andhas_schema_privilege
. #126853 - Fixed a bug where CockroachDB could incorrectly evaluate an
IS NOT NULL
filter if it was applied to non-NULL
tuples that hadNULL
elements, such as(1, NULL)
or(NULL, NULL)
. This bug has existed since v20.2. #126942 - Fixed a bug where
CREATE TABLE
with index expressions could hit undefined column errors on transaction retries. #126200 - Fixed a bug that caused a memory leak when executing SQL statements with comments, for example,
SELECT /* comment */ 1;
. Memory owned by a SQL session would continue to grow as these types of statements were executed. The memory would only be released when closing the SQL session. This bug has been present since v23.1. #127757 - Fixed a bug where
CREATE INDEX IF NOT EXISTS
would not correctly short-circuit if the given index already existed. #128239 - Fixed a bug in syntax validation, in which the
DESCENDING
clause was not allowed for non-terminal columns of an inverted index. Only the last column of an inverted index should be prevented from beingDESCENDING
. This is now properly checked. #128239 - Fixed a bug where an index could store a column in the primary index if that column had a mixed-case name. #128239
- Fixed a memory leak that could occur when specifying a non-existent virtual cluster name in the connection string. #128110
- Setting or dropping a default value on a computed column is now blocked, even for
NULL
defaults. Previously, setting or dropping a default value on a computed column was a no-op. #128468
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.24.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.24.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.24.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.24.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.24.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.24.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.24.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.24.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.24
Source tag
To view or download the source code for CockroachDB v23.1.24 on Github, visit v23.1.24 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.23...v23.1.24
Enterprise edition changes
ALTER CHANGEFEED
no longer removes the CDC query when modifying changefeed properties. #125436
Operational changes
- Improved disk usage metric reporting over volumes that dynamically change their size over the life of the
cockroach
process. #125106 - Removed
crdb_internal.cluster_execution_insights.txt
andcrdb_internal.cluster_txn_execution_insights.txt
from thedebug zip
. These files contained cluster-wide insights for statements and transactions. Users can still rely on the per-node execution insights incrdb_internal.node_execution_insights.txt
andcrdb_internal.node_txn_execution_insights.txt
. #125810 - 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. #126102
Bug fixes
- Fixed handling in the declarative schema changer when columns are included in the
STORING()
clause ofCREATE INDEX
. 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 hasUTF-8
characters. #125208 - Fixed a bug where a change to a user-defined type (UDT) could cause queries against tables using that type to fail with an error 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
](/docs/v23.1/alter-type.html statement or indirectly from anALTER DATABASE ... ADD REGION
orALTER DATABASE ... DROP REGION
statement, which implicitly modifies thecrdb_internal_region
UDT. This bug had existed since UDTs were introduced in v20.2. #124855 - Fixed an issue where adding a column with a default value of an empty array would not succeed. #125328
ALTER TABLE ... ADD CONSTRAINT UNIQUE
will now fail with a well-formed error message and code42601
if a statement tries to add a unique constraint on an expression. #125420- Fixed a bug in v24.1, v23.2, and v23.1 where using
changefeed.aggregator.flush_jitter
withmin_checkpoint_frequency
set to zero could cause panics. #125495 - Fixed a bug in which constant
LIKE
patterns containing certain sequences of backslashes did not become constrained scans. This bug has been present since v21.1.13 when support for building constrained scans fromLIKE
patterns containing backslashes was added. #125537 - 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. #123513 - Fixed the statistics estimation code in the optimizer 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. #126158
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.23.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.23.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.23.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.23.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.23.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.23.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.23.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.23.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.23
Source tag
To view or download the source code for CockroachDB v23.1.23 on Github, visit v23.1.23 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.22...v23.1.23
Enterprise edition changes
- Fixed a bug that was present since v22.2 where changefeeds with long-running initial scans might incorrectly restore checkpoint job progress and drop events during changefeed restarts due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
- The cluster settings
changefeed.frontier_checkpoint_frequency
andchangefeed.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). #123970 #124759
- The cluster settings
- Introduced the
changefeed.random_replica_selection.enabled
cluster setting that changes the behavior of changefeed planning work distribution. Whenchangefeed.random_replica_selection.enabled
is set totrue
, changefeeds will evenly distribute their work across all replicas, including followers, regardless of leaseholder placement.changefeed.random_replica_selection.enabled
is disabled by default. #124930
SQL language changes
- Introduced three new cluster settings for controlling table statistics forecasting:
sql.stats.forecasts.min_observations
is the minimum number of observed statistics required to produce a forecast.sql.stats.forecasts.min_goodness_of_fit
is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.sql.stats.forecasts.max_decrease
is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation. #124076
- Added a new session setting
optimizer_use_improved_multi_column_selectivity_estimate
, which if enabled, causes the optimizer to use an improved selectivity estimate for multi-column predicates. This setting will default totrue
on v24.2 and later, andfalse
on earlier versions. #124076 - The row-level TTL setting
ttl_delete_rate_limit
is now set to100
by default, which sets the rate limit for deleting expired rows to100
. #124362 - CockroachDB no longer limits precision when converting spatial data types to JSON. #124534
Operational changes
- - The
client_authentication_ok
andclient_session_end
events are now logged to theSESSIONS
log channel unconditionally. Previously, these would only be logged if theserver.auth_log.sql_sessions.enabled
cluster setting was set totrue
. All otherSESSIONS
log messages are still only logged ifserver.auth_log.sql_sessions.enabled
orserver.auth_log.sql_connections.enabled
are set totrue
. To not showclient_authentication_ok
andclient_session_end
events, disable theSESSIONS
log channel entirely. #124375
DB Console changes
- Viewing the SQL Activity sorted by
% of Runtime
now correctly sorts entries by the runtime amount. #123899 - The DB Console favicon and other image files now render properly. #122702
Bug fixes
- Fixed a bug where a failed restore job could leave the system in a state where re-attempting the restore was not possible without manual intervention. #123462
- Index recommendations in the DB Console will now function properly for indexes on tables or columns whose names contain quotation marks or whitespace. For example:
CREATE INDEX ON "my table" ("my col");
. #122117 - Fixed a bug introduced in v23.1 where client certificate authentication combined with identity maps (
server.identity_map.configuration
) did not work. For the feature to work correctly, the client must specify a valid database user in the connection string. #124076 - Statistics forecasts of zero rows can cause suboptimal query plans. Forecasting will now avoid predicting zero rows for most downward-trending statistics. #124076
- Fixed a bug where
DROP ROLE
andDROP USER
could leave references behind insideTYPE
s, which could preventSHOW GRANTS
from working. #124645 - 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. #124500
- Fixed a bug where, if the
ttl_row_stats_poll_interval
storage parameter was non-zero for a table with row-level TTL enabled, the queries issued to update row statistics could block the job from completing. Now, if the job completes, these statistics queries are cancelled. This means that thejobs.row_level_ttl.total_rows
andjobs.row_level_ttl.total_expired_rows
metrics will report0
if the job finishes before the row stats queries complete. #124625 - Fixed a bug where the
results_buffer_size
session variable could not be configured by using the "options" query parameter in the connection string, but only as a top-level query parameter. Now,results_buffer_size
can be configured in either part of the connection string. This variable still cannot be changed with theSET
command after the session begins. #124773 SHOW TYPES
now includes user-defined composite types.SHOW TYPES
previously omitted composite types, which were added in v23.1.0. #124815- Fixed a bug where a change to a user-defined type 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 anALTER TYPE
statement, or indirectly from anALTER DATABASE ADD REGION
orDROP REGION
statement (which implicitly change thecrdb_internal_region
type). This bug was present since user-defined types were introduced in v20.2. #125473
Performance improvements
- More efficient query plans are now generated for queries with text similarity filters, for example,
text_col % 'foobar'
. These plans are generated if theoptimizer_use_trigram_similarity_optimization
session setting is enabled. It is disabled by default. #124076 - Added a new session setting
optimizer_use_improved_zigzag_join_costing
. When enabled and when the cluster settingenable_zigzag_join
is also enabled, the cost of zigzag joins is updated such that a zigzag join will be chosen over a scan only if it produces fewer rows than a scan. #124076 - Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the optimizer from choosing a suboptimal query plan due to over-estimating the selectivity of a multi-column predicate. #124076
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.22.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.22.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.22.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.22.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.22.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.22.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.22.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.22.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.22
Source tag
To view or download the source code for CockroachDB v23.1.22 on Github, visit v23.1.22 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.21...v23.1.22
Enterprise edition changes
- Fixed a bug that was present since v22.2 where changefeeds with long-running initial scans might incorrectly restore checkpoint job progress and drop events during changefeed restarts due to transient errors or node restarts. The bug was most likely to occur in clusters with the following contributing factors:
- The
changefeed.shutdown_checkpoint.enabled
cluster setting was enabled. - The cluster settings
changefeed.frontier_checkpoint_frequency
andlow changefeed.frontier_highwater_lag_checkpoint_threshold
were set low, which resulted in the initial scan taking many multiples of the configured frequency to complete. - There were multiple target tables with significant differences in row counts in one changefeed.
- The changefeed target tables were large with many ranges.
- The initial scan took a long time to complete (an hour or longer). #124454
- The
SQL language changes
- Updated the
SHOW GRANTS
responses to display theobject_type
andobject_name
, which has replaced therelation_name
column. #122718 - Added external connection granted privileges to the
SHOW GRANTS
command. #122718 - Introduced three new cluster settings for controlling table statistics forecasting:
sql.stats.forecasts.min_observations
is the minimum number of observed statistics required to produce a forecast.sql.stats.forecasts.min_goodness_of_fit
is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.sql.stats.forecasts.max_decrease
is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation. #122594
- Added a new session setting
optimizer_use_improved_multi_column_selectivity_estimate
, which if enabled, causes the optimizer to use an improved selectivity estimate for multi-column predicates. This setting will default totrue
on v24.2 and later, andfalse
on earlier versions. #123083
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. #123070
Bug fixes
- Fixed a bug where a
RESTORE
of a backup that itself contained a table created by theRESTORE
of a table with an in-progressIMPORT INTO
would fail to restore all rows. #120542 - Fixed a bug where client certificate authentication combined with identity maps (
server.identity_map.configuration
) did not work. For the feature to work correctly, the client must specify a valid database user in the connection string. #122747 - Fixed a bug where the row-based execution engine could drop a
LIMIT
clause when there was anORDER BY
clause, and the ordering was partially provided by an input operator. For example, this bug could occur with an ordering such asORDER BY a, b
when the scanned index was only ordered on columna
. The impact of this bug was that more rows may have been returned than specified by theLIMIT
clause. This bug is only present when not using the vectorized execution engine. That is, when running withSET vectorize = off;
. This bug has existed since CockroachDB v22.1. #122835 - Statistics forecasts of zero rows can cause suboptimal query plans. Forecasting will now avoid predicting zero rows for most downward-trending statistics. #122594
- Fixed a bug in the DB Console's Custom Chart tool where store-level metrics were displayed only for the first store ID associated with the node. Now data is displayed for all stores present on a node, and a single time series is shown for each store, rather than an aggregated value for all of the node's stores. This allows finer-grained monitoring of store-level metrics. #122806
- Fixed a bug where a job would fail if it reported an out-of-bound progress fraction. The error is now logged and no longer causes the job to fail. #122963
- Fixed a bug where, in certain cases, using virtual tables such as
crdb_internal.system_jobs
could result in the internal errorattempting to append refresh spans after the tracked timestamp has moved forward
. #123154
Performance improvements
- More efficient query plans are now generated for queries with text similarity filters, for example,
text_col % 'foobar'
. These plans are generated if theoptimizer_use_trigram_similarity_optimization
session setting is enabled. It is disabled by default. #122723 - The optimizer now costs
distinct-on
operators more accurately. It may produce more efficient query plans in some cases. #122851 - Added a new session setting
optimizer_use_improved_zigzag_join_costing
. When enabled and when the cluster settingenable_zigzag_join
is also enabled, the cost of zigzag joins is updated such that a zigzag join will be chosen over a scan only if it produces fewer rows than a scan. #123083 - Improved the selectivity estimation of multi-column filters when the multi-column distinct count is high. This prevents the optimizer from choosing a bad query plan due to over-estimating the selectivity of a multi-column predicate. #123083
- Improved the efficiency of error handling in the vectorized execution engine to reduce the CPU overhead of statement timeout handling and reduce the potential for more statement timeouts. #123503
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.21.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.21.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.21.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.21.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.21.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.21.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.21.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.21.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.21
Source tag
To view or download the source code for CockroachDB v23.1.21 on Github, visit v23.1.21 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.20...v23.1.21
SQL language changes
- The
FORCE_INVERTED_INDEX
hint causes the optimizer to prefer a query plan scan over any inverted index of the hinted table. An error is emitted if no such query plan can be generated. #122301 - Introduced three new cluster settings for controlling table statistics forecasting:
sql.stats.forecasts.min_observations
is the minimum number of observed statistics required to produce a forecast.sql.stats.forecasts.min_goodness_of_fit
is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.sql.stats.forecasts.max_decrease
is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation. #122990
- Added a session variable
optimizer_use_improved_multi_column_selectivity_estimate
, which if enabled, causes the optimizer to use an improved selectivity estimate for multi-column predicates. This setting will default totrue
on v24.2 and later, andfalse
on prior versions. #123068
Operational changes
- A minimum Raft scheduler concurrency is now enforced per store 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. #120797
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. #121056
- Sequence options for
NO MINVALUE
andNO MAXVALUE
now match PostgreSQL behavior. SequenceMINVALUE
andMAXVALUE
now automatically adjust to the bounds of a new integer type inALTER SEQUENCE ... AS
, matching PostgreSQL behavior. #121307 - Fixed a bug where the timeseries graphs shown on the SQL Activity Statement Fingerprint page in the DB Console were not rendering properly. This involved fixing a bug related to setting the time range of the charts. #121382 #122235
- Fixed a bug where CockroachDB could incorrectly evaluate
IN
expressions that hadINT2
orINT4
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. #121955 - Previously, on long-running sessions that issue many (hundreds of thousands or more) transactions, CockroachDB's internal memory accounting system, the limit for which is configured via the
--max-sql-memory
flag 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. #121949 #122235 - Reintroduced cluster setting
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 privilegeMODIFYSQLCLUSTERSETTING
. #122055 #122635 - Fixed a bug where a
GRANT ... ON ALL TABLES
statement could fail if sequences existed and they did not support a privilege (e.g.,BACKUP
). #122057 - Fixed a bug where client certificate authentication combined with identity maps (
server.identity_map.configuration
) did not work. For the feature to work correctly, the client must specify a valid database user in the connection string. This bug had been present since v23.1. #122746 - Statistics forecasts of zero rows can cause suboptimal query plans. Forecasting will now avoid predicting zero rows for most downward-trending statistics. #122990
Performance improvements
- More efficient query plans are now generated for queries with text similarity filters, for example,
text_col % 'foobar'
. These plans are generated if theoptimizer_use_trigram_similarity_optimization
session setting is enabled. It is disabled by default. #122683 - Added a new session variable
optimizer_use_improved_zigzag_join_costing
. When enabled, the cost of zigzag joins 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 variableenable_zigzag_join
is alsoon
. #123068 - Improved the selectivity estimation of multi-column filters by the optimizer 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. #123068
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.20.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.20.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.20.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.20.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.20.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.20.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.20.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.20.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.20
Source tag
To view or download the source code for CockroachDB v23.1.20 on Github, visit v23.1.20 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.19...v23.1.20
SQL language changes
- Added a session variable
optimizer_use_improved_multi_column_selectivity_estimate
, which if enabled, causes the optimizer to use an improved selectivity estimate for multi-column predicates. This setting will default totrue
on versions 24.2+, andfalse
on prior versions. #123152 - Added three new cluster settings for controlling optimizer table statistics forecasting:
sql.stats.forecasts.min_observations
is the minimum number of observed statistics required to produce a forecast.sql.stats.forecasts.min_goodness_of_fit
is the minimum R² (goodness of fit) measurement required from all predictive models to use a forecast.sql.stats.forecasts.max_decrease
is the most a prediction can decrease, expressed as the minimum ratio of the prediction to the lowest prior observation. #123149
Bug fixes
- Statistics forecasts of zero rows by the optimizer can cause bad plans. This commit changes forecasting to avoid predicting zero rows for most downward-trending statistics. #123149
- A job will now log rather than fail if it reports an out-of bound progress fraction. #123133
Performance improvements
- Added a new session variable
optimizer_use_improved_zigzag_join_costing
. When enabled, the cost of zigzag joins 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 variableenable_zigzag_join
is alsoon
. #123152 - Improved the selectivity estimation of multi-column filters by the optimizer 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. #123152
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.19.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.19.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.19.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.19.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.19.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.19.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.19.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.19.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.19
Source tag
To view or download the source code for CockroachDB v23.1.19 on Github, visit v23.1.19 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.18...v23.1.19
Bug fixes
- Reintroduced cluster setting
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 privilegeMODIFYSQLCLUSTERSETTING
. #122455
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.18.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.18.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.18.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.18.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.18.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.18.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.18.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.18.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.18
Source tag
To view or download the source code for CockroachDB v23.1.18 on Github, visit v23.1.18 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.17...v23.1.18
SQL language changes
- Fixed an oversight where CockroachDB was allowing mutation statements (such as
UPDATE
orDELETE
) and locking statements (such asSELECT ... FOR UPDATE
) in implicit single-statement transactions usingAS OF SYSTEM TIME
. #120159
Operational changes
- The
admission.kv.bulk_only.enabled
cluster setting, when set totrue
, only skips store-level admission control for normal priority work, and continues to subject the work to CPU admission control. #119173
DB Console changes
- Resolved an issue where clusters with multiple stores per node could list inaccurate region/node information on the Databases Page. #120234
- Fixed a bug where the timeseries graphs shown on the SQL Activity Statement Fingerprint page in DB Console were not rendering properly. This involved fixing a bug related to setting the time range of the charts. #121783
Bug fixes
- Previously, on long-running sessions that issue many (hundreds of thousands or more) transactions, CockroachDB's internal memory accounting system, the limit for which is configured via the
--max-sql-memory
flag), 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. #121874 - Fix a bug where running
RESTORE
on certain backups would open a very large number of connections to the backup storage provider. #119925 - A user with the
VIEWACTIVITYREDACTED
privilege can no longer see constants inside of queries that originate from other users in theSHOW SESSIONS
result. Previously, this redaction did not occur. #119963 - Previously, the
SHOW QUERIES
andSHOW STATEMENTS
required the user to have theVIEWACTIVITY
orVIEWACTIVITYREDACTED
privilege. However, a user should always be able to view their own queries, even without these privileges. This is now fixed. #119963 - Fixed a bug in which it was possible to
SET transaction_read_only = false
during anAS OF SYSTEM TIME
transaction. #120159 - Fixed a slow memory leak that could accumulate when opening many new connections. The bug was present in v22.2.9+ and v23.1+. #120242
- Users will no longer see views displayed on the Databases page in DB Console. Previously, views would be listed with no information, only displaying errors. #120213
Performance improvements
- Enabled the admission control CPU limiter for row-level TTL to reduce latency impact from CPU-intensive scans issued as part of row-level TTL jobs. #120516
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.17.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.17.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.17.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.17.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.17.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.17.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.17.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.17.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.17
Source tag
To view or download the source code for CockroachDB v23.1.17 on Github, visit v23.1.17 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.16...v23.1.17
Security updates
- A user with the
VIEWACTIVITY
privilege can now request a statement bundle from the Statements page in the DB Console or with the internal builtin functioncrdb_internal.requests_statement_bundle
. #119638 - Clusters using Cluster Single Sign-on (SSO) with JSON web tokens (JWTs) can now optionally fetch signing keys from configured issuers instead of configuring static signing keys for each issuer. When the new cluster setting
server.jwt_authentication.jwks_auto_fetch.enabled
is set totrue
, signing keys are automatically fetched from the issuer using metadata published in its OpenID configuration. In this case, static signing keys inserver.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. #120063 - DB Console cookies are marked
Secure
for the browser when the cluster is running in secure mode. #119262 - The DB Console
session
cookie is now markedHttpOnly
to prevent it from being read by any Javascript code. #119262
SQL language changes
- The new cluster setting
server.max_open_transactions_per_gateway
, when set to a non-negative value, prevents users without theadmin
role from executing a query if more than this number of transactions are open on the current gateway node. #118949 - Added support for index hinting with
INSERT
andUPSERT
statements. This allowsINSERT ... ON CONFLICT
andUPSERT
queries to use index hints in the same way asUPDATE
andDELETE
statements. #119600
Operational changes
- You can now pass the
--include-range-info
flag when generating a diagnostic bundle to include problem ranges. #119233 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 Statements page now always shows the entire selected period, instead of only the period that contains data. #118811
- The Overload Dashboard 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. #118908
Bug fixes
- Fixed a bug where creating a changefeed that targeted tables with a zero-scale
DECIMAL(n)
column,format='avro'
, anddiff
would cause a panic. #118848 Fixed a bug where a changefeed 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:- A rangefeed 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.
- 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.
Fixed a bug introduced in v22.2 where queries issued by TTL jobs did not use optimal plans. #118496
Fixed a bug introduced in v23.1.0 where a decommissioning replica that is part of a mis-replicated range could get stuck on a rebalance operation that was falsely determined to be unsafe. #118437
Fixed a bug introduced in v22.2 where adding multiple columns with
UNIQUE
constraints in a single statement could result in the errorsecondary index for backfill contains physical column not present in source primary index
. #118137Fixed a bug where an
unable to get CPU capacity
error could be logged every 10 seconds when running outside of a CPUcgroup
. #118670Fixed a bug where an
AUTO CREATE STATS
job could cause an internal system table to grow, and this could cause slow queries related to the job system. #118944Fixed a bug that caused a confusing error when a sequence name allocated by
SERIAL
conflicted with an existing type name. #118948Fixed a bug where an
ALTER PRIMARY KEY
query could fail with the errornon-nullable column {x} with no value! Index scanned ..
when validating a recreated secondary index. #118972Fixed 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
. #119186Fixed a bug in the
crdb_internal.leases
table where a deadlock in the leasing system could cause a node to become unavailable. #119374Fixed a bug introduced in v23.1.15 where a rangefeed-resolved timestamp could get stuck after a range merge 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. #119543Fixed a rare panic that could happen during a
pg_dump
import that contains a subquery in one of its arguments, such as a function likeSELECT addgeometrycolumn(...)
. Now, attempting to import apg_dump
with a function that has a subquery in one of its arguments results in an error rather than a panic. #118611Fixed a bug in the webhook sink where the
http
request body may not be initialized on retries, resulting in the errorhttp: ContentLength=... with Body length 0
. #119495Fixed a bug where some files were not closed when inspecting backup metadata during
BACKUP
andRESTORE
operations. #119634Fixed a bug that could cause internal errors to be logged when executing an
EXPORT
statement. #119712Fixed a bug where a schema change with a large number of descriptors could perform a full table scan on the
system.leases
table. #119466Fixed a bug introduced in v22.1.0 that could cause the
sql.txns.open.internal
andsql.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. #119338Fixed a bug introduced in v22.2.9 that could cause a slow memory leak that can accumulate when opening many new connections. #120244
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.16.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.16.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.16.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.16.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.16.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.16.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.16.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.16.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.16
Source tag
To view or download the source code for CockroachDB v23.1.16 on Github, visit v23.1.16 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.15...v23.1.16
Bug fixes
- Fixed a bug where rangefeed resolved timestamps could get stuck, continually emitting the log message
"pushing old intents failed: range barrier failed, range split"
, typically following a range merge. This bug was introduced in v23.1.15. #119559
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.15.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.15.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.15.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.15.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.15.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.15.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.15.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.15.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.15
Source tag
To view or download the source code for CockroachDB v23.1.15 on Github, visit v23.1.15 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.14...v23.1.15
Security updates
- The DB Console
session
cookie is now markedHttpOnly
to prevent it from being read by any Javascript code and is markedSecure
by the browser when the cluster operates in secure mode. #119248
Bug fixes
- Fixed a bug where changefeeds that targeted schema-locked tables could fail due to an old high-water timestamp being incorrectly persisted. #117960
- Fixed a bug where creating a changefeed that targeted tables with a
DECIMAL(n)
column (that is, zero-scaleDECIMAL
column),format='avro'
, anddiff
would cause a panic. #118893 - Fixed a bug that could cause a
CREATE CHANGEFEED WITH {key_column}
statement to retry forever. #116966 - Fixed a bug that prevented database restore 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. #116903
- 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 asRESTORE
. 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. #117383 - 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. #117299
- Fixed the total runtime value referenced in SQL stats, resolving the bug where the Console erroneously displayed percentages over 100%. #117496
- 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 SQL Activity page. #118427
- Fixed a bug where CockroachDB would erroneously return an error if an empty search path parameter was encountered during search path setting. #117556
- Fixed a bug in the Row-Level TTL job that would cause it to skip expired rows if the primary key of the table included columns of the collated string type. This bug was present since the initial release of row-level TTL in v22.2.0. #117513
- Fixed a bug that could cause
DELETE
queries sent by the Row-Level TTL job to use a secondary index rather than the primary index to find the rows to delete. This could lead to someDELETE
operations taking a much longer time than they should. This bug was present since v22.2.0. #118336 - Fixed a bug where concurrent
GRANT
statements can cause deadlocks. #117712 - Reduced the impact of bulk deletions (
DROP TABLE
,TRUNCATE
, or replica removals) on foreground traffic by altering storage engine compaction priorities. #116560 - 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. #118238 AUTO CREATE STATS
jobs no longer lead to growth in an internal system table resulting in slower job-system related queries. #118980ALTER PRIMARY KEY
no longer fail with annon-nullable column <x> with no value! Index scanned ..
error when validating recreated secondary indexes. #118969- Fixed a bug where CockroachDB could encounter an error
unable to encode table key: *tree.DTSQuery
when operating on columns ofTSQuery
type in some contexts (e.g. when collecting table statistics or when performing aDISTINCT
operation). The bug has been present since 23.1 when support for TSQuery type was added. #118320 - 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 theAND
expression had "similar" expressions (e.g.ARRAY['str1'] <@ col AND (ARRAY['str1'] && col OR ...)
). The bug has been present since pre-22.2 version. #118359 - CockroachDB now correctly logs the top 5 hot ranges per cluster instead of per node. #118371
- Fixed a bug where a changefeed 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 rangefeed 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. #119270
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.14.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.14.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.14.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.14.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.14.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.14.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.14.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.14.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.14
Source tag
To view or download the source code for CockroachDB v23.1.14 on Github, visit v23.1.14 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.13...v23.1.14
SQL language changes
- CockroachDB now supports importing into 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. #116361
- Added a new field,
StmtPosInTxn
, to theCommonSQLExecDetails
(included in SQL audit logs, SQL execution logs, and telemetry events) to represent the statement's index (position) in the transaction. The first statement'sStmtPosInTxn
is1
. #116558
Operational changes
- Updated the
changefeed.lagging_ranges_threshold
andchangefeed.lagging_ranges_polling_interval
cluster settings to be public in v23.1. #115803
DB Console changes
- The Cluster Overview page now correctly renders the background color for email signups, fixing an issue where it was difficult to read the text. #114546
- Updated the CPU Time label to SQL CPU Time on the Overview page and clarified the tooltip. #116448
Fixed an issue where the following
AggHistogram
-powered metrics reported quantiles incorrectly in the Overview page. 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
. #114747In 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. #116102
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.#115513
- 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. #114242
- Fixed a nil pointer dereference bug in the error handling for
GetFiles
. #114829 - Fixed a bug that prevented the SQL Activity page from showing internal statements when the
sql.stats.response.show_internal.enabled
cluster setting was set totrue
. #114819 - Fixed a bug that could cause a discrepancy between computed statistics and the stored value for statics when a delete was rolled back. #113772
- 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. #115063 - Fixed a bug that would cause a prepared statement to fail if it references an enum as well as a table that has undergone a schema change. #115174
- 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. #114672
- Backups now evenly distribute their work across all replicas, including followers, regardless of leaseholder placement. #115018
- Fixed a bug that could cause replica processing in store queues to get stuck if a the replica's ID has changed. #115036
- Fixed an bug introduced in v22.2 that could lead to stuck queries or inaccurate results when using lookup joins involving equality columns and multiple ranges. #115581
- Fixed a bug in the declarative schema changer that could cause
CREATE INDEX
with expressions to fail on materialized views. #115596 - Fixed a bug that could cause an inaccorate "too few columns" error for a query that used
ANY {array}
syntax with a subquery. #115591 - Fixed a bug that could cause a "too few/many columns" errors for a query that used an
IN
orNOT IN
clause with a non-trivial right operand, such as a subquery (rather than a constant tuple). #115591 - Fixed a bug introduced in v22.2 that could cause errors or inaccurate results when performing a lookup or index join on a table with three or more column families. #115899
- Fixed a bug that could cause an internal error or a panic while attempting to forecast statistics on a numeric column. #115899
- Fixed a bug when issuing a
BEGIN
statement where incorrectAge
field could be logged in the statement log. This bug could also cause statements to incorrectly appear in the slow query log. #115257 - 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%. #117497
- Fixed a bug that could cause a
CREATE CHANGEFEED WITH {key_column}
statement to retry forever. #117555
Performance improvements
- Reduced query planning time significantly for some queries that join multiple tables. #114512#116107
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.13.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.13.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.13.linux-arm64.tgz (SHA256) |
cockroach-sql-v23.1.13.linux-arm64.tgz (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.13.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.13.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.13.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.13.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.13
Source tag
To view or download the source code for CockroachDB v23.1.13 on Github, visit v23.1.13 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.12...v23.1.13
SQL language changes
- A new option for the
RESTORE
syntax,strip_localities
, has been added. This can be used to strip the locality information from a backup when there are mismatched cluster regions 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 primary region to a regionless restore (with or without regional by row table(s)) will not work out-of-the-box, but does produce an accurate message instructing a user to
DROP TYPE {database}.public.crdb_internal_region;
(and for cluster restores,ALTER DATABASE {database} CONFIGURE ZONE DISCARD;
). - Restoring a cluster/database/table with a regional by row table will not work out-of-the box. In particular, when performing writes, the
crdb_region
column 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 zone configuration (this latter is due to the fact that the zone config holds all outdated info related to the partitions, constraints, etc.). These are due to a conflict with thecrdb_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. #111863
- Adding a primary region to a regionless restore (with or without regional by row table(s)) will not work out-of-the-box, but does produce an accurate message instructing a user to
- The
RESTORE
optionstrip_localities
has been renamed toremove_regions
. #111863 - You can no longer perform a
RESTORE
with theremove_regions
option if the object being restored contains a regional by row table. #111863 - Added a builtin function
jsonb_array_to_string_array
that converts a JSONB array to a string array. #112864 - Updated the builtin function
jsonb_array_to_string_array
to return NULL objects. Previously, they were removed from the output. #112864 - Fixed the SQL Activity page 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. #112864
Operational changes
- Added metrics for Raft proposals and reproposals, specifically:
raft.commands.proposed
: commands proposed to Raft by leaseholders. (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 closed timestamp check). #113153
- Added a new cluster setting
kv.gc.sticky_hint.enabled
that helps expedite garbage collection after range deletions, such as when a SQL table or index is dropped. This setting is disabled by default. #110643
DB Console changes
- DB Console instances proxied at different subpaths that use OIDC will now point to the correct relative path when attempting to use OIDC login. #111290
Bug fixes
- Fixed a bug where the
pg_attribute
could have sparsely populatedattnum
s since dropped columns were not included. Previously, the attribute number generated insidepg_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 thepg_attribute
table, which allows these tools to work correctly. #111119 - Fixed a bug that could prevent
RESTORE
from working if it was performed during a cluster upgrade. #112758 - Fixed a bug where queries with the
st_union
aggregate function could produce incorrect results in some cases due to the query optimizer performing invalid optimizations. This bug has been present since thest_union
function was introduced in v20.2.0. #112795 - A warning for technical advisory 99561 could incorrectly surface when dropping secondary indexes that store primary key columns. This is now fixed. #112906
- Fixed a bug where creating a trigram index and later displaying it via
SHOW CREATE TABLE
, would not show the opclass for this trigram index. #113077 - Fixed a bug introduced in v22.2 where CockroachDB could incorrectly evaluate lookup and index joins into tables with at least 3 column families in some cases (either a
non-nullable column with no value
internal error would occur, or the query would return incorrect results). #113108 - Fixed a bug that could occasionally cause schema change jobs (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 ranges in the MVCC GC queue under the DB Console's Advanced Debug page. #110643
- Fixed a bug that could cause internal errors or panics while attempting to forecast statistics on a numeric column. #113798
- Fixed a bug where
ALTER PRIMARY KEY
would incorrectly disable secondary indexes while new secondary indexes were being backfilled when using the declarative schema changer. #113183 - Previously, when executing queries with index / lookup joins 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. #114143
- Fixed a bug where the
SHOW STATISTICS
command would incorrectly require the user to have the admin role. It was intended to only require the user to have any privilege on the table being inspected. #114479 - Fixed a bug that could cause a query plan to skip scanning rows from the local region when performing a lookup join with a
REGIONAL BY ROW
table as the input. #114456 - Fixed a bug that could cause
ALTER DATABASE ... ADD/DROP REGION
to hang if node localities were changed after regions were added. #114197
Performance improvements
- Addressed a performance regression that could happen when the declarative schema changer is being used to create an index with a concurrent workload. #113724
- Added an off-by-default cluster setting,
kv.dist_sender.follower_reads_unhealthy.enabled
, which when enabled will prevent failed requests from being issued on followers that are draining, decommissioning, or otherwise unhealthy. This will prevent follower reads against nodes in such states. This prevents latency spikes if those nodes later go offline. #114367 - Query planning time has been reduced significantly for some queries in which many tables are joined. #114835
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.12.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.12.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.12.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.12.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.12.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.12.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.12.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.12.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.12
Source tag
To view or download the source code for CockroachDB v23.1.12 on Github, visit v23.1.12 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.11...v23.1.12
Security updates
- The
SIGHUP
signal now clears the cached expiration times for client certificates that are reported by thesecurity.certificate.expiration.client
metric. #111006 - SQL commands that were previously limited to the
admin
system privilege can now be used by users with theVIEWCLUSTERMETADATA
orREPAIRCLUSTERMETADATA
system privilege, depending on whether the operation is read-only or modifies state. #111131
General changes
- The maximum permitted value of the
COCKROACH_RPC_INITIAL_WINDOW_SIZE
environment variable has been increased to64MB
. By increasing this environment variable, in conjunction with tuning OS-level maximum TCP window size, you can increase the throughput that Raft replication can sustain over high latency network links. #111287 - Updated Go version to 1.19.13. #112204
SQL language changes
- New datetime built-ins (
make_date
,make_timestamp
, andmake_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). #110338 - New system privileges
CREATEROLE
,CREATELOGIN
,CREATEDB
, andCONTROLJOB
have been introduced. Each is analogous to its existing role option counterpart but can additionally be inherited through role membership. #110359, #110359, #110359, #110359 RESTORE
can now be passed aWITH EXECUTION LOCALITY
option similar toBACKUP
to restrict execution of the job to nodes with matching localities. #110611- The
statement_activity
andtransaction_activity
table columnexecution_total_cluster_seconds
is now accurate. Thecombinedstmts
endpoint returns the correct value for theStmtsTotalRuntimeSecs
andTxnsTotalRuntimeSecs
properties. #109639 - The
discard
log message 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. #110983
Operational changes
- The
cockroach debug zip
command now has an option to omit goroutine stack dumps. This impacts the creation ofnodes/*/stacks.txt
andnodes/*/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 innodes/*/goroutines/*.txt.gz
, since they have already been generated and don't require any stop-the-world operations. #110266 - 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. #109902 - Added a new metric
changefeed.lagging_ranges
that shows the number of ranges which are behind in changefeeds. This metric can be used with themetrics_label
changefeed option. The calculation of this metric is controlled by two new cluster settings: (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. #110963 - The DB Console now constructs client-side requests using relative URLs instead of absolute ones. This enables proxying of the DB Console at arbitrary subpaths. #111652
- Added a new cluster setting
server.http.base_path
that controls the redirection of the browser after successful login with OIDC SSO. 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 ashttps:// <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.#112038
DB Console changes
- Non-admin users can now view the Database, Database Details, and Database table pages. #110342
- The SQL Connection Rate metric on the SQL Dashboard 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. #110497
- Fixed a bug in DB Console's Statement Diagnostic page 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. #111278
- Fixed an error on the SQL Activity page when there was a workload, and then the workload stopped so that no queries ran against the database in the last hour. #111496
- The Jobs table will now correctly display timestamps for creation, last modified, and the completed time fields. #111901
- The
Reset Sql Stats
button is now visible to users with the admin role on the DB Console. #110256 - Reduced memory usage in SQL activity jobs. #112323
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. #111310 - 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. #111412 - Fixed a bug that caused CockroachDB to stop collecting new statistics about Statement fingerprints and Transaction fingerprints. #111641
- Fixed a bug where, internally, printing a 0 decimal with a very low exponent uses excessive memory. The DECIMAL type type is not impacted, but
crdb_internal
functions may be. #110564 - Fixed a bug where executing the
EXPORT INTO PARQUET
statement could cause an out-of-memory crash (OOM). Now, if memory is exceeded, theEXPORT INTO PARQUET
statement returns an error. If you see an error related to memory, retry theEXPORT INTO PARQUET
statement using a smaller value for thechunk_rows
option. Cockroach Labs recommends using changefeeds to export data because they provide better performance for growing workloads. Additionally, changefeeds operate as jobs, which offer observability and job management. #110717 #110717 - Added limited
statement_statistics
to thedebug.zip
output. #110662 - Fixed a nil dereference panic during node startup that could be caused by an incorrect initialization order. #109684
- Fixed a bug where the
BEGIN
statement incorrectly displayed a transaction ID in telemetry logs. It now correctly shows no transaction ID, since there is no open transaction whenBEGIN
is executed.#109840 - Fixed a bug that could cause a transaction performing multiple parallel foreign key checks to return a
concurrent txn use detected
error. #109849 - Fixed a bug where dependencies on sequences from tables would be reported with the wrong value for the
classid
column in thepg_catalog.pg_depend
table. #110207 - Fixed edge cases in decimal and float evaluation for division operators.
'NaN'::DECIMAL / 0
will now returnNaN
instead of a division-by-zero error, and0 / 'inf'::DECIMAL
will return0
instead of0E-2019
. #110296 - Fixed a DB Console issue where the
DROP_UNUSED
index recommendations produced by the table details page produced an invalidDROP INDEX
statement. #110453 - Executing two
ALTER RANGE default CONFIGURE ZONE
statements on the same line no longer triggers an error. #110337 - Removed a buggy TTL descriptor repair. Previously, upgrading from v22.2.x to 23.1.9 incorrectly removed TTL storage parameters from tables (visible via
SHOW CREATE TABLE <ttl-table>
) while attempting to repair table descriptors. A node that attempts to run the TTL job 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 Technical Advisory 110363. #110500 - 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. #109881 cockroach debug pebble
commands now work correctly with encrypted stores which don't use the defaultcockroach-data
path, and you no longer need to pass the--store
option. #110507- The Database pages no longer displays
undefined
regions or outdated node information. #110741 - Fixed a bug where
RESET (ttl_expire_after)
could incorrectly removettl_expiration_expression
. #110746 - Fixed a bug where an
ALTER TABLE ... ADD CONSTRAINT CHECK ...
statement with a user-defined function (UDF) in theCHECK
could cause a validation error. #110720 - Fixed a bug where
CREATE INDEX
for partial indexes could fail withERROR: duplicate key value violates unique constraint
if concurrent inserts happened simultaneously. #110584 - Fixed a bug where a
CREATE TABLE
command with anIDENTITY
column did not properly propagate the type of the column into the sequence. #111014 - Fixed a bug where the
format_type
built-in did not honortypemod
information for array types, leading to incorrect output. #110940 - Fixed compaction behavior to prevent rapid sublevel growth when removing replicas from a store, such as during decommissioning. #111141
- Fixed a bug that could occur when the multiple active portals 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. #110666 - External connection URLs now accept the scheme
azure-blob
for connections to Azure Blob Storage and the schemeazure-kms
for connections to Azure KMS. For backward compatibility, schemesazure
andazure-storage
schemes continue to work for connections to Azure Blob Storage. #111246 - Fixed a bug where changing the setting
server.telemetry.hot_ranges_stats.interval
had no effect. #111373 - Added a check for values before using
mean
on the DB Console Plan Details page, fixing a crash. #111505 - Fixed a bug where dependencies on sequences from tables would be reported with the wrong value for the
classid
column in thepg_catalog.pg_depend
table. #111600 - Fixed a bug where
atttypmod
inpg_attribute
was not populated forTIMESTAMP
/INTERVAL
types, which meant that ORMs could not know the precision of these types properly. #111727 - Fixed a bug in the DB Console Transaction Insight Details page , which showed contention details of other transactions. Now, CockroachDB will only surface contention details for the current transaction. #111880
- Fixed a bug where
indoption
insidepg_index
was not properly encoded. Clients were unable to decode it asint2vector
. #111957 - 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 anAmbiguousResultError
. #111876 - Fixed a bug that prevented the optimizer from honoring the
statement_timeout
session setting when generating constrained index scans for queries with largeIN
lists or= ANY
predicates on multiple index key columns. This bug could cause an Out-of-Memory (OOM) condition on the node. #112076 - 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
andmax
aggregate functions #112254 - 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. #113107
- Fixed a bug that could cause internal errors or panics while attempting to forecast statistics on a numeric column. #113881
Performance improvements
- Queries that compare collated strings now use less memory and may execute faster. #110147
- Reduced the impact of high-concurrency blind writes to the same key on goroutine scheduling latency. #109370
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.11.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.11.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.11.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.11.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.11.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.11.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.11.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.11.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.11
Source tag
To view or download the source code for CockroachDB v23.1.11 on Github, visit v23.1.11 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.10...v23.1.11
SQL language changes
- Added a new syntax to
SHOW DEFAULT PRIVILEGES
,SHOW DEFAULT PRIVILEGES FOR GRANTEE <grantee>
that shows the default privileges that a grantee received. #108285 - The admin API database details endpoint now returns authoritative range statistics. #108727
- Added the cluster setting
sql.stats.limit_table_size.enabled
, which controls whether or not CockroachDB enforces the row limit set bysql.stats.persisted_rows.max
in thesystem.statement_statistics
andsystem.transaction_statistics
tables. #108912 - Optimized the
sql-stats-compaction
job's delete query to avoid a full scan. This helps avoid a transaction retry error, which can cause the job to fail. #108987 - Fixed an issue where the UI was missing query text and details when looking at the SQL activity transactions page 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 thecrdb_internal.transaction_activity
table. #109479 - Added the
VIEWSYSTEMTABLE
system privilege. Users with this privilege haveSELECT
privileges for all tables in thesystem
database. #109525 - The
oidvectortypes
built-in function has been implemented, which can format anoidvector
. #109711 - The internal persisted statistics 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. #109707
- Introspection queries will now show the internal
node
user as the owner of tables inpg_catalog
andinformation_schema
. Previously, the owner was shown asadmin
, but that was inaccurate since users with theadmin
role could not modify these tables in any way. #109735
Operational changes
- Added the
kv.enqueue_in_replicate_queue_on_span_config_update.enabled
cluster setting. When set totrue
, stores in the cluster will enqueue replicas for replication changes 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. #108812 - Added a new cluster setting named
server.hot_ranges_request.node.timeout
, with a default value of 5 minutes. The setting controls the maximum amount of time that a hot ranges request will spend waiting for a node to provide a response. Set it to0
to disable timeouts. #109015 - 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. #109008
BACKUP
now skips contacting the ranges for tables on whichexclude_data_from_backup
is set, and can thus succeed even if an excluded table is unavailable. #109123- The RPC dial and heartbeat timeouts can now be configured via the environment variables
COCKROACH_RPC_DIAL_TIMEOUT
(default 2xCOCKROACH_NETWORK_TIMEOUT
or 2x2=4 seconds) andCOCKROACH_RPC_HEARTBEAT_TIMEOUT
(default 3xCOCKROACH_NETWORK_TIMEOUT
or 3x2=6 seconds). This allows configuring these values independently ofCOCKROACH_NETWORK_TIMEOUT
. #109358 - The default gRPC 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 variableCOCKROACH_RPC_SERVER_TIMEOUT
. #109620 - Added a new gauge metric
sql.schema.invalid_objects
. This gauge is periodically updated based on the schedule set by thesql.schema.telemetry.recurrence
cluster setting. When the metric is updated, it counts the number of schema objects (tables, types, schemas, databases, and functions) 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. #109733 - Added two new changefeed metrics:
changefeed.checkpoint_progress
is similar tochangefeed.max_behind_nanos
, but it also supports metrics labels.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). #109744
Command-line changes
- Removed the command
\demo recommission
fromcockroach demo
. It had been obsolete and non-functional since v20.2. #108631
DB Console changes
- Users without the
VIEWCLUSTERSETTINGS
permission, but with theVIEWACTIVITY
orVIEWACTIVITYREDACTED
permissions, can now see index recommendations. #109466 - CockroachDB will now show a warning when the time period selected on the SQL Activity page is older than the oldest data available. #109468
Bug fixes
- Fixed a buggy TTL descriptor repair by removing it. Previously, upgrading from v22.2.x to 23.1.9 incorrectly removed TTL storage params from tables (visible via
SHOW CREATE TABLE <ttl-table>
) while attempting to repair table descriptors. This resulted in the node that attempts to run the TTL job 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 Technical Advisory 110363. #110562 - Users with the
VIEWACTIVITY
privilege should be able to see other users' sessions from both the CLI and the DB Console. #108571 - Fixed errors on the Sessions page in the DB Console when a session's memory usage is zero bytes. #108619
- Fixed a bug in
cockroach demo
whereby\demo add
could sometimes crash with an error "index out of range [...] with length ...
". This bug was introduced in v19.x. #108631 - Fixed a bug whereby the command
\demo decommission
incockroach demo
could sometime leave the demo cluster in a broken state. This bug was introduced in v20.2. #108631 - Fixed a bug in the index recommendations provided in the
EXPLAIN
output whereALTER INDEX ... VISIBLE
index recommendations may suggest making the wrong index visible when there are multiple invisible indexes in a table. #108646 - Fixed a bug that could cause a query with
LIMIT
andORDER BY
to return results in the wrong order. This bug could cause incorrect results as well if theLIMIT
was nested within an outer query, e.g. under anotherLIMIT
. This bug had existed since before v22.2. #106798 - Fixed a bug with collated string type checking with nested case expressions where an inner case had no explicit collated type. #108345
- Fixed a bug where
RELEASE SAVEPOINT
could incorrectly emit the message"cannot publish new versions for descriptors"
instead of a retryable error to applications. #108478 - Fixed a bug that could cause CPU usage to increase over time. #108801
- Fixed a bug introduced in v22.1 that could cause a join 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. #106875
- Users with the
VIEWACTIVITY
permission can now view correct values for the current timezone in the DB Console. #108780 - 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
CLI shortcut to encounter errors. #108909 - Fixed a bug where
pg_attribute
andpg_attrdef
did not properly return results for generated columns. #109035 - The Schema Insights view should hit request timeouts less frequently, if at all. #109014
- Fixed a bug that caused nodes to crash when attempting to
EXECUTE
a prepared statement with an argument that referenced a user-defined function. This bug was present since user-defined functions were introduced in v22.2. #108469 - Fixed a bug so the filter on the Statements Page works when the app name is an empty string (represented as 'unset'). #108985
- Fixed a bug where a
SpanStatsRequest
would return post-replicated MVCC stats, which was causing incorrect output inSHOW RANGES ... WITH DETAILS
. Now, aSpanStatsRequest
returns the logical MVCC stats for the requested span. #109234 - Fixed an issue with the "full scan" filter in the UI, where the filter was not returning any results. #109274
- Going to the Transaction Details Page from Workload Insights > High Contention is fixed. Previously, the link would not show any results. #109253
- Fixed the column names on the
SELECT
queries against the tablescrdb_internal.node_txn_execution_insights
andcrdb_internal.cluster_txn_execution_insights
during the creation of debug.zip files. #109515 - Fixed a bug that could cause some rows to be silently skipped during
IMPORT
when a node failed. #109663 - Fixed a bug in geospatial queries 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
orST_MaxDistance(geom1, geom2) > constant
, where the operator was one of>
,<
,>=
,<=
, or a filter of the formST_Distance(geog1, geog2, false) = 0
would sometimes mistakenly evaluate totrue
when one or both of the inputs wasNULL
or an empty geography or geometry. #109393 - Fixed an issue where a split can be called on an invalid key that's in the form of
someValidKey.Next()
during restore. This split key can land in the middle of a row with column families, and thus result in failing SQL queries when querying the restored table. #109777 - Fixed an issue where a split can be called on an invalid key that's in the form of
someValidKey.Next()
during restore with thebulkio.restore.use_simple_import_spans
cluster setting set totrue
. This split key can land in the middle of a row with column families, and thus result in failing SQL queries when querying the restored table. #109940 - The
difference
built-in function had its return type incorrectly set tostring
instead ofinteger
. #109752 - Fixed a bug where dependencies on sequences from tables would be reported with the wrong value for the
classid
column in thepg_catalog.pg_depend
table. #110206 - Fixed a bug that could cause a transaction performing multiple parallel foreign key checks to return a
concurrent txn use detected
error. #110273 - Various observability pages in the DB Console no longer crash when they encounter zeros (e.g., a session with no memory allocated). #108785
Performance improvements
- Improved the cost of resolving a user-defined enum type that has many values. #109470
- Queries that access the
pg_catalog
andinformation_schema
that perform introspection on other tables in those schemas are now significantly faster. #109735
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.10.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.10.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.10.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.10.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.10.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.10.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.10.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.10.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.10
Source tag
To view or download the source code for CockroachDB v23.1.10 on Github, visit v23.1.10 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.9...v23.1.10
Bug fixes
- Removed buggy TTL 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. #110569
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.9.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.9.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.9.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.9.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.9.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.9.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.9.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.9.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.9
Source tag
To view or download the source code for CockroachDB v23.1.9 on Github, visit v23.1.9 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.8...v23.1.9
General changes
- All cluster version upgrades perform a catalog health check and repair upgrade step before proceeding to other upgrade steps. #105826
- Upgrading the cluster version to a new release will not only check for descriptor and other catalog 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 schema change or an upgrade are performed. #106217
Enterprise edition changes
- Changefeeds should no longer fail when upgrading to v23.1.5. #106399
- Fixed an issue where changefeeds emitting to a cloud sink with compression could experience resource leakage (memory and goroutines) when experiencing transient errors. #106857
- 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 variableCOCKROACH_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
#106688 - Fixed a rare changefeed 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
. #107933 - Fixed a potential deadlock when running changefeeds with the
end_time
option set. #108074
SQL language changes
- Added a
crdb_internal.reset_activity_tables
builtin function to allow users to reset the statistics in thesystem.statement_activity
andsystem.transaction_activity
tables. Users requireadmin
to use this builtin. #106129 - CockroachDB now reports contention time encountered while executing the mutation statements (
INSERT
,UPSERT
,UPDATE
, andDELETE
) when run viaEXPLAIN ANALYZE
. #106432 - Fixed a bug in
COPY CSV WITH HEADER
that was first introduced in v23.1. On previous versions of CockroachDB, a workaround is to disable vectorizedCOPY
by setting thevectorize
session variable tofalse
or to remove the header row from theCOPY
data. #106967 - Added a new boolean cluster setting
sql.telemetry.query_sampling.internal.enabled
. Iftrue
, internal app queries will be reported to telemetry when query sampling to telemetry is enabled. #107182 - The
SHOW QUERIES
andSHOW SESSIONS
commands will now display timestamps using the session's timezone setting. #108144 - Added the cluster setting
sql.stats.limit_table_size.enabled
, which controls whether or not we enforce the row limit set by thesql.stats.persisted_rows.max
cluster setting in thesystem.statement_statistics
andsystem.transaction_statistics
tables. #108913 - Optimized the
sql-stats-compaction
job's delete query to avoid a full scan. This helps avoid a transaction retry error which can cause the job to fail. #108990 - Introspection queries will now show the internal
node
user as the owner of tables inpg_catalog
andinformation_schema
. Previously, the owner was shown asadmin
, but that was inaccurate since users with theadmin
role could not modify these tables in any way. #109736
Operational changes
- Added two new metrics to monitor lease range preference conformance:
leases.preferences.violating
indicates the number of valid leases a store 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. #107622 - Added the
kv.enqueue_in_replicate_queue_on_span_config_update.enabled
cluster setting.. When set totrue
, stores in the cluster will enqueue replicas for replication changes 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. #108816 - 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 ofCOCKROACH_NETWORK_TIMEOUT
;COCKROACH_RPC_HEARTBEAT_TIMEOUT
, which defaults to 3xCOCKROACH_NETWORK_TIMEOUT
. This allows configuring these values independently ofCOCKROACH_NETWORK_TIMEOUT
, which defaults to 2s. #109359 - 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
COCKROACH_NETWORK_TIMEOUT
), to avoid spurious connection failures in certain scenarios. This can be controlled via the new environment variableCOCKROACH_RPC_SERVER_TIMEOUT
. #109621 - Added a new gauge metric
sql.schema.invalid_objects
. This gauge is periodically updated based on the schedule set by thesql.schema.telemetry.recurrence
cluster setting. When the metric is updated, it counts the number of schema objects (tables, types, schemas, databases, and functions) 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. #109739 - The cluster setting
kv.allocator.lease_rebalance_threshold
can now be used to control the minimum fraction away from the mean a store's lease count before it is considered for lease transfers. The default setting is 0.05. #105950 - On Linux/ARM64, 16k page sizes are now used in jemalloc. This allows Linux/ARM64 users with 16k pages to run
cockroach
. #107131
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. #106404
- Fixed a bug where the job details page would flicker between the job details and a loading animation when a job was still executing. #106153
- Added a timescale label to the Diagnostics tab of the Statement Details page. Users are now able to see the time window for which the statement diagnostics are displayed. #107082
- Fixed the options selection in the Sort dropdown on the Network Latency page. #107213
- Search is performed on all ID fields of the Transaction Executions and Statement Executions views on the Insights Page. #107762
- Enabled the
Now
option on the time picker that appears on several pages of the DB Console. #107837
Bug fixes
- Fixed a bug where the node and regions columns on the Databases Page did not properly render. This column is shown for clusters with more than 1 node. #105824
- Fixed an internal error when using
EXPLAIN (TYPES)
on aDELETE FROM ... USING ... RETURNING
statement. This error was introduced in v23.1.0. #106196 - 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 schema changer. 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. #106286
- Fixed a panic executing
CREATE AS
withpg_catalog.pg_prepared_statements
as a source. For example:CREATE TABLE t AS SELECT * FROM pg_catalog.pg_prepared_statements
;CREATE MATERIALIZED VIEW v AS SELECT * FROM pg_catalog.pg_prepared_statements
. #106274 - Fixed a panic executing
CREATE AS
withpg_catalog.cursors
as a source. For example:CREATE TABLE t AS SELECT * FROM pg_catalog.pg_cursors
;CREATE MATERIALIZED VIEW v AS SELECT * FROM pg_catalog.pg_cursors
. #106274 - Fixed a panic executing
CREATE AS
withcrdb_internal.create_statements
as a source. For example:CREATE TABLE t AS SELECT * FROM crdb_internal.create_statements
;CREATE MATERIALIZED VIEW v AS SELECT * FROM crdb_internal.create_statements
. #106274 - Fixed a bug where the Key Visualizer was crashing with an "invalid conversion to int" message. #106357
- Fixed a bug in the declarative schema changer where adding a foreign key or setting a column to
NOT NULL
with a non-existent column produced an assertion error instead of the proper pgcode. #105719 SHOW SCHEMAS FROM db_name
will no longer incorrectly show schemas from the current database when the current database has a schema nameddb_name
. #106199- Fixed a bug in optimizer row count estimates of a scan from a partitioned partial index, which may cause an underestimated row count or a panic if the row count goes to zero. #106309
- Fixed a bug where a transaction retry during the backfill of the
job_type
column in the jobs table could result in some job records with nojob_type
value. #106412 - Fixed a bug where some secondary indexes would incorrectly be treated internally as primary indexes, which could cause some schema change operations to fail. The bug could occur if
ALTER TABLE ... ALTER PRIMARY KEY
was used on CockroachDB v21.1 or earlier, and the cluster was upgraded. #106426 - In the DB Console, selecting a database filter from the filters menu in the SQL Activity Page 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. #106434
- The statement tag for
SHOW SEQUENCES
is now corrected to beSHOW SEQUENCES
instead ofSHOW SCHEMAS
. #106797 - Fixed a rare bug in which some uploads via
cockroach userfile upload
would silently upload incorrect data. #106698 - Under prolonged unavailability (such as loss of quorum), affected ranges would exhibit Raft log growth that was quadratic as a function of the duration of the outage. Now this growth is approximately linear instead. #106054
- Fixed a bug on the Metrics page that was causing it to not update automatically on rolling window options. #106766
- Blocked dropping of indexes impacted by Technical Advisory 99561 if dropping those indexes could cause data loss to occur. #106863
- Debug zips are now properly showing the information from
crdb_internal.cluster_settings
. The filecrdb_internal.cluster_settings.txt
in debug zips was empty due to this bug on CockroachDB v23.1.5 (which was the only version affected). #107105 - A bug has been fixed that caused internal errors instead of user errors when queries contained labelled tuples with a different number of elements and labels, e.g.,
(ROW(1, 2) AS a)
. This bug had been present since CockroachDB v23.1.0. #106959 - Fixed a failing schema change job when CREATE TABLE AS or
CREATE MATERIALIZED VIEW AS
sources from aSHOW
command as in the following examples #107226: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 DB Console no longer use the fully qualified name of a table to create an index name, allowing the creating of indexes directly from the DB Console to work. #107218
- Fixed a bug where
SHOW GRANTS
could fail if any objects were offline, which can happen during aRESTORE
. #107238 - The
pg_get_serial_sequence
builtin function can now handle mixed-case names correctly. #107372 - Fixed a bug with the "SQL statement diagnostic request" HTTP API that would affect CockroachDB Serverless clusters was fixed. This bug had existed since CockroachDB v22.1. #107385
- Fixed a bug where under rare circumstances, a replication change could get stuck when proposed near lease/leadership changes (and likely under overload), and the replica circuit breakers could trip. #107059
- 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. [#104483][#104483] - 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. [#106515][#106515]
- Fixed a bug in the SQL syntax for
CREATE TABLE AS
schema change job description. #107404 - Fixed an internal error in
UPDATE
,UPSERT
,INSERT
, orDELETE
statements run concurrently withALTER TABLE ... ADD COLUMN
of a virtual computed column on the same table. #107403 - Fixed a bug that caused internal errors when using user-defined types in views and user-defined functions that have subqueries. This bug was present when using views since version v21.2. It was present when using user-defined functions since v23.1. #106955
- The timeout duration when loading the Hot Ranges page has been increased to 30 minutes. #107497
- Fixed the SQL syntax for
CREATE MATERIALIZED VIEW AS
schema change job descriptions. #107471 - Reduced contention on the
system.statement_statistics
table which has caused the SQL statistics compaction job to fail. #107573 - The
ST_ClosestPoint
spatial function previously did not preserve the correct SRID when comparing two different points. This is now resolved. #107595 - CockroachDB would previously crash when evaluating the
ST_AsEncodedPolyline
builtin function on aGEOMETRYCOLLECTION
geometry type. The bug was introduced before CockroachDB v22.1 and is now fixed. #107901 - Fixed a bug where dropping an index could end up failing or cleaning foreign keys (when
CASCADE
is specified) on other tables referencing the target table with this index. #107793 - Fixed a bug where CockroachDB would return an error when using
SHOW RANGE ... FOR ROW ...
in aCREATE TABLE AS
construct. #107603 - Cloud buckets containing backups can now be copied via AWS DataSync and other third-party services which insert empty objects with a trailing
/
. Previously, restore would fail with the following error message:read LATEST path: path does not contain a completed latest backup: NoSuchKey
. #106235 - Fixed a bug where
DROP COLUMN CASCADE
involving a primary key column could end up hanging. #107987 - Fixed a nil pointer dereference caused by a race condition when using the
to_char
builtin function. #108079 - Since v22.2.0, using a PTP clock device (enabled by the
--clock-device
flag) 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 HLC clock into the far future. #108113 - 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 OOMs. The bug had been present since at least v22.1 and has now been fixed. #107368 - When losing a leaseholder and using lease preferences, the lease can be acquired by any other replica (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. #107625
- Fixed the schema changer job when
CREATE AS
sources fromSHOW CREATE FUNCTION
, e.g.:CREATE TABLE t AS SELECT * FROM [SHOW CREATE FUNCTION f]
. #108195 - Added cancel checking to index constraint initialization code to allow queries to timeout during query optimization if analyzing predicates to constrain an index starts using too many resources. Example of setting a timeout using the
statement_timeout
session setting:SET statement_timeout='5.0s';
#106942 - Previously, CockroachDB could encounter an internal error
unexpected non-zero bytes limit for txnKVStreamer
when evaluating locality-optimized lookup joins in case it had to perform the remote regions' lookup. The bug was introduced in v22.2 and is now fixed. A temporary workaround can be accomplished without upgrading by setting thestreamer_enabled
session variable:SET streamer_enabled = false;
. #108251 - Fixed a spurious error
no data source matches prefix
that could occur during planning for a query withDISTINCT ON
andORDER BY ASC NULLS LAST
orORDER BY DESC NULLS FIRST
. #108303 - Fixed an optimizer costing bug introduced in v23.1 that could cause a query involving two or more joins with
REGIONAL BY ROW
tables to not pick the most optimal lookup joins. #108308 - Fixed an optimizer costing bug introduced in v23.1 that could cause a query whose best-cost query plan is a string of lookup joins with
REGIONAL BY ROW
tables, one after the other in sequence, to not pick the most optimal join plan. #108308 - Previously, using
IMPORT INTO
forDELIMITED DATA
or MySQL imports would error withcolumn ... does not exist
if it was importing into a collated string column. This is now fixed. #108286 - Fixed a bug introduced in v23.1 that could cause the precision of some values to be incorrectly truncated for a query with a correlated subquery 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.,
DECIMAL(10, 0)
vsDECIMAL(10, 2)
orNAME
vsCHAR
. #108198 - Fixed a bug where
BEGIN
,COMMIT
,SET
,ROLLBACK
, andSAVEPOINT
statements would not be written to the execution or audit logs. #108411 - Fixed a bug where a session migration performed by
SHOW TRANSFER STATE
would not handle prepared statements that used theAS OF SYSTEM TIME
clause. Users who encountered this bug would see errors such asexpected 1 or 0 for number of format codes, got N
. This bug was present since v22.2.0. #108548 - Fixed errors on the Sessions page in the DB Console when a session's memory usage is zero bytes. #108733
- Fixed a bug introduced in v22.1 that could cause a join 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. #108821
- Fixed an issue with the full scan filter on the Statements page where the filter was always evaluating to false, even if a full scan had occurred. #109254
- Fixed a bug that could cause CPU usage to increase over time. #109298
- Fixed a bug that could cause some rows to be silently skipped during
IMPORT
when a node's import worker failed. #109664 - Fixed a bug in geospatial queries, where a query filter of the form
ST_Distance(geog1, geog2) > constant
, orST_MaxDistance(geom1, geom2) > constant
, where the operator is one of>
,<
,>=
,<=
, or a filter of the formST_Distance(geog1, geog2, false) = 0
may mistakenly evaluate totrue
when one or both of the inputs isNULL
or an empty geography or geometry. More rows could be returned by the query than expected. #109395 - Fixed an issue where a split can be called on an invalid key that's in the form of
someValidKey.Next()
during restore. This split key can land in the middle of a row with column families, and thus result in failing SQL queries when querying the restored table. #109778 - Fixed an issue where a split can be called on an invalid key that's in the form of
someValidKey.Next()
during restore with the cluster settingbulkio.restore.use_simple_import_spans=true
. This split key can land in the middle of a row with column families, and thus result in failing SQL queries when querying the restored table. #109939 - Fixed a bug that caused a flood of requests to refresh cluster settings on the Advanced Debug page. If a user would like to see the effect of a modified cluster setting in DB Console, a page reload is now required. #108125
Performance improvements
- Backups no longer perform work proportional to the number of pending write intents that they encounter, so they are more than 100x faster when encountering long-running, bulk writing transactions. #105526
- Queries that access
pg_catalog
andinformation_schema
that perform introspection on other tables in those schemas are now significantly faster. #109736
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.8.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.8.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.8.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.8.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.8.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.8.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.8.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.8.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.8
Source tag
To view or download the source code for CockroachDB v23.1.8 on Github, visit v23.1.8 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.7...v23.1.8
Enterprise edition changes
Azure Blob Storage credentials for implicit authentication can now be stored in a file with the following YAML format:
azure_tenant_id: {MY_TENANT_ID}, azure_client_id: {MY_CLIENT_ID}, azure_client_secret: {MY_CLIENT_SECRET}
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 theDefaultAzureCredential
class, such as environment variables and Managed Identity. These credentials can also be used for encrypted backups. #106688
Bug fixes
- Fixed a bug where
DROP INDEX ... CASCADE
could drop unrelated foreign key constraints. For example, ifDROP INDEX ... CASCADE
was executed on a unique index for aTable A
, and if aTable B
had a foreign key reference toTable A
, unrelated outbound foreign key constraints onTable B
would be dropped. #107793 - Fixed a bug that would result in corruption of encrypted data at rest on a cluster node. 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 quorum. For more information, refer to Technical Advisory 106617. #107277
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.7.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.7.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.7.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.7.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.7.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.7.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.7.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.7.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.7
Source tag
To view or download the source code for CockroachDB v23.1.7 on Github, visit v23.1.7 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.6...v23.1.7
SQL language changes
- Added the
crdb_internal.reset_activity_tables
built-in function to allow users to reset the statistics in thesystem.{statement|transaction}_activity
tables. Users require theadmin
role to use this built-in function. #106129 - Added the
sql.telemetry.query_sampling.internal.enabled
cluster setting, which isfalse
by default. If set totrue
, internal app queries will be reported to telemetry when query sampling to telemetry is enabled. #107182
DB Console changes
- Added a timescale label to the Diagnostics tab of the Statement Details page. The time window for the statement diagnostics is now displayed. #107082
- Increased the timeout duration for loading the Hot Ranges page to 30 minutes. #107497
Bug fixes
- The Regions/Nodes column on the Database and Database Details pages will now render properly. This column displays for clusters with more than 1 node. #105824
- Fixed a bug where the Job Details page would flicker between the job details and a loading animation while a job is still executing. #106153
- Fixed a bug where the Key Visualizer page would crash due to an invalid conversion to
int
error. #106357 - Fixed a bug that caused an infinite re-render on the Key Visualizer page when a custom time period was selected. #106430
- Fixed a bug on the SQL Activity, Statements page 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 Statements page will function as expected. #106434
- Fixed a bug where the Metrics page was not updating automatically on rolling window options. #106766
- Fixed a bug where statement diagnostics on the Statements page were not always showing. This is now fixed with statement diagnostics displaying for the correct time period. #106766
- Fixed a bug where the Sort dropdown on the Network Latency page would not persist the selected value because a page reload was triggered. #107213
- Fixed a bug where the index recommendation on the Insights page 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. #107218
- Fixed a bug where changefeeds would fail when upgrading to version v23.1.5 because the job record did not have a
clusterID
field set. #106399 - Fixed a bug where
UPDATE
,UPSERT
,DELETE
statements running concurrently withALTER TABLE..ADD COLUMN
of a virtual computed column on the same table would fail. #107403 - Fixed a bug where SQL statistics compaction jobs would fail. This is now fixed by reducing the contention on the
system.statement_statistics
table. #107573 - Fixed a bug where running a changefeed that targets a table with a user-defined type column and with the
envelope
option set to any value other thanwrapped
would cause a node panic due to a nil dereference. [#119746][119746]
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.6.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.6.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.6.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.6.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.6.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.6.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.6.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.6.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.6
Source tag
To view or download the source code for CockroachDB v23.1.6 on Github, visit v23.1.6 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.5...v23.1.6
Bug fixes
- Fixed a bug in v23.1.5 where debug zips were empty in the
crdb_internal.cluster_settings.txt
file. Debug zips now properly show the information fromcluster_settings
. #107105 - 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
ALTER PRIMARY KEY
was used on v21.1 or earlier, and the cluster was upgraded. #106426 - Extended the
cockroach debug doctor
to detect indexes which could potentially lose data by being dropped when a column is stored inside them and added a check insideDROP INDEX
to prevent dropping indexes with this problem to avoid data loss. #106863
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.5.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.5.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.5.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.5.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.5.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.5.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.5.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.5.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.5
Source tag
To view or download the source code for CockroachDB v23.1.5 on Github, visit v23.1.5 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.4...v23.1.5
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. #105370
Enterprise edition changes
- Added new cluster settings in the
server.oidc_authentication.generate_cluster_sso_token
namespace that support using OIDC to generate a JWT auth token for cluster SSO. #105643
SQL language changes
- Improved the inline documentation and error messages related to
SHOW RANGES
. #105278 - Inbound foreign keys on TTL tables are now allowed. #105341
- Added the columns
default_value
andorigin
( with the valuesdefault
,override
,external-override
) to theSHOW CLUSTER SETTING
command. #105452 - Added the
VIEWACTIVITY
andVIEWACTIVITYREDACTED
system privileges for thecrdb_internal.cluster_queries
andcrdb_internal.node_queries
tables. #105467 - Fixed the error message to be more understandable when attempting to create UDFs under a virtual or temporary schema. #105627
Command-line changes
- Running
cockroch node decommission <nodeID>
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. #103933
DB Console changes
- The Range Report page (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. #104980 - Added description to the tooltip for the
Idle
status only for the Active Transactions view. ExcludedIdle
status filter option for the Active Statements view. #105062
Bug fixes
- Added more precision to small percentage values on the percentage bars on the DB Console. #105078
- Fixed a crash when using
DurationToNumber
with empty duration object on SQL Activity tables. #105152 SpanStats
is no longer subject to stale information, and should be considered authoritative. #105000- Fixed a bug in MuxRangefeed implementation that may cause MuxRangefeed to become stuck if enough ranges encountered certain error concurrently. #105186
SHOW CHANGEFEED JOBS
no longer fails on v22.2 and v23.1 mixed-version clusters. #105008GRANT SYSTEM ALL ...
no longer causes the grantee to be unable to log in. This was due to a bug whereALL
would include theNOSQLLOGIN
system privilege. SinceNOSQLLOGIN
is the only "negative" privilege, it is now excluded from theALL
shorthand, and must be granted explicitly in order to restrict logins. #105080- CockroachDB previously could encounter
zero transaction timestamp in EvalContext
when evaluating theCOPY FROM
command. The bug was introduced in v23.1.0 and is now fixed. #105295 - 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. #105315
- Fixed a bug where
INSERT .. ON CONFLICT .. DO UPDATE
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 aDEFAULT
value. #105025 - 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. #105318
- Previously, CockroachDB would crash when evaluating
CREATE TABLE .. AS or CREATE MATERIALIZED VIEW .. AS
statements when theAS
clause selected data fromcrdb_internal.cluster_statement_statistics
orcrdb_internal.cluster_transaction_statistics
virtual tables. The bug has been present since at least v22.1 and is now fixed. #105325 - Fixed a source of mutex contention within the storage engine that could increase tail latencies on high-CPU, high-throughput deployments. #105361
- 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›
. #104246 - 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. #105621 - 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. #105479 - 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. #105725
- Previously, referencing a user-defined type in the body of a user-defined function would result in an error at the time of creating the function. This is now fixed. #105617
- CockroachDB now returns an error during UDF creation if an input argument has type
RECORD
. #105735
Performance improvements
- If the
sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled
cluster setting is disabled, the optimizer can now eliminate uniqueness checks forSTRING
andBYTES
columns when the value is set togen_random_uuid()
(with an implicit or explicit cast toSTRING
orBYTES
). If you still want the checks, you can setsql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled
totrue
(the default isfalse
). #105446
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.4.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.4.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.4.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.4.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.4.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.4.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.4.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.4.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.4
Source tag
To view or download the source code for CockroachDB v23.1.4 on Github, visit v23.1.4 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.3...v23.1.4
Security updates
- The new
sql.auth.createrole_allows_grant_role_membership.enabled
cluster setting allows a user with theCREATEROLE
role option to grant and revoke non-admin roles. This cluster setting defaults tofalse
, but is expected to become the default behavior in the future. #104445
Enterprise edition changes
- Fixed an initialization race condition in changefeed schema feeds that could cause a node to crash with a null pointer exception. #104934
SQL language changes
- Users with
MODIFYSQLCLUSTERSETTING
can now view onlysql.defaults
cluster settings instead of all cluster settings. #104542
Operational changes
- The
debug.zip
archive now contains the files formerly located atnodes/*/ranges/*.json
in one file per node,nodes/*/ranges.json
. #104248 - The
http-defaults
andhttp-servers
sections of the log config will now accept aheaders
field containing a map of key-value string pairs which will comprise custom HTTP headers appended to every request. Additionally, acompression
value can now be set togzip
ornone
to select a compression method for the HTTP request body. By default,gzip
is selected. Previous functionality did not compress by default. #104814
Command-line changes
- The new log config option
buffering
allows you to format buffer output as JSON arrays. This is useful for APIs that consume JSON arrays, such as the Datadog logs API. #104790
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. #104874
- The histogram window merge calculation now interpolates quantile values more accurately, and Metrics charts in the DB Console are smoother and more accurate. #104815
Bug fixes
- Fixed a bug where a transaction retry could miss job rows during the backfill of the Jobs table. #104757
- Fixed a bug where admin or root user privileges were erroneously required to use
SHOW SYSTEM GRANTS
. #104732 - Fixed a bug that prevented display of the column selector on the Jobs page. #104738
- Fixed a bug where an invalid split could crash and prevent restarts of nodes that hold a replica for the right-hand side. #104850
- 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. #104774 - Fixed a metric bug that could cause volumes such as RAID logical volumes to be counted twice.#104806
- 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. #104968
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 v22.2.x. 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.preserve_downgrade_option
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.3.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.3.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.3.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.3.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.3.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.3.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.3.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.3.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.3
Source tag
To view or download the source code for CockroachDB v23.1.3 on Github, visit v23.1.3 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.2...v23.1.3
Security updates
- The new
server.client_cert_expiration_cache.capacity
cluster setting allows you to configure the minimum time until a user's set of client certificates will expire. Whenserver.client_cert_expiration_cache.capacity
is set to a non-zero value, the new metricsecurity.certificate.expiration.client
tracks the number of client certificates that have expired. #104165
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
cluster setting. #104453 The new
sql.log.user_audit
cluster setting 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
andSTATEMENT_FILTER
:SET CLUSTER SETTING sql.log.user_audit = ' test_role ALL another_role NONE ALL NONE ';
Introduced the
sql.log.user_audit.reduced_config.enabled
cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for thesql.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. #104372
SQL language changes
- When the
sql.trace.stmt.enable_threshold
orsql.trace.txn.enable_threshold
cluster settings is enabled, the logging output is now emitted on theSQL_EXEC
channel. Previously, this was emitted to theDEV
channel. #104047 SHOW GRANTS
now lists privileges inherited by role membership.SHOW GRANTS ON ROLE
statements no longer require any privileges and also lists implicit grantees. #104587
Operational changes
- The new metric
leases.liveness
shows the number of liveness range leases per node to track the liveness range leaseholder. #104076 - 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 prevent password hashing from increasing CPU load. The metric is expected to be0
, or close to0
, 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 connection pools.
- Add more vCPU or more nodes to the cluster.
- Increase the password hashing concurrency using the
COCKROACH_MAX_PW_HASH_COMPUTE_CONCURRENCY
environment variable. #104388
DB Console changes
- Added merge queue failure and merge queue processing time metrics to the Queue Processing Failures and Queue Processing Times graphs respectively. #104034
- Removed the Circuit Breaker Tripped Events graph from the Replication dashboard. #104038
- Added Completed time to Jobs and Job details pages, and updated the time format on those pages to include seconds and milliseconds. #104063
- Added a Created SQL Connections chart on the SQL dashboard under Metrics. #104072
- Added Ranges in Catchup Mode and Rangefeed Catchup Scans Duration charts to the Changefeeds dashboard. #104122
- The sort setting on the Hot Ranges page is now persisted across page reloads and navigation. #104112
- The Databases 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. #103854
- On the Statement Details page, renamed the "Idle Latency" metric to "Client Wait Time" and separated it into its own chart. #103915
- Added more search criteria options on the SQL Activity page:
- For the Top dropdown:
1000
,5000
, and10000
. - 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. #104054
- For the Top dropdown:
- Added a new link to the Range Status page on the Replication dashboard that opens the Enqueue Ranges page with the node ID already completed. #104100
- The DB Console will no longer show
DROP INDEX
recommendations for unique indexes. #104287 - On the Transactions tab of the SQL Activity page, the Status will be
Idle
if the executing transaction is not currently executing a statement. Previously, the status would beExecuting
. #103925 - Fixed the job that updates the
statement_activity
andtransaction_activity
tables on the SQL Activity 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. #104340
Bug fixes
- Fixed a panic that could occur while a
COPY
statement is logged for telemetry purposes. #103848 - Fixed a bug where disk space used by deleted and garbage collected data would not be reclaimed in a timely manner, especially when a store has low-write workload. #103865
- 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
. #103849 - Fixed a bug where
COPY
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. #103393 - Fixed a bug where running a
debug
command 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. #102877 - Fixed a bug where
SHOW DEFAULT PRIVILEGES
did not work correctly if the database name or schema name being inspected had upper-case or special characters. #103952 - Fixed a bug that could cause queries with joins or subqueries to omit rows where column values are
NULL
in very rare cases. This bug was present since v20.2. #103803 - Fixed a bug that could cause goroutines to hang during SCRAM authentication. #104197
- The
sys.cpu.combined.percent-normalized
metric now usesGOMAXPROCS
, if lower than the number of CPU shares when calculating CPU utilization. #104191 - The warning message about a missing
--advertise-addr
flag is no longer displayed when the flag is specified on server start. #104227 - Fixed a rare bug where stale multi-column table statistics could cause table statistics forecasts to be inaccurate, leading to un-optimal query plans. #104229
- Fixed a bug in v23.1.0 where the
node_id
field would be omitted from logs. Thenode_id
value has now been restored to the logs. #103798 - Fixed a bug where the collection of
KV bytes read
andKV gRPC calls
execution statistics duringEXPLAIN ANALYZE
could be incorrect (it would remain at zero) in some cases. The bug was introduced in the v23.1.0 release. #104194 - Fixed an incorrect results bug in v22.2.10 and v23.1.2 and above when the
optimizer_use_improved_computed_column_filters_derivation
session setting istrue
. Predicates on computed columns are derived when an ORed predicate on a column in the computed column expression is present. #104276 - The
keyvisualizer
job 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. #104374 - 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. #103876
- Fixed a bug which could cause a panic when a
CREATE FUNCTION
statement used thesetval()
built-in function. #104297 - Fixed a rare race condition that could allow large restore jobs to fail with an
unable to find store
error. #100955 - Fixed a bug where CockroachDB would not ignore the messages that it should, if there was an error while in the PostgreSQL extended protocol. #104459
- Fixed a bug in which some Google Cloud Platform-related errors would be returned with an uninformative error. #104065
- 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. #104515
- 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 contention and transaction retries. #104574 - Fixes a bug in which
SHOW BACKUP
would fail to show a locality-aware backup that contained incremental backups. #103761
Performance improvements
- If
transaction_rows_read_err
is set to a non-zero value, CockroachDB now ensures that any single scan never reads more thantransaction_rows_read_err
+ 1 rows. This prevents transactions that would error due to thetransaction_rows_read_err
setting from causing a large performance overhead due to large scans. #104364 - 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. #104590
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.2.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.2.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.2.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.2.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.2.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.2.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.2.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.2.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.2
Source tag
To view or download the source code for CockroachDB v23.1.2 on Github, visit v23.1.2 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.1...v23.1.2
Backward-incompatible changes
- Schema names in the
search_path
session variable now respect case and must be delimited with double quotation marks. Previously, if asearch_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 the
INFO
level in theSQL_EXEC
log channel. Previously, these were logged at theERROR
level. #101094
Enterprise edition changes
- CDC queries now support wrapped envelope with diff (
envelope='wrapped', diff
). #101392 - Changefeeds using the
WITH confluent_schema_registry
option will make fewer duplicate schema registrations. #100844 - Added logic to set the cluster's multi-region system database's survival goal to the max non-system database's survival whenever an
ALTER DATABASE...SURVIVE...FAILURE
is issued. #102379 - Cluster SSO using JSON web tokens (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
cluster setting with an empty string or "sub" equivalent to the previous behavior. #103526
SQL language changes
- Added a new session variable
unbounded_parallel_scans
, which controls whether scans will be parallelized across ranges in more cases. Note that using this feature can lead to increased likelihood of out-of-memory errors (OOMs), 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 queries withLIMIT
s aren't affected by this variable; cross-range parallelism of scans continue to be disabled for such queries. #100948 - Statements of type
SET ...
are not longer displayed on the Insights page. #101669 - Fixed
crdb_internal.transaction_contention_events
, so it generates even if an error occurs when getting the names. #101870 - Added a new SQL activity updater job which updates the
system.transaction_activity
andsystem.statement_activity
tables based on the statistics tables. #101996 - Added two views to the
crdb_internal catalog
:crdb_internal.statement_activity
, which surfaces data in thepersisted system.statement_activity
table andcrdb_internal.transaction_activity
, which surfaces thesystem.transaction_activity
table. #102002 - Tables with Row-level TTL settings can now have outbound foreign keys. #101874
- Span statistics are now unavailable on mixed-version clusters. #101877
- Introduced the
to_char(date, format)
built-in function, which converts a given date to a string using the given format string. #102989 - Renamed an existing metric
changefeed.table_metadata_nanos
tochangefeed.schemafeed.table_metadata_nanos
and introduced a new metricchangefeed.schemafeed.table_history_scans
, which records the number of table history scans the schema feed performs. #102977 - Changed the
OID
generation forpg_catalog
. For examplecolumn
,index
andconstraint
OID
's will have different values.Relation
,type
andfunction
OID
's remain unchanged. #103556 - Added a new session setting
optimizer_use_improved_computed_column_filters_derivation
, which defaults toFALSE
. WhenTRUE
, the optimizer will derive filters on computed columns in more cases. #103412 Crdb_internal.transaction_contention_events
,crdb_internal.node_contention_events
, andcrdb_internal.cluster_locks
will now redact keys provided the user hasVIEWACTIVITYREDACTED
.Crdb_internal.node_contention_events
can only be viewed if the user has any ofadmin
,VIEWACTIVITY
orVIEWACTIVITYREDACTED
. #103637
Operational changes
- Added the
rebalancing.replicas.cpunanospersecond
histogram metric, which provides insight into the distribution of replica CPU usage within a store. #100509 - Added the
rebalancing.replicas.queriespersecond
histogram metric, which provides insight into the distribution of queries per replica within a store. #100509 - The amount of replication traffic in flight from a single Raft leader 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
. #101507 - Added the metric
leases.requests.latency
, which records a histogram of lease request latencies. #100475 - When local corruption of data is encountered by a background job in the storage engine, a node will now exit immediately. #102274
- When the
--experimental-dns-srv
flag is enabled, thecrdb
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. #102468 - 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. #103073 - Workload generators now export Go runtime metrics via Prometheus endpoint. #102392
- Multi-region Serverless databases that are created without a primary region will now inherit regions from the Serverless cluster's regions. #102627
Command-line changes
- The
cockroach debug zip
command now accepts an--include-range-info
flag, which determines whether CockroachDB retrieves individualnodes/*/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 toFALSE
. #102862 - Workload now jitters the teardown of connections to prevent a thundering herd of queries impacting P99 latency results. #102395
- Workload utility now has flags to tune the connection pool used for testing. See
--conn-healthcheck-period
,--min-conns
, and--max-conn-*
flags for details. #102395 - Workload now supports every PostgreSQL query mode available via the underlying
pgx
driver. #102395 - The
\connect
client-side command for the SQL shell (included incockroach sql
,cockroach demo
,cockroach-sql
) now recognizes the optionautocerts
as its last argument. When provided,\c
will now try to discover a Transport Layer Security (TLS) 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. #103144
DB Console changes
- The
Application Name
column is now shown by default in the Fingerprints Overview pages. Statements and transactions fingerprints will be displayed per application on the Overview pages rather than grouped into a single fingerprint ID. #101164 - When going from the Fingerprints Overview pages or the Insight Details 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. #101164
- Updated the Network Latency side nav name and Network Diagnostics page title to Network. Updated the Advanced Debugging page title to Advanced Debug. #101758
- Added an option to select the trace rate for Statement Diagnostics collection. #101759
- Added a time scale selector to the Statement Diagnostics page, making it possible to see bundles only from the selected period. #101802
- Added draining node as its own value on the DB Console Overview page, instead of counting it as a dead node. #101793
- Added the ability for users to view timestamps in DB Console in their preferred timezone via the cluster setting
ui.display_timezone
. Previously, only the timezones Coordinated Universal Time and America/New_York were supported. #102195 - An alert on DB Console Overview page is shown when the cluster setting
cluster.preserve_downgrade_option
is set, and no longer waits 48 hours to show. #102913 - Added Transaction Insights for Serverless. #103363
- Added
_status/load
to the list of Raw Status Endpoints on the Advanced Debug page. #103420 - If a page crashed, a force refresh is no longer required to be able to see the other pages on DB Console. #103328
- The filter on the SQL Activity page is now working properly. Fixed the type on the JSON object from
stmtTyp
tostmtType
. #103411 - Added missing information on the Index Details page about latency information of most used fingerprints. #103421
Bug fixes
- Fixed the
sql.mem.distsql.current
metric so it would no longer double count the memory usage of remote DistSQL flows. #100049 - 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 node shutdown. 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. #100841 - Fixed a bug that caused a restore to fail occasionally due to incorrect schema ID resolution when restoring a backup with user-defined schemas. #101309
- Fixed a bug that caused suboptimal query plans to be generated by the optimizer 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 table statistics forecasts created a forecasted bucket with an infinite value. #101135 - Fixed a rare internal error in the optimizer that existed since before v22.1, which could occur while enforcing orderings between SQL operators. #101173
- Fixed a bug so that
crdb_internal.deserialize_session
internal function works properly with prepared statements that have more param type hints than params. #101367 - Fixed a bug that caused internal errors when executing user-defined functions with empty bodies. This bug was only present in alpha pre-release versions of 23.1. #101382
- The
search_path
session variable now supports schema names that have commas in them. Also, fixed a bug in parsing asearch_path
with a quote in it when specified in the connection string. #101493 - Fixed a bug that has existed since user-defined functions were introduced that could cause a function call to resolve to the wrong function after changes to the schema
search_path
. #101491 - Fixed an internal error that could occur when the
enforce_home_region
session setting is on and the input to the lookup join is aSELECT
of scalar expressions (e.g.,1+1
). Also, subqueries with no home region now error out withenforce_home_region
set. #101483 - Previously, CockroachDB alpha and beta versions of 23.1 would panic on
cockroach start
command when theGOMEMLIMIT
environment variable was set and the--max-go-memory
flag wasn't specified. This is now fixed. #101564 - Fixed a bug whereby some tables' physical disk space could not be calculated by the storage engine. #100939
- Fixed a bug that caused errors in test builds and potentially incorrect results in release builds when invoking a user-defined function with a subquery argument. This bug was only present in v23.1 alpha versions. #101641
- Point inserts and updates that write to a remote region of a table created with the
REGIONAL BY ROW AS
clause will now error out. - Fixed a bug in the built-in functions
pg_get_indexdef
andcol_description
that could cause the functions to return errors if the user created tables namedpg_indexes
orpg_attribute
. Or, if the user created a schema namedsystem
with a table namedcomments
. This bug was only present in pre-release versions of v23.1. #101688 - The descriptions of
rebalancing.readbytespersecond
andrebalancing.writebytespersecond
metrics now correctly reference bytes read and bytes written, respectively. #101709 - Fixed a bug to ensure that the list of fingerprints used per index is shown even when there is a max-size limit on the SQL API. #101783
- Fixed a bug where, when CockroachDB failed to retrieve contention information, the full Insights page would return an error. Now, the Insights page will load even when there is an issue with decoding contention information. #101782
- Fixed a bug where a
RESTORE
operation withskip_localities_check
could fail with errors if regions were missing on a cluster. #101797 - Fixed a bug in the optimizer that could cause an internal error in rare cases for a query with outer joins that could be simplified to non-outer joins and at least one semi-join. This bug was present since before v22.1. #100670
- Fixed a bug where CockroachDB previously incorrectly evaluated
EXPORT
statements that had projections or rendering on top of theEXPORT
(e.g. the common table expressionWITH 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. #101805 - Fixed a bug in the optimizer introduced in v22.2.0 that could cause queries containing a subquery with a lateral join, in which the right side of the lateral join was an aliased data source, 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 aggregate function. #101863
- 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. #102027 - Fixed a potential bug whereby a failed or cancelled
IMPORT
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. #101443 - Fixed a bug that could cause incorrect results for queries invoking
STRICT
user-defined functions. This bug was only present in pre-release versions of 23.1. #101950 - Fixed a bug where CockroachDB's pgwire 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. #101596
- Fixed a very rare bug that could cause keys to be unexpectedly deleted locally within a store by replica rebalancing during a write heavy workload. #102167
- Fixed a bug in the behavior of the
enforce_home_region
session variable 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 onREGIONAL BY ROW
tables. Also, fixed static erroring of some locality-optimized lookup joins to now be handled dynamically during query execution. #102207 - Fixed a bug introduced in testing releases of v23.1 where a node could crash when evaluating a
COPY
command when the schema hadINT2
orINT4
type. #102306 - Fixed a bug where a backup with a key's revision history split across multiple SST files may not have correctly restored the proper revision of the key. #102343
- Fixed a bug in testing releases of v23.1 where a user could be prevented from logging in or viewing or changing
GRANT
s if the cluster had a long enough period of inactivity. #102489 - Previously, CockroachDB could encounter a "command is too large" error when evaluating
UPSERT
statements such that the new values combined exceeded the size of thekv.raft.command.max_size
cluster setting. This bug had been present since before v21.1 and initially all write operations (INSERT
,UPDATE
,DELETE
) were affected; however, in v21.2 those three were fixed, butUPSERT
was forgotten about. This is now fixed. #102514 - 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 privilege errors. For the bug to occur, two databases would need to have duplicate tables each with a foreign key reference to another table. The error would then occur if the same SQL string was executed against both databases concurrently by users that have privileges over only one of the tables. #102626
- Fixed a bug where
RENAME COLUMN
was incorrectly allowed and would modify these columns node-wide. #102460 - Fixed a bug where the internal
node
pseudo-role was not viewable through introspection ofpg_catalog
tables. #102662 - Fixed a bug where
COPY ... TO
statements would always fail when used in a prepared statement. CockroachDB now matches the pgwire handling of preparedCOPY ... TO
statements. #102663 - Fixed a bug where the
ALTER DEFAULT PRIVILEGES ... GRANT USAGE ON SEQUENCES
statement would fail because the sequence object was mapped to an incorrect internal privilege object. #102724 - Fixed a minor bug that caused an internal error for some queries with nested subqueries 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. #102384
- Fixed a bug that allowed values to be inserted into an
ARRAY
-type column that did not conform to the inner-type of the array. For example, it was possible to insertARRAY['foo']
into a column of typeCHAR(1)[]
. This could cause incorrect results when querying the table. The insert now errors, which is expected. This bug was present since v21.1. #102807 - Fixed an issue where running
SHOW HISTOGRAM
to see the histogram for anENUM
-type column could cause a panic and crash the cockroach process. This issue has existed since v20.2.0. #102828 - Fixed the behavior of user-defined functions (UDFs) 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. #102188
- Fixed a bug in closed timestamp 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. #102601
- Fixed a bug where Row-level TTL 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 ..."
. #102881 - The
Retry.Max
field of thewebhook_sink_config
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 ofRetry.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. IfRetry.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. #102958 - Stopped using a
NULL
value forpg_constraint.conparentid
. Now the value is hard-coded to0
, since CockroachDB does not support constraints on partitions. #103234 - Fixed a bug where
COPY
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. #103355 - Optimized over-head of
pg_catalog.pg_description
andpg_catalog.pg_shdescription
, which can lead to performance regression relative to v22.2 #103331 - Timeseries metric 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. #103444 Fixed a bug where CockroachDB could produce incorrect results when evaluating queries with
ORDER BY
clause in rare circumstances. In particular, some rows could be duplicated if all of the following conditions were met:- The query had a
LIMIT
clause. - The
SORT
operation had to spill to disk (meaning thatLIMIT
number of rows used up non-trivial amounts of memory, e.g. the rows were "wide"). - 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. #102790
- The query had a
Fixed a bug where CockroachDB could previously encounter a nil pointer crash when populating data for SQL Activity page in some rare cases. The bug was present in v22.2.9 and v23.1.1 releases. #103521
Fixed calls to undefined objects. #103520
Fixed a bug where
0
withexponents < -6
would display as0E(exponent)
instead of printing all0
s, e.g.0E-7
should be0.0000000
. #103640Fixed a bug that could prevent
RESTORE
from working if the backup had a refresh materialized view mutation in it. #103233In earlier patch releases of v23.1, it was possible for backups 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-disabledadmission.elastic_cpu.enabled
cluster setting. #103626Fixed a crash/panic that could occur if placeholder arguments were used with the
with_min_timestamp(to_timestamp($1))
functions. #103630Fixed a panic that could occur if a
COPY TO
statement had a subquery that was logged with redaction markers. #103689Fixed a bug where
SET PRIMARY REGION
andSET SECONDARY REGION
did not validate transactionally, which could prevent cleaning up removed regions after a restore. #103631DROP ROLE
now correctly returns a 2BP01 error when the given role has been granted privileges on a schema. #103546Fixed 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. #103775When the option
WITH TABLES
orWITH INDEXES
is passed toSHOW RANGES
, 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. #103777Fixed a bug in
VALUES
clauses containing a call to a record-returning UDF that could manifest as an internal error in some queries. #103639Fixed a bug with choosing optimal plan where prepared statements using placeholders in recursive CTEs sometimes did not re-optimize correctly after plugging in the parameters. #99823
Fixed a bug where
kv
was read when fetching a qualified name of a leased UDF. #103089
Performance improvements
- Added an opt-in pacing mechanism to rangefeed closed timestamp notifications. Pacing is controlled by the
kv.rangefeed.closed_timestamp_smear_interval
cluster setting, which defaults tokv.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. #99946 - Queries that have subqueries in equality expressions are now more efficiently planned by the optimizer when
optimizer_hoist_uncorrelated_equality_subqueries
is set totrue
. #101753 - SQL Activity 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. #102309
- Statistics on the
system.jobs
table are now automatically collected, which will enable the optimizer to produce better query plans for internal queries that access thesystem.jobs
table. This may result in better performance of the system. #102637 - Improved changefeeds 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 to1s
. To enable this performance improvement, users should "lock" the watched table withALTER TABLE <tbl> SET (schema_locked =t);
, 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 withALTER TABLE <tbl> RESET schema_locked
. 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. #102977 - Improved performance when joining with the
pg_description
table. #103331 - Added concurrency to speed up the phase of the restore that ingests backed up table statisitcs. #102694
- Added support for constrained scans using computed columns which are part of an index when there is an
IN
list orOR
'ed predicate on the columns that appear in the computed column expression. #103412 - Added two new statistics which are useful for tracking the efficiency of snapshot transfers. 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. #101837
Build changes
- Updated the reported
Build Tag
for nightly (non-release) builds. #101998
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.1.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.1.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.1.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.1.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.1.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.1.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.1.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v23.1.1.darwin-11.0-arm64.tgz (SHA256) |
|
Windows (Experimental) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach:v23.1.1
Source tag
To view or download the source code for CockroachDB v23.1.1 on Github, visit v23.1.1 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0...v23.1.1
Bug fixes
- In CockroachDB v23.1.0 and its testing releases, executing
COPY
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-copied to be encoded correctly. This has now been fixed. See Technical Advisory 103220 for more information. #103323
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 upgrade to CockroachDB v23.1.
Downloads
Changelog
View a detailed changelog on GitHub: v23.1.0-rc.2...v23.1.0
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 what's new in v23.1 in our docs.
The features highlighted below are freely available in CockroachDB self-hosted and do not require an enterprise license to test enterprise features in a local, temporary cluster.
- SQL
- Security and compliance
- Recovery and I/O
- Database operations
- Backward-incompatible changes
- Deprecations
- Known limitations
- Additional resources
SQL
Queries
Feature | Description |
---|---|
Full-text search using TSVector and TSQuery |
A 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 apps |
If you have functionality that requires low latency and cannot tolerate delays between regions, you can enable the |
Streamline migrations with improved COPY performance |
Enhancements to the functionality behind COPY statements resulted in 2x faster migrations using AWS DMS. |
Redact PII from statement bundles |
Leverage statement bundles for debugging without introducing data privacy concerns. You can now redact personally identifiable information (PII) from statement bundles for PCI compliance. |
User-Defined Function (UDF) enhancements |
User-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
UDFs can now also be used in Changefeed expressions (Enterprise) and |
DELETE FROM ... USING |
We have added support for the |
Schemas
Feature | Description |
---|---|
Support user-defined composite types |
You 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 UDFs |
The statements |
Declarative schema changer fully supports constraints |
The statements |
Add configurable setting to adjust grant lease options |
A new session variable 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, see |
Sessions
Feature | Description |
---|---|
New SQL shell editor with tab completion |
The 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) |
The multiple 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 asyncpg |
CockroachDB 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
Feature | Description |
---|---|
Improvements to the redaction of data in observability artifacts |
We 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 binaries |
FIPS-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 changefeeds |
See this item in Change Data Capture (Changefeeds). |
Support encrypted backups with keys stored in Azure Key Vault |
You can now take and restore encrypted backups using RSA keys stored in Azure Key Vault. |
Expand on External Connections for Changefeeds |
See the Changefeeds section for more information. |
New fine-grained system privilege to view all jobs |
The new |
Recovery and I/O
Change data capture (Changefeeds)
The following are enterprise-only features. Request a 30-day trial license to try them out.
Feature | Description |
---|---|
Create scheduled exports using changefeeds |
Changefeeds 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 sink |
The use of a webhook sink to deliver changefeed messages to an arbitrary HTTPS endpoint has been promoted from Preview to GA. |
CDC Queries |
CDC Queries (formerly CDC Transformations) have been promoted from Preview to GA. |
Use External Connections (GA) to remove a data exfiltration vector |
Use external connections to specify and interact with resources that are external from CockroachDB. With 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 locality |
|
Improved changefeed resilience |
Changefeeds 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 changefeeds |
Oauth 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
Feature | Description |
---|---|
Support longer incremental backup chains |
We now support up to 400 incremental backups, an 8x increase, enabling you to preserve your data even more effectively (reducing RPO) while being more cost-efficient. Incremental backups contain only the data that has changed since the last backup, so they are smaller and faster to produce. |
Restrict backups to a locality |
|
Support implicit authentication on Azure |
You 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 Vault |
You can now take and restore encrypted backups using RSA keys stored in Azure Key Vault. |
Enforce supported backup versions |
To 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
Feature | Description |
---|---|
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 metrics |
We 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 metrics |
Easily 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 pages |
Reliably 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 statement |
Observability 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
Feature | Description |
---|---|
Decommission Pre-Flight Checks |
Decommissioning 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 replicas |
Delegated 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 recovery |
The 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 upgrading to CockroachDB v23.1, 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()
function in favor of acdc_prev
tuple. This is an incompatible change that may break changefeeds that use the previouscdc_prev()
function. #85177 SHOW RANGES FOR TABLE
now includes rows for all indexes that support the table. Prior to this change,SHOW RANGES FOR TABLE foo
was an alias forSHOW 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 usingSHOW RANGES FOR INDEX foo@primary
. The statement output now also includes the index name. #93545CockroachDB 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
andindex_name
incrdb_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 ofSHOW RANGES
is retained, but you should consider setting thesql.show_ranges_deprecated_behavior.enabled
cluster setting tofalse
. 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 theSHOW RANGES
statement instead, optionally usingWITH 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
#93644
- Instead of:
- The aforementioned columns in the
When the cluster setting
sql.show_ranges_deprecated_behavior.enabled
is set tofalse
(recommended in v23.1), the format of the columnsstart_key
andend_key
forSHOW RANGES FROM DATABASE
andSHOW 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. #93644When the cluster setting
sql.show_ranges_deprecated_behavior.enabled
is set tofalse
(recommended in v23.1), the output ofSHOW RANGES
no longer includesrange_size
,range_size_mb
,lease_holder
, orlease_holder_localities
by default. This ensures thatSHOW RANGES
remains fast in the common case. Use the new optionWITH DETAILS
to include these columns. #93644The format of the columns
start_key
andend_key
forSHOW RANGE ... FOR ROW
has been changed to be consistent with the output ofSHOW RANGES FROM INDEX
. #93644Changefeeds 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. #94429Some 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. #96295
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. #94915Previously, the type of the
replicas
,voting_replicas
,non_voting_replicas
andlearner_replicas
incrdb_internal.ranges
were overridden toINT2VECTOR
causing incompatible indexing between.ranges
and.ranges_no_leases
. Now the types of those columns in the two tables are set toINT[]
. #96287The output of the
SHOW RANGES
command for thecrdb_internal.ranges
andcrdb_internal.ranges_no_leases
tables has been updated, and the previous output is deprecated. To enable the new command output, set thesql.show_ranges_deprecated_behavior.enabled
cluster setting tofalse
. The new output will become default in v23.2. #99618Previously, if a user specified a
search_path
in the connection string parameters, it would always be treated as case sensitive. Now, in order to have the schema names in thesearch_path
respect case, the user must include double quotes around the name. #101492The deprecated CLI command
debug unsafe-remove-dead-replicas
has been removed. Usedebug recover
instead. #89150
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.
Category | Description | Change Type | Backport version |
---|---|---|---|
SQL language change | The cluster setting sql.ttl.default_range_concurrency and table storage parameter ttl_range_concurrency are no longer configurable. #89392 |
No longer configurable | v22.2.1 |
SQL language change | The sql.distsql.max_running_flows cluster setting has been removed. #84888 |
Removed | None |
Operational change | The 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. #90789 |
Removed, repurposed | None |
Operational change | The cluster setting server.web_session.auto_logout.timeout has been removed. #90789 |
Removed, defaults to true | None |
Operational change | The 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.) #96128 |
Repurposed | None |
Operational change | The 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. #98250 |
New minimum | None |
Security update | The 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. #97429 |
New setting | v22.2.6 |
Security update | The 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 v22.2. #98254 |
Changed default | v22.2.7 |
Command-line change | The --drain-wait argument to the cockroach node drain command 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. #98390 |
New effect | v22.2.1 |
Bug fix | 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 cluster setting rpc.dialback.enabled . #94778 |
New setting, enabled by default | None |
Bug fix | 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 crdb_internal or pg_catalog system 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. #99443 |
New guidance | v22.2.8 |
Bug fix | The Hot Ranges page 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 cluster setting (default cpu ). Now the page will always collect statistics based on QPS. (Relates to #96128 in this table.) #100211 |
Repurposed setting | No |
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 settingSET allow_ordinal_column_references=true
. Support for ordinal column references is scheduled to be removed in upcoming version v23.2. #93754 - The
CONTROLCHANGEFEED
role option will be deprecated in the future (see issue #94757). With this change, usages of theCONTROLCHANGEFEED
role option will come with a deprecation warning. Its existing behavior remains the same. TheSELECT
andCHANGEFEED
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 cluster settingchangefeed.permissions.require_external_connection_sink.enabled
is added and set tofalse
by default. Enabling this setting restricts users withCHANGEFEED
on a set of tables to create enterprise changefeeds into external connections only. To use a given external connection, a user typically needs theUSAGE
privilege on it. Note thatALTER DEFAULT PRIVILEGES
can be used with both theCHANGEFEED
andSELECT
privileges to assign coarse-grained permissions (i.e., assign permissions to all tables in a schema rather than manually assign them for each table). #94796
- The
- Deprecated the
PGDUMP
andMYSQLDUMP
formats forIMPORT
. They are still present, but will be removed in a future release. See the Migration Overview page for alternatives. #96386
Known limitations
For information about new and unresolved limitations in CockroachDB v23.1, with suggested workarounds where applicable, see Known Limitations.
Additional resources
Resource | Topic | Description |
---|---|---|
Cockroach University | Introduction to Distributed SQL and CockroachDB | This course introduces the core concepts behind distributed SQL databases and describes how CockroachDB fits into this landscape. You will learn what differentiates CockroachDB from both legacy SQL and NoSQL databases and how CockroachDB ensures consistent transactions without sacrificing scale and resiliency. You'll learn about CockroachDB's seamless horizontal scalability, distributed transactions with strict ACID guarantees, and high availability and resilience. |
Cockroach University | Practical First Steps with CockroachDB | This course will give you the tools you need to get started with CockroachDB. During the course, you will learn how to spin up a cluster, use the Admin UI to monitor cluster activity, and use SQL shell to solve a set of hands-on exercises. |
Cockroach University | Building a Highly Resilient Multi-region Database using CockroachDB | This course is part of a series introducing solutions to running low-latency, highly resilient applications for data-intensive workloads on CockroachDB. In this course we focus on surviving large-scale infrastructure failures like losing an entire cloud region without losing data during recovery. We’ll show you how to use CockroachDB survival goals in a multi-region cluster to implement a highly resilient database that survives node or network failures across multiple regions with zero data loss. |
Cockroach University | Introduction to Serverless Databases and CockroachDB Serverless | This 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. |
Docs | Migration Overview | This page summarizes the steps of migrating a database to CockroachDB, which include testing and updating your schema to work with CockroachDB, moving your data into CockroachDB, and testing and updating your application. |
Docs | Developer Guide Overview | This page provides an overview of resources available to developers building applications on CockroachDB. |
Docs | Security Overview | The 23.1 release encapsulates a number of security milestones. See the security overview for a summary. |
Docs | Architecture Overview | This page provides a starting point for understanding the architecture and design choices that enable CockroachDB's scalability and consistency capabilities. |
Docs | SQL Feature Support | The page summarizes the standard SQL features CockroachDB supports as well as common extensions to the standard. |
Docs | Change Data Capture Overview | This page summarizes CockroachDB's data streaming capabilities. Change data capture (CDC) provides efficient, distributed, row-level changefeeds into a configurable sink for downstream processing such as reporting, caching, or full-text indexing. |
Docs | Backup Architecture | This page describes the backup job workflow with a high-level overview, diagrams, and more details on each phase of the job. |
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-rc.2.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-rc.2.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-rc.2.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-rc.2.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-rc.2.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-rc.2.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-rc.2
Source tag
To view or download the source code for CockroachDB v23.1.0-rc.2 on Github, visit v23.1.0-rc.2 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-rc.1...v23.1.0-rc.2
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 privilege errors. For the bug to occur, two databases would need to have duplicate tables, each with a foreign key reference to another table. The error would then occur if the same SQL string was executed against both databases concurrently by users that have privileges over only one of the tables. #102651
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-rc.1.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-rc.1.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-rc.1.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-rc.1.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-rc.1.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-rc.1.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-rc.1
Source tag
To view or download the source code for CockroachDB v23.1.0-rc.1 on Github, visit v23.1.0-rc.1 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-beta.3...v23.1.0-rc.1
SQL language changes
- Two views have been added to the
crdb_internal
system catalog:crdb_internal.statement_activity
surfaces data in the persistedsystem.statement_activity
table, andcrdb_internal.transaction_activity
surfaces thesystem.transaction_activity
table. #102047 - Span statistics are now unavailable on mixed-version clusters. #101878
DB Console changes
- Timestamps are now displayed in DB Console in the timezone specified in the
ui.display_timezone
cluster setting, if set. Currently supported timezones areCoordinated Universal Time
andAmerica/New_York
. #102241 - 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
cluster setting. A background job automatically prunes the system tablestransaction_activity
andstatement_activity
. #101995 - Improved performance when viewing the
crdb_internal.transaction_contention_events
table in DB Console if there are a large number of rows. #101871
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 theEXPORT
, such as the statementWITH 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. #101806 - The descriptions of the
rebalancing.readbytespersecond
andrebalancing.writebytespersecond
metrics now correctly reference bytes read and bytes written, respectively. #101710 - 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 node shutdown. 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. #101884 - Fixed a bug where a
RESTORE
operation withskip_localities_check
could fail with errors if regions were missing on a cluster. #101798 - Fixed a bug introduced in testing releases of v23.1 that could cause incorrect results for queries with
STRICT
user-defined functions. #101951 - Fixed a rare bug that could cause keys to be unexpectedly deleted locally within a store by replica rebalancing during a write heavy workload. #102166
- Fixed a bug where a failed or cancelled
IMPORT
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. #102246 - Fixed a bug in the behavior of the
enforce_home_region
session variable 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 onREGIONAL BY ROW
tables. #102287 - Fixed a bug introduced in testing releases of v23.1 where a node could crash when evaluating a
COPY
command when the schema hadINT2
orINT4
type. #102307 - 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. #102342
- Fixed a bug introduced in testing releases of v23.1 where a user could be prevented from logging in or viewing or changing
GRANT
s if the cluster had a long period of inactivity. #102488 - 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. #102602
- Fixed a bug that caused memory leaks when a closed or cancelled connection was released. #101810
Performance improvements
- SQL Activity 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. #102310
- Static erroring of some locality-optimized lookup joins is now handled dynamically during query execution. #102287
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. #101835
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-beta.3.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-beta.3.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-beta.3.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-beta.3.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-beta.3.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-beta.3.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-beta.3
Source tag
To view or download the source code for CockroachDB v23.1.0-beta.3 on Github, visit v23.1.0-beta.3 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-beta.2...v23.1.0-beta.3
Backward-incompatible changes
- Previously, if a user specified a
search_path
in the connection string parameters, it would always be treated as case sensitive. Now, in order to have the schema names in thesearch_path
respect case, the user must include double quotes around the name. #101492
SQL language changes
- Statements of type
SET ...
are no longer displayed on the Insights page. #101672
Operational changes
- The amount of replication traffic in flight from a single Raft leader 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
. #101508
DB Console changes
- When a user activates diagnostics on the SQL Activity page, there is now an option to select the trace rate for statement diagnostics collection. #101762
- Updated the Network Latency side navigation name and Network Diagnostics page title to Network. Updated the Advanced Debugging page title to Advanced Debug. #101761
- Introduced a "draining node" Node Status on the Cluster Overview panel so that "draining node" has it own value instead of counting as a "dead node". #101794
- Added a time scale selector to the Diagnostics tab under the Statement Details page. This allows users to view bundles from the selected period only. #101803
Bug fixes
- Fixed a bug that caused internal errors when executing user-defined functions with empty bodies. This bug was only present in alpha pre-release versions of 23.1. #101383
- Fixed a bug that caused a restore to fail occasionally due to incorrect schema ID resolution when restoring a backup with user-defined schemas. #101310
- Fixed a bug in parsing a
search_path
with a quote in it when specified in the connection string. Also, thesearch_path
session variable now supports schema names that have commas in them. #101492 - Fixed a bug that has existed since user-defined functions were introduced that could cause a function call to resolve to the wrong function after changes to the schema search path. #101513
- Previously, CockroachDB v23.1 alpha and beta versions would panic on
cockroach start
command when theGOMEMLIMIT
environment variable was set and the--max-go-memory
flag wasn't specified. This is now fixed. #101565 - Fixed a bug that caused errors in test builds and potentially incorrect results in release builds when invoking a user-defined function with a subquery argument. This bug was only present in v23.1 alpha versions. #101639
- Fixed an internal error that could occur when the
enforce_home_region
session setting is on and the input to the lookup join is aSELECT
of scalar expressions (e.g.,1+1
). Also, subqueries with no home region now error out withenforce_home_region
set. #101504 - Point inserts and updates that write to a remote region of a table created with the
REGIONAL BY ROW AS
clause will now error out. #101708 - Fixed a bug in the built-in functions
pg_get_indexdef
andcol_description
that could cause the functions to return errors if the user created tables namedpg_indexes
orpg_attribute
. Or, if the user created a schema namedsystem
with a table namedcomments
. This bug was only present in pre-release versions of v23.1. #101690 - Fixed a bug where, when CockroachDB failed to retrieve contention information, the full Insights page would return an error. Now the Insights page will load even when there is an issue with decoding contention information. #101784
- Fixed a bug to ensure that the list of fingerprints used per index is shown even when there is a max-size limit on the SQL API. #101785
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-beta.2.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-beta.2.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-beta.2.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-beta.2.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-beta.2.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-beta.2.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-beta.2
Source tag
To view or download the source code for CockroachDB v23.1.0-beta.2 on Github, visit v23.1.0-beta.2 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-beta.1...v23.1.0-beta.2
Enterprise edition changes
- CDC queries now support wrapped envelope with diff (
envelope='wrapped', diff
). #101391
SQL language changes
- Added the session variable
multiple_active_portals_enabled
. This setting is only for a preview feature. When set totrue
, 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-onlySELECT
query without sub-queries or postqueries (such as executed by foreign key checks), and such a portal is always executed with a local query plan. #101026
DB Console changes
- Update sort label on Search Criteria to match the name on the table columns on the Statements and Transactions pages. #101126
- By default, we now show the
Application Name
column in the fingerprints overview pages. Statement fingerprints and Transaction fingerprints will be displayed per application on the overview pages rather than grouped into a single fingerprint ID. #101235 - When going from the Fingerprint Overview pages or the Insight Details pages to the Fingerprint Details page for statements or transactions, 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. #101235
Bug fixes
- Fixed a bug so that the text search
@@
operator ("matches") can work with variable expressions. Fixed a bug where incorrect results were returned when one of the arguments was aTEXT
expression and the other argument was aTEXT
orTSQuery
expression. #100918 - Fixed a bug where running
DROP COLUMN ... CASCADE
when that column is used in an index that includes other columns caused a panic. #100856 - Fixed a rare race condition on node startup that could cause an
invalid memory address or nil pointer dereference
error. #100626 - Fixed a bug that was causing nodes running on Windows to crash on startup. This bug only existed in v23.1 alphas. #101091
- Fixed a rare condition that could allow a transaction to get stuck indefinitely waiting on a released row-level lock if the per-range lock count limit was exceeded while the transaction was waiting on another lock. #100946
- Fixed a rare internal error in the optimizer that has existed since before version v22.1, which could occur while enforcing orderings between SQL operators. #101355
- 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 session 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 bycrdb_internal.deserialize_session
. #101368
Performance improvements
- Google Cloud Pub/Sub sink changefeeds can now support higher throughputs by enabling the
changefeed.new_pubsub_sink_enabled
cluster setting. 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 enablechangefeed.new_pubsub_sink_enabled
, the top-level message fields remain all lowercase:{key: ..., value: ..., topic: ...}
. #100930
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-beta.1.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-beta.1.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-beta.1.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-beta.1.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-beta.1.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-beta.1.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-beta.1
Source tag
To view or download the source code for CockroachDB v23.1.0-beta.1 on Github, visit v23.1.0-beta.1 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.9...v23.1.0-beta.1
Enterprise edition changes
- The Avro schema registry URI now allows an additional
timeout=T
query parameter, which allows you to change the default timeout for contacting the schema registry. #99300
SQL language changes
- Changed the GC TTL on the SQL Stats table to 1h on CockroachDB Dedicated and Self-Hosted clusters. This change is not applicable to CockroachDB Serverless clusters. #100359
- When there is no data persisted, show the in-memory data. #100505
- Added two new cluster settings 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: #100662
sql.stats.histogram_samples.count
sql.stats.histogram_buckets.count
- Added two new table storage parameters,
sql_stats_histogram_buckets_count
andsql_stats_histogram_samples_count
. These parameters can be used to override the cluster settingssql.stats.histogram_buckets.count
andsql.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. #100662
Operational changes
- Introduced seven new timeseries metrics for better visibility into the behavior of storage engine iterators and their internals. #100445
- Added a new metric
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
#100421
- Added two new timeseries metrics, providing some observability into the volume of keys preserved by open LSM snapshots: #100878
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 insecure clusters. #100214
Bug fixes
- Fixed a bug which could cause
SHOW CLUSTER SETTING version
to hang and return an opaque error while cluster finalization is ongoing. #100259 - 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. #100307 - The Hot Ranges page 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
cluster setting (defaultcpu
). Now the page will always collect statistics based on QPS. #100211 - 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. #100256 - 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
ALTER TABLE ... ADD/DROP COLUMN
in oneALTER TABLE
statement. #100535 - Fixed an issue where the
enforce_home_region
session setting 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. #100735
Performance improvements
- Audit logging should no longer incur extra latency when resolving table/view/sequence names. #99548
- The webhook sink is now able to handle a drastically higher maximum throughput by enabling the
changefeed.new_webhook_sink_enabled
cluster setting. #100639
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.9.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.9.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.9.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.9.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.9.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.9.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.9
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.9 on Github, visit v23.1.0-alpha.9 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.8...v23.1.0-alpha.9
Backward-incompatible changes
- The output of the
SHOW RANGES
command for thecrdb_internal.ranges
andcrdb_internal.ranges_no_leases
tables has been updated, and the previous output is deprecated. To enable the new command output, set thesql.show_ranges_deprecated_behavior.enabled
cluster setting tofalse
. The new output will become default in v23.2. #99618
Enterprise edition changes
- The
CREATE CHANGEFEED
statement now allows you to limit the nodes that can execute a changefeed by including a locality filter in theWITH
clause. A node can execute the changefeed only if it was started with a matching--locality
flag. Replace{locality}
with a comma-separated list of key-value pairs. #99935
SQL language changes
- The new
prepared_statements_cache_size
session setting helps to prevent prepared statement leaks by automatically deallocating the least-recently-used prepared statements when the cache reaches a given size. #99254
Operational changes
- The new
COCKROACH_DISABLE_NODE_AND_TENANT_METRIC_LABELS
environment variable allows you to suppress metrics from a cluster's Prometheus endpoint 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. #99820
DB Console changes
- The Index Details 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. #99485 - When you search or filter within the Statements page or Transactions page, 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. #99795
Miscellaneous
Several computed columns have been added to the
statement_statistics_persisted
andtransaction_statistics_persisted
views in thecrdb_internal
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 Databases page or viewing the details of a database. #99513
- 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 thecrdb_internal
orpg_catalog
system catalogs. If you are experiencing this bug, set thesql.distsql.use_streamer.enabled
cluster setting tofalse
before upgrading a cluster to v23.1. #99443 - Fixed a bug that could erroneously cause multiple garbage-collection jobs to be created when executing a
DROP SCHEMA ... CASCADE
command, one job for each table and one for the cascadedDROP
itself. #99706 - Fixed a bug in the Insights page that prevented a recommendation to drop an index from being executed if the index's name contained a space. #100023
- Fixed a rare bug that prevented the garbage-collection job for a
TRUNCATE
command from successfully finishing if the table descriptor had already been garbage-collected. The garbage-collection job now succeeds in this situation. #100009 - Fixed a rare bug that could cause a query of a virtual table in the
crdb_internal
orpg_catalog
system catalog to hang indefinitely if the query returned an error. #99969 - Fixed a bug introduced prior to v21.2 that could cause the SQL gateway node to crash if you created a view 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. #100159 - 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 column family. This could lead to subsequent unavailability of the table. #100030
- Fixed a bug that could cause a node to crash with an out-of-memory (OOM) exception when viewing details in the Statements page or Transactions page. #99550
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.8.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.8.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.8.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.8.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.8.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.8.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.8
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.8 on Github, visit v23.1.0-alpha.8 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.7...v23.1.0-alpha.8
Security updates
- Previously, users could gain unauthorized access to statement diagnostic bundles 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. #99051
General changes
- Increased the specificity of log messages to help troubleshoot DB Console SSO issues. #98522
Enterprise edition changes
- The MuxRangefeed client, which is enabled with the
changefeed.mux_rangefeed.enabled
cluster setting, is now more efficient when running against large-scale workloads. #97957 - The
server.oidc_authentication.claim_json_key
cluster setting for DB Console SSO now accepts list-valued token claims. #98522 - Added the
WITH
key_column option to override the message metadata key for changefeeds. This changes the key hashed to determine Kafka partitions. It does not affect the output ofkey_in_value
or the domain of the per-key ordering guarantee. #98806 - The Node Map now shows normalized CPU usage. #98225
SQL language changes
- Fixed a bug where the check constraint on an
OID
type column results in a panic in the legacy schema changer. #98800 - Added a new
WITH REDACT
option to the following statements:SHOW CREATE
,SHOW CREATE TABLE
, andSHOW CREATE VIEW
which replaces constants and literals in the printedCREATE
statement with the redacted marker,‹×›
. #98251 - Added support for the
REDACT
flag to the following variants ofEXPLAIN
:EXPLAIN (OPT)
,EXPLAIN (OPT, CATALOG)
,EXPLAIN (OPT, MEMO)
,EXPLAIN (OPT, TYPES)
, andEXPLAIN (OPT, VERBOSE)
. TheseEXPLAIN
statements will have constants, literal values, parameter values, and any other user data redacted in the output. #97549 - Disallowed the
RESTORE
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 "Restoring Backups Across Versions". #98597 - Bulk
COPY FROM
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 forCOPY
statements and are not yet applied to regular inserts. Both thevectorize
andcopy_fast_path_enabled
session variables can be used to disable this feature. #98605 - Added stemming and stopword-eliminating text search configurations for English, Danish, Dutch, Finnish, French, German, Hungarian, Italian, Norwegian, Portuguese, Russian, Spanish, Swedish, and Turkish. #97677
- Added the
system.statement_activity
andsystem.transaction_activity
tables. These tables are used to populate the SQL Activity pages, and contain the top N statements and transactions based on different key columns. #99179 - Added helper text for
UPDATE
to includeFROM <source>
. #99301 - 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
, andplainto_tsquery
, which use the value ofdefault_text_search_config
instead of expecting one to be included as in the two-argument variants. The default value of this setting isenglish
. #99323 - Added the
ts_rank
function for ranking text search query results. #99323 - Renamed the
coordinator_locality
option inBACKUP
toEXECUTION LOCALITY
. 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. #99176
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. #99119 - Prometheus metrics available at the
_status/vars
path now contain anode_id
label that identifies the node they were scraped from. #99235
DB Console changes
- The Statement & Transaction Fingerprints pages no longer poll data, to simplify the user experience and reduce any performance impact. #98331
- Data on the Statement Fingerprint Details page no longer updates automatically every 5mins. #99298
- Updated the Jobs table column name from "Last Modified Time" to "Last Execution Time". #99021
- On the SQL Activity Fingerprints pages, users will not see stats that have not yet been flushed to disk. #98815
- Users can now request
top-k statements by % runtime
on the SQL Activity Fingerprints pages. #98815 - Added Search Criteria to the Statements and Transactions pages, and updated the UX with improvements. #98815
- Added badges for each selected filter on the SQL Activity and Insights pages. #98988
- The default request sort for the Statement Fingerprints Overview page is now
% of All Runtime
. #99298 - Fixed a bug where the table's
CREATE
statement would not display correctly on the Table Details page. #99434 - 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. #99412
Bug fixes
- Fixed a rare panic in
upstream etcd-io/raft
when a message appends race with log compaction. #98721 - 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. #98331
- Fixed a bug in which
SET avoid_buffering = true
could produce a crash on subsequent operations. #98290 - Fixed a bug where using
ST_Transform
could result in a memory leak. #98740 - Fixed internal errors in
SHOW JOBS
statements that have aWITH
clause. #98389 - Previously, the
ADD COLUMN ... DEFAULT cluster_logical_timestamp()
statement would crash the node and leave the table in a corrupt state. The root cause is anil
pointer dereference. The bug is now fixed by returning an unimplemented error and hence disallowing using the builtin function as the default value when backfilling. #98696 - 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. #96045
- Fixed a bug that could prevent a cached query from being invalidated when a UDF referenced by that query was altered or dropped. #96045
- Fixed the replacement of in-flight requests for
KeyedCachedDataReducer
s to prevent permanent loading on requests stuck on aninFlight
status. #99095 - Improved the reliability of latency data in v23.1 clusters. #99294
Performance improvements
- The Raft tick interval has been increased from
200ms
to500ms
in order to reduce per-replica CPU costs, and can now be adjusted viaCOCKROACH_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. #98584 - The Raft scheduler is now sharded to relieve contention during range Raft processing, which can significantly improve performance at high CPU core counts. #98854
Build changes
- Running
./dev ui test
(orbazel test //pkg/ui/workspaces/db-console:jest
) now uses less memory. #98880
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.7.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.7.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.7.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.7.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.7.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.7.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.7
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.7 on Github, visit v23.1.0-alpha.7 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.6...v23.1.0-alpha.7
Security updates
- The 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 settingserver.user_login.rehash_scram_stored_passwords_on_cost_change.enabled
was added, and defaults totrue
. If it istrue
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 theserver.user_login.password_hashes.default_cost.scram_sha_256
cluster setting to the value they desire before upgrading. This change is being backported to v22.2. #98254
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 OOMing. This soft memory limit can be disabled by specifying--max-go-memory=0
tocockroach start
. #97666 - Previously, the output of
SHOW CHANGEFEED JOBS
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 cluster settingjobs.retention_time
. Completed jobs older than that time are deleted. Fixes: https://github.com/cockroachdb/cockroach/issues/97883 #98175
Enterprise edition changes
- Sinkless changefeeds that use the
AS SELECT
syntax now require an enterprise license. #98241 - External connections 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'
#97140 - Backup schedules 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 toon_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. #98249 - Changefeeds to a Kafka sink now support the
OAUTHBEARER
sasl_mechanism
. #98053 - Changefeeds running with the
changefeed.mux_rangefeed.enabled
cluster setting set totrue
are more efficient, particularly when executing against large tables. #96756
SQL language changes
- A regions field was added to the
statistics
column ofcrdb_internal.statement_statistics
, reporting the regions of the nodes on which the statement was executed. #95449 - The
enforce_home_region
session setting was extended with a new optional preview feature and session setting, which is disabled by default, to dynamically detect and report the home region forSELECT
queries based on the locality of the queried rows, if different from the region of the gateway node. cockroachdb/cockroach#97827 - Added a URL to errors related to the
enforce_home_region
session setting that users can view to see additional information about the error. #97827 - Added a new session setting
enforce_home_region_follower_reads_enabled
as a preview feature to allow errors triggered by theenforce_home_region
session setting to perform reads usingAS OF SYSTEM TIME follower_read_timestamp()
in order to find and report a query's home region. #97827 - Added a new aggregate builtin function
array_cat_agg
. It behaves similarly toarray_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. #97826 - Added a new session setting
optimizer_always_use_histograms
, which ensures that the optimizer always uses histograms when available to calculate the statistics of every plan that it explores. Enabling this setting can prevent the optimizer from choosing a suboptimal index when statistics for a table are stale. #98194 - Added the
MODIFYSQLCLUSTERSETTING
system privilege. This privilege allows users the ability to view all cluster settings, but only modify those settings with thesql.defaults.*
prefix. This re-introduces the modify functionality seen withMODIFYCLUSTERSETTING
CockroachDB v22.2. #97521 - Added a
status
column to the followingcrdb_internal
virtual tables:crdb_internal.cluster_txn_execution_insights
andcrdb_internal.node_txn_execution_insights
. cockroachdb/cockroach#98217 - Added a new session variable
allow_role_memberships_to_change_during_transaction
which can be used to make the granting and revoking of role memberships faster at the cost of some isolation claims. By default, when granting or revoking a role from another role, CockroachDB waits for all transactions 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 thatGRANT
andREVOKE
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 variableallow_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 sessions 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. #98370 - Fixed a bug where CockroachDB panicked when a user tried to truncate a table which had an ongoing Row-level TTL change. CockroachDB still does not support truncating a table in this scenario, but instead of panicking an "unimplemented" error is returned. #98537
Operational changes
- Range leases will no longer be transferred to stores which are IO overloaded. #97587
- The environment variable
COCKROACH_IGNORE_CLUSTER_SETTINGS
can be used to start a node so that it ignores all stored cluster setting values in an emergency. #97805 - Introduce two cluster settings to control disk utilization thresholds for replica allocation:
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, andkv.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 replicas moved off of it. #97409 - The cluster setting
kv.trace.slow_request_stacks.threshold
can be used to attach available stack history from tracer snapshots to traces of slow requests. #97895 - Added a new metric
changefeed.schema_registry.retry_count
. This measures the number of request retries performed when sending requests to the changefeed schema registry. Observing a nonzero value may indicate improper configuration of the schema registry or changefeed parameters. #98338 - The
kv.range_split.load_cpu_threshold
cluster setting now has a minimum setting value of10ms
. #98250 - The
kv.allocator.lease_io_overload_threshold_enforcement
cluster setting value which disables enforcement is updated to be spelled correctly as "ignore" rather than "ingore". cockroachdb/cockroach#98543 - The range lease 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. Raft election timeouts and network timeouts. #98616
Command-line changes
cockroach sql
andcockroach demo
now support the client-side command\s
to display the previous command history. #98035Added a new flag
--max-go-memory
to thecockroach start
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--max-sql-memory
flag, the new flag--max-go-memory
accepts numbers interpreted as bytes, size suffixes (e.g.1GB
and1GiB
) 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 to0
to disable the soft memory limit (not recommended). If theGOMEMLIMIT
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. #97666- 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 as0.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 flags Computed max SQL memory Computed cache size Computed max Go memory --max-sql-memory=.25 --cache=.25 4GiB 4GiB 9GiB --max-sql-memory=.1 --cache=.5 1.6GiB 8GiB 3.6GiB --max-sql-memory=.25 --cache=.4 4GiB 6.4GiB 7.04GiB --max-sql-memory=100MiB 100MiB 128MiB 256MiB --max-sql-memory=.4 --cache=.2 --max-go-memory=100MiB 6.4GiB 3.2GiB 100MiB - 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
The
--drain-wait
argument to thecockroach node drain
command will be automatically increased if the command detects that it is smaller than the sum of the cluster settingsserver.shutdown.drain_wait
,server.shutdown.connection_wait
,server.shutdown.query_wait
times two, andserver.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. #98390
DB Console changes
- Fixed the error
Cannot read properties of undefined (reading 'length')
which could cause DB Console pages to fail to load. #98222 - Added a new metric to the Hardware dashboard showing the system-wide CPU usage in addition to the existing CockroachDB CPU usage. #98187
- 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. cockroachdb/cockroach#98312 - The description of the average QPS graph in the Replication Metrics Dashboard no longer claims the average is exponentially weighted. #98270
- The metric
rebalancing.cpunanospersecond
is now included in the Replication Metrics Dashboard. #98270 - Added an error code column to the insights table for a failed execution to the statement and transaction detail views on the Insights Page. Added a status column to the statement and transaction workload insights tables on the Insights Page. cockroachdb/cockroach#97138
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 cluster setting
rpc.dialback.enabled
. #94778 - The owner of the public schema can now be changed using
ALTER SCHEMA public OWNER TO new_owner
. #98000 - Fixed a bug in which common table expressions (CTEs) marked as
WITH RECURSIVE
which were not actually recursive could return incorrect results. This could happen if the CTE used aUNION ALL
, because the optimizer incorrectly converted theUNION ALL
to aUNION
. This bug had existed since support for recursive CTEs was first added in v20.1. #98042 - Internal queries that are executed in order to serve a client-initiated query already appeared in statistics with an
application_name
prefixed by the string$$
. But this name was not used in the output ofSHOW QUERIES
. Now,SHOW QUERIES
also shows the$$
prefix for these types of queries. - Fixed a bug in evaluation of
ANY
,SOME
, andALL
sub-operators that would cause expressions likeNULL = ANY(ARRAY[]::INT[])
to returnNULL
instead ofFalse
. cockroachdb/cockroach#97948 - Fixed a bug that could crash the process when a query contained a literal tuple expression with more than two elements and only a single label, e.g.,
((1, 2, 3) AS foo)
. #98142 - Fixed a bug where certain special character combinations in the
options
field in connection URLs were not properly supported by CockroachDB. #98302 - Fixed a bug where the stats columns on the Transaction Fingerprints overview page 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. cockroachdb/cockroach#98307
- Fixed a bug where transactions that performed a
SELECT FOR UPDATE
across multiple ranges but never performed writes could fail to eagerly clean up their locks after commit. Future transactions that encountered these abandoned locks could be delayed for 50ms before unlocking them. #98044 - Fixed a bug which could result in some
CREATE INDEX
statements to fail with the errorfailed to verify keys for Scan
. #98262 - Fixed a bug where CockroachDB could encounter an internal error
concurrent txn use detected
. The bug was introduced in v22.2.0. #98120 - Fixed a bug where if an
UPDATE
was performed during an on-goingADD COLUMN
orDROP COLUMN
on a table, the update could incorrectly fail due to a duplicate key error. #98354 - Fixed a bug where it was possible for CockroachDB to temporarily not respect zone configurations other than the default zone config. This could only happen for a short window of a few seconds after nodes with existing replicas were restarted, and self-rectified (also within seconds). #98422
- This manifested in a few ways:
- If
num_replicas
was set to something other than 3, we would still add or remove replicas to get to 3x replication. - If
num_voters
was set explicitly to get a mix of voting and non-voting replicas, it would be ignored. CockroachDB could possibly even remove non-voting replicas. - If
range_min_bytes
orrange_max_bytes
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 range splits or merges, as visible in the Replication Dashboard under "Range Operations". - If
gc.ttlseconds
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,AS OF SYSTEM TIME
queries going further back could start failing. For GC TTLs less than the default, clusters would observe increased disk usage due to more retained MVCC garbage. - If
constraints
,lease_preferences
orvoter_constraints
were set, they would be ignored. Range data and leases would possibly be moved outside where prescribed.
- Allow users with the
VIEWACTIVITY
/VIEWACTIVITYREDACTED
permissions to access thecrdb_internal.ranges_no_leases
table, necessary to view important DB Console pages (specifically, the Databases Page, including database details, and database tables). #98535 - Fixed a bug that caused incorrect results when comparisons of tuples were done using the
ANY
operator. For example, an expression like(x, y) = ANY (SELECT a, b FROM t WHERE ...)
could returntrue
instead of the correct result ofNULL
whenx
andy
wereNULL
, ora
andb
wereNULL
. This could only occur if the subquery was correlated, i.e., it references columns from the outer part of the query. This bug was present since the cost-based optimizer was introduced in v2.1. #98700
Miscellaneous
- Added two views to the
crdb_internal
catalog:crdb_internal.statement_statistics_persisted
, which surfaces data in the persistedsystem.statement_statistics
table, andcrdb_internal.transaction_statistics_persisted
, which surfaces thesystem.transaction_statistics
table. cockroachdb/cockroach#98261
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.6.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.6.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.6.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.6.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.6.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.6.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.6
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.6 on Github, visit v23.1.0-alpha.6 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.5...v23.1.0-alpha.6
SQL language changes
- Previously, an
ALTER TABLE .. ADD UNIQUE .. NOT VALID
statement would be processed by ignoring theNOT 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". #97758 - 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 theVIEWACTIVITY
system privilege (or the legacyVIEWACTIVITY
role option), or theVIEWACTIVITYREDACTED
system privilege (or the legacyVIEWACTIVITYREDACTED
role option) defined. #97657 - Each type cast is now expressible as a function, e.g.,
now()::date
can be expressed asdate(now())
. #97093 - Added support for a new syntax to provide options to the
COPY
statement. The options can now be given in a comma-separated list enclosed by parentheses. The old syntax is still supported. #97863 - Added support for the syntax
CREATE DATABASE IF NOT EXISTS ... WITH OWNER
. #97951 - Added a new internal built-in function,
crdb_internal.redactable_sql_constants
, which can be used to redact SQL statements passed in as strings. #97834 - Added an
error_code
column to thecrdb_internal.cluster_execution_insights
andcrdb_internal.node_execution_insights
virtual tables, which contains the error code for a failed execution. Also added alast_error_code
column to thecrdb_internal.cluster_txn_execution_insights
andcrdb_internal.node_txn_execution_insights
virtual tables, which contains the error code of the last failed statement in that transaction. #97046 - Added a new internal built-in function,
crdb_internal.redact
, which replaces substrings surrounded by redaction markers with the redacted marker. #98008
Command-line changes
- The
cockroach node decommission
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 asdecommissioning
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
. #96100
DB Console changes
- Updated the description for Suboptimal Insight and added a Learn more link to it. #97719
Bug fixes
- The unquoted value
none
is now allowed as the value in aSET
statement. #97816 IMPORT INTO ... DELIMITED DATA
will now correctly handle quoted fields that contain unescaped newlines. #97545- 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. #97093 - Fixed link encoding on links to database/table/index pages. #97893
- Fixed the
SHOW CREATE ALL {TYPES|SCHEMAS|TABLES}
commands so they handle database names that have mixed-case, hyphens, or quotes. #97915 - Tables referenced in index recommendations are now fully qualified, ensuring that they are not ambiguous. #97262
- Changed the database used for SQL API calls, to no longer use
defaultdb
, which was causing error messages on some pages when that database no longer exists. #97990
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. #97956
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.5.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.5.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.5.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.5.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.5.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.5.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.5
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.5 on Github, visit v23.1.0-alpha.5 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.4...v23.1.0-alpha.5
Security updates
- The 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 totrue
. If it istrue
and ifserver.user_login.password_encryption
iscrdb-bcrypt
, then during login, the stored hashed password will be migrated from SCRAM to bcrypt. #97429
General changes
- Users with the
CONTROLJOB
role option can now view jobs owned by admins. #96382 - Users with the
VIEWJOB
role option can now view all jobs. This role can be revoked by granting theNOVIEWJOB
role option. #96382
Enterprise edition changes
- Jobs that utilize a protected timestamp system (such as
BACKUP
,CHANGEFEED
, orIMPORT
) 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. #97148 - Changefeeds now automatically expire protected timestamp records for paused jobs if the changefeed is configured with the
gc_protect_expires_after
option. #97148 - User-defined functions (UDFs) can now be referenced from column
DEFAULT
expressions when creating a new table or issuing theSET 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 theskip_missing_udfs
flag is provided, theDEFAULT
expressions are dropped during a restore operation. #97501
SQL language changes
- String literals are now allowed for region names in DDL syntax, in addition to quoted syntax. #97021
- It is now possible to use
*
inside aCREATE VIEW
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. #97515 - The default value of
sql.stats.cleanup.rows_to_delete_per_txn
has been increased to10000
to increase efficiency of the cleanup job for SQL statistics. #97642 - The new session setting
optimizer_use_improved_split_disjunction_for_joins
allows the optimizer to split disjunctions (OR
expressions) in moreJOIN
conditions by building aUNION
of twoJOIN
expressions. If this setting is true, all disjunctions in inner, semi, and antiJOIN
s will be split. Otherwise, only disjunctions that potentially contain an equijoin condition will be split. #97696 - Builtins have been added for
tsvector
,to_tsquery
,phraseto_tsquery
, andplainto_tsquery
, which parse input documents into tsvectors and tsqueries, respectively. The newts_parse
builtin is used to debug the text search parser. #92966 - The new session variable
inject_retry_errors_on_commit_enabled
returns a transaction retry error if it is run inside of an explicit transaction when it is set totrue
. The transaction retry error continues to be returned untilinject_retry_errors_on_commit_enabled
is set tofalse
. This setting allows you to test your transaction retry logic. #97226 - Previously,
ADD PRIMARY KEY NOT VALID
ignored theNOT VALID
qualifier. This behavior was not compatible with PostgreSQL. CockroachDB now throws the errorPRIMARY KEY constraints cannot be marked NOT VALID
. #97746
Operational changes
The following cluster settings, 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. #97142
Max timeout-to-intent resolution has been added to prevent intent resolution from becoming stuck indefinitely and blocking other ranges attempting to resolve intents. #91815
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. #97532
Command-line changes
- The SQL shell (
cockroach sql
,cockroach demo
) 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 flagsS
and+
, for convenience for users migrating from PostgreSQL. A notable difference is that when a pattern argument is specified, it should use the SQLLIKE
syntax (with%
representing the wildcard character) instead of PostgreSQL's glob-like syntax (with*
representing wildcards). #88061
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 Statements page even when there is a max size limit error. #97662
"Retrying" is no longer a status shown in the Jobs page. #97505
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. #97443
- The formatting of uniqueness violation errors now matches the corresponding errors from PostgreSQL. #96914
- Previously, when a new column name would require quoting due to mixed-case or special characters,
ALTER TABLE ... ADD COLUMN
would not run in an explicit or multi-statement transaction. This is now fixed. #97514 - Fixed a bug when formatting
CREATE TYPE
statements for user-defined types which require quoting which might prevent those statements from round-tripping. #97514 - Using subqueries in user-defined functions without an
AS
clause is now supported, for consistency with the syntax supported outside of user-defined functions. #97515 - Fixed a rare bug introduced before v22.1.x that could cause a projected expression to replace column references with the wrong values. #97554
- Cross-descriptor validation on lease renewal is now disabled, because it can starve online schema changes when there are many descriptors with many foreign key references. #97630
- Fixed a bug with pagination on the Insights page. #97640
- Columns referenced in partial index predicates and partial unique constraint predicates can no longer be dropped. The
ALTER TABLE .. DROP COLUMN
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. #97372 - The Jobs page now displays an error state when an error is encountered during data fetching. #97486
- Fixed a bug introduced in v22.1 that caused the internal error
no bytes in account to release ...
. #97750 - The
COPY FROM
command now respects thestatement_timeout
andtransaction_timeout
cluster settings. #97808 COPY FROM
commands now appear in the output of theSHOW STATEMENTS
command. #97808- Fixed an error where querying a
pg_catalog
table included information about a temporary table created in another session. #97727
Performance improvements
- If the session setting
optimizer_use_improved_split_disjunction_for_joins
istrue
, 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). #97696
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 toCREATE FUNCTION f() RETURNS t AS 'SELECT * FROM t' LANGUAGE SQL;
. #97199 - The parameters for delegated snapshots have been marked as internal. #97408
- Fixed an error when calling
CREATE OR REPLACE FUNCTION
with a user-defined return type if the user-defined type was modified after the original user-defined function was created. The command now succeeds as long as the function body returns output that matches the modified user-defined type. #97274 - Columns with referenced constraints can now be dropped. #97579
- Index cascades with a dependent inbound foreign key can now be dropped. #97065
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.4.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.4.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.4.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.4.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.4.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.4.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.4
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.4 on Github, visit v23.1.0-alpha.4 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.3...v23.1.0-alpha.4
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. #96295
- Add support for implicit authentication to Azure Storage and KMS. #96825
- Add support for
CREATE EXTERNAL CONNECTION ... AS "postgresql://"
or"postgres://"
. These external connections may be specified as the source in streaming replication. #96551 - Add support for referencing user defined functions (UDFs) from other objects. Backup and restore operations can now read and write UDF descriptors. #97038
SQL language changes
- UDFs can now return a set of results by setting the return type to
SETOF
. #96698 - 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. #96696
- 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. #94408 - 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. #97257
- Add a hard limit of how much data can be flushed to system tables for sql stats. #97123
Add support for the
REDACT
flag to the following variants ofEXPLAIN
:EXPLAIN
EXPLAIN (PLAN)
EXPLAIN (VEC)
EXPLAIN ANALYZE
EXPLAIN ANALYZE (PLAN)
These explain statements (along with
EXPLAIN ANALYZE (DEBUG)
, which already supportedREDACT
) will have constants, literal values, parameter values, and any other user data redacted in output. #95136Previously 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. #97038
A version gate has been added to prevent UDF usage in CHECK constraints before a cluster is fully upgraded to v23.1 or above. #97038
Previously users were able to use UDFs from tables with
SET DEFAULT
andSET ON UPDATE
even when they are disallowed fromCREATE TABLE
andADD COLUMN
. This patch disallows those two cases fromALTER TABLE ALTER COLUMN
. #97390Operational 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. #97029The new timeseries metric
storage.keys.tombstone.count
shows the current count of point and range deletion tombstones across the storage engine. #97306The 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 from250ms
to500ms
, based on performance experiments. #97113CPU balancing is enabled as the default load based rebalancing objective. This can be reverted by setting
kv.allocator.load_based_rebalancing.objective
toqps
. #97424
DB Console changes
- Add columns p50, p90, p99, max and min latency for Statement table on SQL Activity page. #97082
- Show a warning for Statement Insights when the SQL API returns a "max size exceed" error. #97153
- Show a warning for Transaction Insights when the SQL API returns a "max size exceed" error. #97277
- Show a warning for Schema Insights when the SQL API returns a "max size exceed" error. #97312
Bug fixes
- Fixed a bug where the
AS OF SYSTEM TIME
clause was handled incorrectly in an implicit transaction that had multiple statements. #97063 - This patch fixes asymmetric typing of
>
and<
expressions which may cause erroring of expressions which are legal. #97022 - This patch fixes possible internal errors in
SOME
,ANY
andALL
expressions of the form:expr > SOME(expr1, expr2, expr3...)
#97022 - Fixed the syntax error for
SELECT ... QUERY
(withoutAS
) statement. #97041 - 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. #94810 - Adjusted the size reported for
TIME
,TIMETZ
,TIMESTAMP
,TIMESTAMPTZ
, andDATE
types in the pgwire protocol. #97145 - 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.) #97145
- 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. #97122
- 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. #97212
- 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)
andf(INT4)
. #96481 - The following spammy log message was removed: > lease [...] expired before being followed by lease [...]; foreground traffic may have been impacted #97358
- 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. #96695 - 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)
andINDEX(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. #97151
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')
. #96471
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.#96107
Miscellaneous
- #97229
- Fix a bug in which
RESTORE
,BACKUP
, andIMPORT
jobs would fail if the coordinator node of the job was drained. #97033
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.3.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.3.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.3.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.3.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.3.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.3.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.3
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.3 on Github, visit v23.1.0-alpha.3 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.2...v23.1.0-alpha.3
General changes
- Added new metrics to count paused jobs 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 settingjobs.metrics.interval.poll
, which defaults to 10 seconds. #89752
Enterprise edition changes
- Added support for Azure Key Vault KMS, which will allow users to encrypt and decrypt their backups using keys stored in Azure Key Vault. App Registration authentication (Azure RBAC) for Azure Storage is also now supported.#96459
- Introduced a new locality filter option (
coordinator_locality
) that can be specified when a backup job is created. This option restricts the backup metadata writing to the designated nodes. #95791 - 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 user-defined functions, and the restore target database does not have a schema with the same name. #96911 - Changefeeds with the
unordered
option can use multi-region Google Cloud Pub/Sub topics. #96567 - Fixed a bug in changefeeds where long running initial scans will fail to generate checkpoints. Failure to generate checkpoints 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. #96995
SQL language changes
- Added latency information in seconds to the statement statistics on
crdb_internal.statement_statistics
,system.statement_statistics
, andcrdb_internal.cluster_statement_statistics
, with information about:min
,max
,p50
,p90
, andp99. Also added the columns:
latency_seconds_min,
latency_seconds_max,
latency_seconds_p50,
latency_seconds_p90, and
latency_seconds_p99to
crdb_internal.node_statement_statistics`.#96396 - Deprecated the
PGDUMP
andMYSQLDUMP
formats forIMPORT
. They are still present, but will be removed in a future release. See the Migration Overview page for alternatives. #96386 COPY ... FROM ... QUOTE '"'
will no longer error. #96572- Added
last_error_code
column to thecrdb_internal.node_statement_statistics
table. Addedlast_error_code
field to thestatistics
JSON blob in thecrdb_internal.statement_statistics
andsystem.statement_statistics
tables. #96436 - Added support for expressions of the form
COLLATE "default"
,COLLATE "C"
, andCOLLATE "POSIX"
. Since the default collation 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. #96828 - The insights subsystem in
sqlstats
is now able to detect failed executions, regardless if they were slow or not. #97039 - The internal
statement_statistics
andtransaction_statistics
tables now include sampled execution statistics on storage iteration. #96016 - Introduced the
declare_cursor_statement_timeout_enabled
session variable that disables statement timeouts duringFETCH
when usingDECLARE CURSOR
. #96607
Operational changes
- A
BACKUP
that encounters too many retryable errors will now fail instead of pausing to allow subsequent backups the chance to succeed. #96673 - Added an option to balance CPU time (
cpu
) instead of queries per second (qps
) among stores in a cluster. This is done by settingkv.allocator.load_based_rebalancing.objective='cpu'
.kv.allocator.cpu_rebalance_threshold
is also added, similar tokv.allocator.qps_rebalance_threshold
to control the target range for store CPU above and below the cluster mean. #96127 - The 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 tocpu
, will use request CPU usage. The threshold above which CPU usage of a range is considered for splitting is defined in the cluster settingkv.range_split.load_cpu_threshold
, which has a default value of250ms
. #96128 - Added the flag
--disable-max-offset-check
to disable node self-termination when it detects clock skew with the rest of the cluster beyond--max-offset
. The operator assumes responsibility for ensuring that real clock skew never exceeds--max-offset
. #96141
DB Console changes
- Added execution insights to the Statement Fingerprint Details and Transaction Fingerprint Details pages. #96440
- Transaction insights that were not found will now display a message
Insight not found
. #96832 - Added a waiting statement ID and fingerprint to the Insights Transaction details page. Added a blocking transaction ID and fingerprint to the the Insights Statement page. #96872
Bug fixes
- Fixed a bug where casting a
TIMETZ
to anARRAY
results in displaying second offsets, even if they are zero. #96583 - Allowed
ALTER TABLE .. ADD/DROP CONSTRAINT .. NOT VALID
andVALIDATE CONSTRAINT ..
to behave consistently with PostgreSQL. Previously, theVALIDATE CONSTRAINT
would fail and cause the whole statement to fail.#96648 - Resolved the
TIMESTAMPTZ
to match PostgreSQL. We previously included the minute/second offset forTIMESTAMPTZ
in certain places when casting it toSTRING
, even when they were zero. #96833 - Resolved using negative years instead of BC when casting a
TIMESTAMPTZ
to aSTRING
. #96833 - Fixed the
SHOW GRANTS FOR public
command so it works correctly. Previously, this would return an error saying that thepublic
role does not exist. #96957 - Statement source (square bracket) syntax is no longer allowed in user-defined functions. Prior to this fix, using this syntax in a UDF would cause a panic. This restriction will be lifted in the future. #96824
Performance improvements
- The execution of multiple
FOREIGN KEY
andUNIQUE
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. #96123
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.2.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.2.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.2.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.2.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.2.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.2.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.2
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.2 on Github, visit v23.1.0-alpha.2 source tag.
Changelog
View a detailed changelog on GitHub: v23.1.0-alpha.1...v23.1.0-alpha.2
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
andindex_name
incrdb_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 theSHOW RANGES
statement instead, optionally usingWITH 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
#93644
- Instead of:
- The aforementioned columns in the
The format of the columns
start_key
andend_key
forSHOW RANGES FROM DATABASE
andSHOW 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. #93644The format of the columns
start_key
andend_key
forSHOW RANGE ... FOR ROW
has been changed to be consistent with the output ofSHOW RANGES FROM INDEX
. #93644The output of
SHOW RANGES
no longer includesrange_size
,range_size_mb
,lease_holder
, orlease_holder_localities
by default. This ensures thatSHOW RANGES
remains fast in the common case. Use the new optionWITH DETAILS
to include these columns. #93644Changefeeds 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. #94429Fixed 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. #94915Previously, the type of the
replicas
,voting_replicas
,non_voting_replicas
andlearner_replicas
incrdb_internal.ranges
were overridden toINT2VECTOR
causing incompatible indexing between.ranges
and.ranges_no_leases
. Now the types of those columns in the two tables are set toINT[]
. #96287
Security updates
- Added an option to re-enable "old" cipher suites for use with very old clients. Fixes issue #1989. #95091
- Previously, the
ENCRYPTION_PASSPHRASE
option passed toRESTORE
would appear as 'redacted'. It now appears as '******' which is consistent withSHOW BACKUP
andBACKUP
. #95562
General changes
The garbage collection TTL 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. #93836
Enterprise edition changes
- The
changefeed.active_protected_timestamps.enabled
cluster setting has been removed and is now always treated as if it wastrue
. #89975 - Improved changefeed expressions logic to rely on the optimizer to evaluate star expansion. #93979
- Changefeed expressions now support system columns. #93979
- Changefeed expressions now have access to the
cdc_prev
tuple which contains the previous state of the row. #94429 - Changefeed expressions now support non-volatile user defined functions (UDFs). #94429
- Changefeed transformations (e.g.,
CREATE CHANGEFEED ... AS SELECT ...
) no longer require theschema_change_policy=stop
option. #94653 - 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. #94806
- The
CREATE EXTERNAL CONNECTION
statement now supports URIs with the prefixesazure
,gs
,gcpubsub
,http
,https
,webhook-https
,nodelocal
,s3
, andkafka
for use by changefeeds. #86061 - The
CONTROLCHANGEFEED
role option will be deprecated in the future (see issue #94757). With this change, usages of theCONTROLCHANGEFEED
role option will come with a deprecation warning. Its existing behavior remains the same. TheSELECT
andCHANGEFEED
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 cluster settingchangefeed.permissions.require_external_connection_sink.enabled
is added and set tofalse
by default. Enabling this setting restricts users withCHANGEFEED
on a set of tables to create enterprise changefeeds into external connections only. To use a given external connection, a user typically needs theUSAGE
privilege on it. Note thatALTER DEFAULT PRIVILEGES
can be used with both theCHANGEFEED
andSELECT
privileges to assign coarse-grained permissions (i.e., assign permissions to all tables in a schema rather than manually assign them for each table). #94796
- The
- Changefeeds created/altered with a
metrics_label
set whileserver.child_metrics.enabled
is set tofalse
will now provide the user a notice upon creation. #94948 - Fix a bug in
ALTER CHANGEFEED
that would panic when altering changefeeds to remove a table that has already been dropped. #95739 - Reduced the default size of scan RPC replies to improve cluster stability during changefeed accounting for transient memory. #95798
- Changefeed expressions now support the
changefeed_created_timestamp
function. #95179 - Increased the default
changefeed.memory.per_changefeed_limit
cluster setting to1/2GiB
. This should result in changefeeds being able to produce larger files. #96340 - The
confluent_schema_registry
URI for avro changefeeds now supportsclient_cert
andclient_key
parameters. #96510
SQL language changes
- Added the
pg_get_function_arguments
built-in function. This returns the argument list (with defaults) necessary to identify the function with a given OID. #93675 - Added
voting_replicas
andnon_voting_replicas
columns to the output ofSHOW RANGE
andSHOW RANGES
statements. #93513 - It is now possible to create and alter
NOT VISIBLE
indexes using the aliasINVISIBLE
. The alias can be used anywhereNOT VISIBLE
is used when creating or altering indexes. NOTE: theINVISIBLE
alias is not supported forNOT VISIBLE
columns. #93750 - The
system.table_statistics
table now contains a column calledfullStatisticsID
to store an id referencing the full table statistic the partial statistic was derived from. #93751 - 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 settingSET allow_ordinal_column_references=true
. Support for ordinal column references is scheduled to be removed in upcoming version v23.2. #93754 - 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. #91933
- Added the column
indexes_usage
and the indexindexes_usage_idx
on value on the tablesystem.statement_statistics
. #93089 - Add the
log_timezone
session variable, which is read-only and alwaysUTC
. #94123 - Added Two new virtual tables
crdb_internal.index_spans
and.table_spans
, which list the logical keyspace used by each index/table. #93644 - The following new statements are introduced:
SHOW RANGES FROM CURRENT_CATALOG
andSHOW RANGES
without a parameter: functions as an alias forSHOW 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 ofWITH INDEXES
andWITH TABLES
is the same asSHOW RANGES FROM DATABASE
. Additionally, the following new options have been added to theSHOW 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. #93644
- Implemented the
pg_timezone_names
pg_catalog
table, which lists all supported timezones. #94122 - Improved the performance of trigram operations. #93757
- Previously, CockroachDB would crash if a user creates a user-defined function (UDF) 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. #94106
- Previously, error messages for missing users sometimes had different forms. This is now unified in the form
role/user "user" does not exist
. #94677 - User-defined functions (UDFs) with subqueries in the body of the function are now supported. #94962
- Previously, setting a table's locality was not allowed if the table contained any hash sharded index. This restriction is now removed. #94436
- Users can now add a super region when creating a database. #93939
COPY
now logs an error during the insert phase on theSQL_EXEC
logging channel. #95038- Added a new
REDACT
flag toEXPLAIN
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 withEXPLAIN ANALYZE (DEBUG, REDACT)
. #94950 - Added two new virtual tables displaying execution insights for transactions:
crdb_internal.cluster_txn_execution_insights
crdb_internal.node_txn_execution_insights
#94720
- Some queries which previously resulted in the error "could not decorrelate subquery" now succeed. #95234
- If
copy_from_retries_enabled
is set,COPY
is now able to retry certain safe circumstances: namely whencopy_from_atomic_enabled
isfalse
, there is no transaction runningCOPY
and the error returned is retriable. This prevents users who keep running intoTransactionProtoWithRefreshError
from having issues. #95275 - Fixed the databases list API when the database name has special characters. #95209
- The pgwire protocol implementation can now accept arguments of the
JSON[]
type (oid=199). Previously, it could only acceptJSONB[]
(oid=3804). Internally,JSON[]
andJSONB[]
values are still identical, so this change only affects how the values are received over the wire protocol. #94705 - CPU time spent during SQL execution is now visible in the output of queries run with
EXPLAIN ANALYZE
. 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. #93952 - The
SHOW GRANTS ON EXTERNAL CONNECTION
andSHOW SYSTEM GRANTS
statements now use a column name ofprivilege_type
rather thanprivilege
. For external connections, thename
column has been changed toconnection_name
. This makes the commands consistent with otherSHOW GRANTS
commands. #95532 - The
SHOW INDEXES
statement will now show the expression used to define an index, if one was used. #95413 - It is now possible to run efficient
tsvector @@ tsquery
searches when there is an inverted index on thetsvector
column being searched. #93769 - Added a
cpuNanos
field to the statistics column of thecrdb_internal.statement_statistics
andsystem.statement_statistics
tables that reports the amount of CPU time in nanoseconds during SQL execution for queries that track CPU time. #95639 - Previously,
SHOW BACKUP
options would get parsed askv_options
, which meant that a user could not pass multiple values to aSHOW BACKUP
option, causing feature gaps inSHOW BACKUP
relative toBACKUP
andRESTORE
. 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 thecheck_files
parameter to a locality-aware backup chain that also specifies the backup incremental location. #95562
- A user can now pass and check multiple KMS URIs in
- Updated the name of the
cpuNanos
column tocpuSQLNanos
oncrdb_internal.statement_statistics
andsystem.statement_statistics
#96278 - Some queries with
EXISTS
subqueries which previously resulted in the error "could not decorrelate subquery" now succeed. #95883 - 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 usingALTER TABLE ... CONFIGURE ZONE USING gc.ttlseconds = ...;
. #96217 - Administrators may now call a new built-in function
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 performsALTER 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-addedcrdb_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 theparent_id
column, the database name being lost at that point. #96217 - Allow
*
expressions in user-defined functions (UDFs). #95710 - Previously, user-defined functions (UDFs) 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. #96476
Operational changes
- Updated the metrics
queue.gc.info.clearrangesuccess
andqueue.gc.info.clearrangefailed
to include statistics about GC operations that performClearRange
on parts of the range keyspace. Previously those metrics only included requests to remove range data completely when performing a schema change. #90830 - 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. #93838
- The cluster setting
storage.value_blocks.enabled
, when set totrue
, 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 currentlyfalse
. #94634 - The bytes read from SQL clients prior to authentication are now reported via the metric
sql.pre_serve.bytesin
. Previously, this was reported via thesql.bytesin
metric. #92580 - Transaction errors will contain more detailed information in redacted logs. #93760
- 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 exceedCOCKROACH_RAFT_MAX_SIZE_PER_MSG * COCKROACH_RAFT_MAX_INFLIGHT_MSGS
which is a softer limit. #94692 - Log messages for write stalls have been adjusted slightly. #95436
- Histogram metrics can now optionally use the legacy
HdrHistogram
model by setting a new environment variableCOCKROACH_ENABLE_HDR_HISTOGRAMS
totrue
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 legacyHdrHistogram
model is slated for full deprecation in upcoming releases. #96029 - 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. #96029 - 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. #95963
- The count of new SQL connections is now also reported on
sql.pre_serve.new_conns
. #92580 - 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 ofsql.bytesout
previously). The count of pre-authentication errors is now reported via the metricsql.pre_serve.conn.failures
(instead ofsql.conn.failures
previously). #92580
Command-line changes
- The TLS parameters to connect to a
cockroach demo
cluster from SQL clients have been simplified. #94421 - The password assigned to the
demo
user incockroach demo
can now be overridden by the env varCOCKROACH_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
. #94421 cockroach sql
andcockroach demo
now support an\info
client-side command to print the server details again. #94421cockroach demo
is now able to preserve open web sessions across restarts of thecockroach demo
command. The sessions are saved in the directory~/.cockroach-demo
alongside the TLS certificates and keys. #94455- 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. #93157
- Workloads that take a
--seed
argument previously defaulted to1
. Now, they use a randomly generated seed in each run. Users can still pass a custom seed with the--seed
flag. #95326 - Added
cpu_time_per_second
to thehot-ranges.sh
utilitydebug zip
script. #96213
DB Console changes
- Secure clusters now show correct login information in the top right corner. #94021
- The databases filter dropdown in the Statements page now uses the
getDatabasesList()
API call, resulting in all cluster databases showing up. #93657 - Added information about the selected plan to the Explain Plan tab under Statement Details. #94719
- 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. #92589
- 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. #92949
- The Statement Fingerprint Details page in the DB Console no longer infinitely loads after 5 minutes. #92596
- Added a time picker to the Workload Insights Overview pages in the DB Console. #92285
- Added all three session status options (
Active
,Closed
, andIdle
) and an empty results placeholder. #95005 - Added a list of all statement fingerprints that use a given index to the Index Details page. #94863
- Removed
reset sql stats
andreset index stats
from the DB Console when the user is a non-admin. #95303 - Remove
reset sql stats
from the Transactions page for non-admins. #95461 - Added an insights type filter for the Workload Insights page, and added an execution status filter for the Active Execution pages. #94002
- Hid the apply option for index recommendation when the user is not an admin. #95516
- The Database list filter now shows all databases in the cluster on CC console. #95450
- Hid the filter for the Databases and Database Details pages if both the node and regions dropdowns are also hidden. #95376
- The introduction of the Key Visualizer makes it easy to identify historical hotspots. To support this new feature, three new cluster settings 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. #88353
- Added a CPU Time chart to the Statement Details page. #95796
- Added CPU time as a column on the Statement and Transaction tables. #95795
- Hid the list of used fingerprints per index on the Index Details page for non-admin users. #95997
- 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. #95190 - 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). #93219
- 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. #93219
- Added search, filter and time picker for the list of most-used statement fingerprints on the Index Details page. #96112
- Added CPU Time to the Statement and Transaction Insights page. #96279
- 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. #95868
Bug fixes
- Fixed a bug where the
session_id
session variable would not be properly set if used from a subquery. #93748 - Fixed a bug where CockroachDB could, in rare cases, encounter an internal error when evaluating the
crdb_internal.range_stats
built-in function (which powers theSHOW RANGES
command among other things). The bug was introduced in v22.2.0 and is now fixed. #93868 - Fixed a bug that could prevent
CASE
expressions that used placeholder return values from type-checking correctly. #93855 - Updated the volatility of the
hmac
,digest
, andcrypt
built-ins to be immutable. #93628 - Server logs are now correctly fsynced at every syncInterval. #93956
- The
stxnamespace
,stxkind
andstxstattarget
columns are now defined inpg_statistics_ext
. #93274 - 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. #93938 - This patch fixes
JOIN
queries involving tables with unique constraints usingLIMIT
,GROUP BY
, andORDER BY
clauses to ensure that the optimizer considers streaming group-by with noTopK
operation, when possible. This is often the most efficient query plan. #93858 - Secure clusters now show correct login information in the top right corner. #94021
- 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 cluster setting
sql.distsql.use_streamer.enabled
tofalse
. #94031 - The
CREATE ROLE
,DELETE ROLE
,GRANT
, andREVOKE
statements no longer function when the transaction is in read-only mode. #93991 - 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. #94045 - Fixed a bug where, in some cases, the start/end key columns of the output of
SHOW RANGES
was missing. #93644 - Fixed a bug where trigrams ignored unicode (multi-byte) characters from input strings. #93757
- 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. #94207
- 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. #94151 - Fixed a bug where CockroachDB could encounter an internal error when evaluating window functions with
RANGE
window frame mode with anOFFSET PRECEDING
orOFFSET FOLLOWING
boundary set when anORDER BY
clause has theNULLS LAST
option set. This will now result in a regular error since the feature is marked as unsupported. #94342 - 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 cluster settingsql.distsql.use_streamer.enabled
tofalse
. #94399 - 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. #94405
- Fixed a panic that could be caused when using a SQL cursor to access tables in the
crdb_internal
schema. #94425 - Fixed a bug in which
RESTORE SYSTEM USERS
would fail to restore role options. #94134 - Fixed a crash that could occur on the gateway node when collecting a statement diagnostics bundle (e.g.,
EXPLAIN ANALYZE (DEBUG)
) 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. #94440 - Fixed a recursive CTE expressions which cause internal errors when explicit CASTs of initial expressions to output types are missing. #94581
- Previously, certain
GRANT
orREVOKE
commands on a user which does not exist would error with the correct PG code. This is now fixed. #94677 - The
pg_proc
andpg_type
virtual OID indexes no longer incorrectly show cross-db objects. #94339 - It is now possible to run
cockroach version
andcockroach start
(and possibly other sub-commands) when the user running the command does not have permission to access the current working directory. #94894 - 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=""
. #94985 - This patch fixes an internal error occurring in CASE expressions when a column present in a
THEN
orELSE
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
. #94791 - The
pronamespace
column of thepg_proc
table now correctly reports thecrdb_internal
schema for built-in functions that have the "crdb_internal" prefix. #95029 - In the SQL shell (
cockroach sql
/cockroach demo
), 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. #95219 - 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. #94915 - The
prokind
column ofpg_catalog.pg_proc
is now populated properly. #95289 pg_catalog.pg_description
andpg_catalog.obj_description()
are now able to retrieve the descriptive help for built-in functions. #95294- Fixed a crash that could occur when formatting a tuple with an unknown type. #95009
- 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. #95426
- Fixed a bug where
CLOSE ALL
would not respect the "ALL" flag and would instead attempt to close a cursor with no name. #95414 - 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. #95398
- DB Console features that check for the
VIEWACTIVITYREDACTED
privilege now also account for system-level privileges. #95258 - CockroachDB now supports receiving
regXXX
-type values in binary extended protocol. #94355 - Operations like
BACKUP
can now reuse a previously created AWS KMS client if the client was created with the same parameters. This addresses theNoCredentialProviders
errors on EC2 for backups with long incremental chains. #95026 - The syntax
EXPLAIN (DDL) COMMENT ON
is now possible. #95467 - Fixed a bug where a database
RESTORE
would not grantCREATE
andUSAGE
on the public schema to the public role. #95466 - Fixed the formatting of JSON values inside of a SQL array so they no longer have improper quoting. #94705
- Fixed a bug which could cause expressions with side-effects (e.g., volatile expressions or data-modifying statements like
INSERT
) inNOT MATERIALIZED
CTEs to be executed more than once. This bug was present sinceNOT MATERIALIZED
was first supported in version 20.2.0. #95454 - 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. #95413 - Reduced register session, deregister session, and session cancel query contention. #95553
- Fixed a bug that could cause arguments of a
COALESCE
statement to be evaluated when previous arguments always evaluated to non-NULL values. This bug could cause query errors to originate from arguments of aCOALESCE
that should have never been evaluated. #95599 - Fixed the
array_to_string
built-in function so that nested arrays are traversed without printing 'ARRAY' at each nesting level. #95802 - Fixed a bug where using the
COPY
statement to copy data into a column with collated strings would result in an error similar tointernal error: unknown type collatedstring
. #95894 - The content of
column_default
ininformation_schema.columns
no longer has type annotations. #94153 - Fixed a long-standing bug that caused incorrect parsing of double-quoted identifiers separated by one or more newlines. #96019
- Fixed a rare internal errors in
LATERAL
queries with redundant function calls. #96048 - Fixed an internal error which may occur in the
SHOW RANGE FROM TABLE
statement when theFOR ROW
clause specifies aBYTE
literal and the corresponding column data type isBIT
. #96002 - Fixed an internal errors which may occur on some
AS OF SYSTEM TIME
expressions. #96113 - 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. #96371
- Fixed a bug where a
RESTORE
flow could hang indefinitely in the face of a context cancellation, manifesting as a stuck restore job. #96302 - Fixed a bug where the
NOSQLLOGIN
system-level privilege had a bug that made CockroachDB ignore it entirely, so it had no effect. The bug was introduced in v22.2.0-alpha.1. TheNOSQLLOGIN
role option is unaffected by this bug. #96466 - The compatibility scalar functions in
information_schema
are now listed in the proper namespace inpg_catalog.pg_proc
. #96562 - Fixed a bug in which the
CREATE SCHEDULE
statement would not properly handle a placeholder for therevision_history
option. #95675
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
LIMIT
clause. #93673 - Significantly reduced CPU usage of the underlying gossip network in large clusters. #89613
- 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. #93937 - Improved performance when populating
crdb_internal.default_privileges
. #94247 - Some types of user-defined functions (UDFs) 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. #92955
- Improved the performance of
pg_{function,table,type}_is_visible
. #94339 - Long chains of incremental backups and restore of such chains will now allocate less memory during the unmarshaling of metadata. #93997
- Extended the RPC compression encoding with a length prefixing format, allowing more efficient decompression on receivers. #93871
- When planning lookup joins with a
LIMIT
clause from aREGIONAL 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. #93377 - Improve the performance of the
SHOW FUNCTIONS
statement. #94771 - Improved the performance of several PostgreSQL compatibility built-ins. #94771
- 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. #95638
- Fixed a bug which could lead to very slow drop when tables or views have a very large number of columns (greater than 1000). #95850
- In 22.2, CockroachDB introduced support for
DISCARD TEMP
and madeDISCARD 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. #95876 - 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 theDISCARD ALL
andSET SESSION AUTHORIZATION DEFAULT
statements. #95876 - 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"}'
. #95848 - 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"}'
. #96202 - 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. #83991
- The Raft proposal pipeline has been optimized to reduce interference between Raft proposals. This improves average and tail write latency at high concurrency. #94165
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. #93800
- 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. #94152
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 System | Architecture | Full executable | SQL-only executable |
---|---|---|---|
Linux | Intel | cockroach-v23.1.0-alpha.1.linux-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.1.linux-amd64.tgz (SHA256) |
ARM | cockroach-v23.1.0-alpha.1.linux-arm64.tgz (Experimental) (SHA256) |
cockroach-sql-v23.1.0-alpha.1.linux-arm64.tgz (Experimental) (SHA256) |
|
Mac (Experimental) |
Intel | cockroach-v23.1.0-alpha.1.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v23.1.0-alpha.1.darwin-10.9-amd64.tgz (SHA256) |
ARM | cockroach-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) |
Intel | cockroach-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:
docker pull cockroachdb/cockroach-unstable:v23.1.0-alpha.1
Source tag
To view or download the source code for CockroachDB v23.1.0-alpha.1 on Github, visit v23.1.0-alpha.1 source tag.
Backward-incompatible changes
- Replaced the
cdc_prev()
function in favor of acdc_prev
tuple. This is an incompatible change that may break changefeeds that use the previouscdc_prev()
function. #85177 SHOW RANGES FOR TABLE
now includes rows for all indexes that support the table. Prior to this change,SHOW RANGES FOR TABLE foo
was an alias forSHOW 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 usingSHOW RANGES FOR INDEX foo@primary
. The statement output now also includes the index name. #93545
Security updates
- It is now possible to create TLS client certificates for identity principals that are not a valid SQL username using
cockroach cert create-client
and the new flag--disable-username-validation
. This is meant to be used in combination with the cluster settingserver.identity_map.configuration
and themap
option in HBA rules (server.host_based_authentication.configuration
). To test this feature, usecockroach sql
. Cockroach Labs recommends passing the username separately from the connection URL. #90439 - There is a new SQL session variable
system_identity
defined to contain the identity principal presented by the SQL clients during the initial connection. This may be different fromsession_user
when the identity was mapped, either using GSSAPI andinclude_realm=0
, or when using an identity map. #90439
General changes
- Upgraded gRPC to v1.49.0 #88562
- 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. #88625
- 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. #88625
- 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
. #89531
Enterprise edition changes
SHOW CHANGEFEED JOBS
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. #86603- Changefeeds JSON encoder performance is improved by 50%. #88064
- Changefeeds, using cloud storage sink, now have better throughput. #88395
- Added the cluster setting
changefeed.event_consumer_workers
which allows changefeeds to process events concurrently. #87994 - Changefeed) exports are up to 25% faster due to uniform work assignment. #88672
- 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. #88635
- When a changefeed is run with the option
virtual_columns = "null"
, the virtual column will be ordered last in each row. #89329 - For Kafka sinks, you can now add the optional JSON field
"Compression"
to thekafka_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. #90270 - Fixed a bug that could cause changefeeds to fail during a rolling restart. #89913
- Changefeeds will now treat all errors, unless otherwise indicated, as retryable errors. #90810
- CockroachDB now supports passing in the optional external ID when assuming a role. 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. #91040 - JWT authentication cluster settings can now be modified from within tenants to better support serverless use cases. #92406
- CDC queries 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. #85177 - Changefeeds no longer require the
COCKROACH_EXPERIMENTAL_ENABLE_PER_CHANGEFEED_METRICS
environment variable to be set in order to use themetrics_label
option. #93423 - Changefeeds can now be scheduled at intervals specified in crontab notation. #92232
SQL language changes
- Added the
crdb_internal.to_json_as_changefeed_with_flags
function to help debug JSON changefeeds. #84509 - Added the
regions
column to theSHOW BACKUP
command which will output a string ofALTER DATABASE
commands if the database is a multi-region database andNULL
for everything else. Previously, the user did not have an easy way to see if a backed up database is multi-region. #88136 - Types with length modifiers can now be used to prefix literals. #82028
- A new column
plan_gist
was added tocrdb_internal.{node,cluster}_queries
representing the compressed logical plan. #88770 - You can generate easy-to-read
CREATE INDEX
statements for a table's (secondary) indexes using theSHOW CREATE INDEXES FROM <table_name>
andSHOW CREATE SECONDARY INDEXES FROM <table_name>
statements. #88861 enum_first
,enum_last
, andenum_range
may now takeNULL
arguments as long as their type can be inferred from the expression. #89124- Declarative schema changer support for
ALTER PRIMARY KEY
statements now extends to tables which have secondary indexes. #86176 - The
backup.restore_span.target_size
cluster setting now defaults to384 MiB
. This should reduce the number of ranges created during restore and thereby reduce the merging of ranges that needs to occur after the restore. #89333 - The
transaction_timeout
session variable 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 withidle_in_transaction_timeout
for the best results. #89033 - The
crdb_internal.check_consistency
function 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. #89502 - CockroachDB now shows a hash-sharded check constraint in
SHOW CREATE TABLE
if it is set toNOT VALID
. #89517 - Added the
SHOW FUNCTIONS
andSHOW FUNCTIONS FROM <schema>
statements, which list user-defined functions. #89557 - The default value of
sql.metrics.statement_details.plan_collection.enabled
is nowfalse
. #89847 - CockroachDB now supports executing statements of the form
DELETE FROM ... USING
. #88974 - The cluster setting
sql.ttl.default_range_concurrency
and table storage parameterttl_range_concurrency
are no longer configurable. #89392 - CockroachDB drops the associated scheduled incremental backup when
DROP SCHEDULE
orDROP SCHEDULES
is called. Previously, whenever a user dropped a scheduled full backup, the corresponding scheduled incremental backup would not be dropped. #89768 - Added the
sql.auth.change_own_password.enabled
cluster setting. It defaults tofalse
. When set totrue
, 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 (eitherCREATEROLE
orCREATELOGIN
, depending on the option). #90485 - The
sql.distsql.max_running_flows
cluster setting has been removed. #84888 - The query field in the
crdb_internal.node_queries
,crdb_internal.cluster_queries
, andSHOW QUERIES
commands now includes the original comments in the queries. #86968 - Added a new
descriptor_validation
session variable which can be set toread_only
oroff
to disable descriptor validation, which may be useful when mitigating or recovering from catalog corruption. #90488 - CockroachDB now supports using
DROP CONSTRAINT, ADD CONSTRAINT
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, aconstraint already exists
error was returned. #90865 - Added the
contention_events
column to thecluster_execution_insights
table to see which transaction is blocking the specific statement. #90660 crdb_internal.scan
andcrdb_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. #90956- Previously, the
AS OF SYSTEM TIME
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 thangc.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 theAS OF SYSTEM TIME
value relative to when eachSELECT
query is run (query time - 30s) to prevent this error from happening, but eachSELECT
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. #90981 - The
system.sql_instances
table now includes pre-allocated ID entries, where all the fields exceptid
will beNULL
. #90427 - The
to_char(timestamp, string)
function has been added. #91382 - The
to_char(interval, string)
built-in function has been added. #91382 - The
system.table_statistics
table now contains a column calledpartialPredicate
to store a predicate for a partial statistic collection. #91248 - A new
NumericStat
,idleLat
, was introduced to the statistics column ofcrdb_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. #91098 - The set of supported compression algorithms in compress/decompress built-in functions is expanded to include
lz4
,snappy
, andzstd
. #91162 - A new column
database
was added tocrdb_internal.{node,cluster}_queries
and list sessions endpoint. #91629 - Fixed a bug in the legacy schema changer where comments were not dropped together with the database. #91689
- The
round(decimal
) built-in function no longer returns negative 0 for any input. #86106 - Added an estimate for the number of request units consumed by a query to the output of
EXPLAIN ANALYZE
for tenant sessions. #89256 - Enabled forward indexes on arrays. #91762
- Users can now manually create partial single-column statistics at the extreme values on columns that are prefixes of their index. The output of
SHOW STATISTICS
now includes a column indicating the partial predicate for a partial statistic, orNULL
for a full statistic. #91228 - 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. #80848 - Added support for the
pg_blocking_pids
built-in function. It is hardcoded to return an empty array because CockroachDB has no equivalent concept of PIDs as in PostgreSQL. #92253 - Added a list of indexes used by the query on the statistics column on the
system.statement_statistics
andcrdb_internal.statement_statistics
tables. The format istableID@indexID
. #92351 - Added a list of used indexes (with the format
tableID@indexID
) to the sampled query telemetry log. #92464 - A new
NumericStat
,idleLat
, was introduced to the statistics column ofcrdb_internal.transaction_statistics
. It reports the time spent waiting for the client to send statements while holding a transaction open. #92695 - Added an in-memory-only evaluation of
tsvector
andtsquery
datatypes and the@@
matches operator. #90842 - Implemented the
ALTER TABLE ... ADD CHECK
statement in the declarative schema changer. #91153 to_char
now has caching for parse formats, marking a speedup when runningto_char
with the same format between sessions. #91564- Casts from index name to
REGCLASS
are now supported. Previously, only table names could be cast toREGCLASS
. #90649 - Added user-defined composite column types. #90491
- SQL queries running on remote nodes now show up in CPU profiles with
distsql.*
labels. Currently this includesappname
,gateway
,txn
, and stmt. #92775 - CockroachDB now permits non-indexed storage of
tsvector
andtsquery
datatypes #92957 - Implemented the
parse_ident
built-in function, 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 isfalse
, then such extra characters are ignored. #93300
Operational changes
- Reduced the length of the
raft.process.handleready.latency
metric help text to avoid it being rejected by certain Prometheus services. #87166 - Logs produced by increasing the vmodule setting for
s3_storage
are now directed to theDEV
channel rather thanSTDOUT
. #88798 - 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. #88720
- 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. #88539
- Added a new debug tool to allow for decrypting files in a store using encryption-at-rest. 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. #89668
- Added a new command that can be used by an operator to list the files present in the encryption-at-rest file registry. #89873
- 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. #90002 - 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. #89899
- Updated metric descriptions of
rebalancing.*
to include the recording period. #90619 - 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. #89650
- CockroachDB now uses response data rather than just the request span in the load-based splitter 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. #89217
- Added the
replicas.leaders_invalid_lease
metric, which indicates how many replicas are Raft group leaders but holding invalid leases. #91179 - The cluster settings
server.web_session.purge.period
andserver.web_session.purge.max_deletions_per_cycle
, which were specific to the cleanup function forsystem.web_sessions
, have been replaced byserver.log_gc.period
andserver.log_gc.max_deletions_per_cycle
which apply to the cleanup function forsystem.eventlog
,system.rangelog
andsystem.web_sessions
equally. #90789 - The cluster setting
server.web_session.auto_logout.timeout
has been removed. #90789 - Splunk dashboard templates are available in the public repository under
/monitoring/splunk-dashboard/
. #92330 - 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 to2s
. #92542 - 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. #91947 - 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. #93399
Command-line changes
- The interactive SQL shell now retains a maximum of 1000 entries. There was no limit previously. #88173
- The deprecated CLI command
debug unsafe-remove-dead-replicas
has been removed. Usedebug recover
instead. #89150 - The
\df
metacommand was added to the SQL shell, which will list all user-defined functions in the current database. #89557 - In the
kv
workload, you can now enable--splits
with the--sequential
flag and adjust splitting to uniformly partition the keyspace. #90000 - Added the
--insert-count
flag to insert rows before thekv
workload begins. #90055 - CockroachDB will now include recommended remediation actions alongside log messages for some errors. #82891
- 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"
. #90520 cockroach demo --global
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. #92231- The engine used as line editor in the interactive shell (
cockroach sql
andcockroach demo
) has been updated. It includes numerous bug fixes and new features. The previous engine can still be accessed by setting theCOCKROACH_SQL_FORCE_LIBEDIT
environment variable to true. This support will be removed in a later version. #86457 - The interactive SQL shell 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). #86457 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
- c
crdb_internal.{node,cluster}_distsql_flows
:stmt
crdb_internal.{cluster,node}_sessions
:last_active
active_queries
crdb_internal.{cluster,node}_queries
:query
#92263
The interactive SQL shell now supports a rudimentary form of tab completion to input the name of SQL objects and functions. #87606
The command-line flag
--empty
tocockroach demo
is not marked as deprecated anymore; it is more convenient than--no-example-database
. However, the latter remains supported as an alias. #93255The 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. #93255cockroach demo
now supports--pid-file
for symmetry withcockroach start
. #93343The 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. #93528
DB Console changes
- The High Contention Time insight description now accurately reflects the event's contention duration in the DB Console. #89035
- Overview and Explain Plan tabs were added to the Active Statement Details page. #89021
- The Apply button was added on the Table Details page (DB Console only) when there is a recommendation to drop an unused index. #90070
- Overview and Explain Plan tabs were added to the Statement Insight Details page. #90250
- The Jobs Page now includes a column picker. #89678
- The fingerprint ID values for statements and transactions on the Insights pages are links that open the respective details page on the time period of the execution of that statement or transaction. #90403
- Requests to fetch table and database statistics now have limited concurrency. This may make loading the Databases page slower, but in return should result in making those pages less disruptive. #90210
- The Transaction filter label on the SQL Activity page was fixed. #91255
- The metric graph tooltip styling was fixed to prevent content collapse. #91290
- 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. #91629
- 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). #91698
- The fingerprint ID in hex format was added to the Statement Details page and Transaction Details page. #91885
- The contention time, schema, database, table, and index info was added to the Insights Statement Details page. #91668
- 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. #91955
- 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. #92017
- 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. #92284
- 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. #92463
- The Insights pages in the DB Console now show the seconds and milliseconds for all timestamp values. #92571
- Links were added on the fingerprint ID in the High Contention table on the Transaction Insights Details page. #92612
- 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. #92591
- Renamed the chart on the Statement Details page from Statement Execution and Planning Time to Statement Times. #92765
- The Transaction resource usage card on the Transaction Fingerprint page now includes an "Idle latency" row, representing the time spent by the application performing other work while holding this transaction open. #92951
- The Databases table page now displays all the grants in a single row per user. #92871
- 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. #93217
- CockroachDB now prevents polling
/settings
,/nodes_ui,
and/cluster
endpoints on incorrect login. #93211 - The Statement and Transaction pages for tenant clusters gained region columns and filters for multi-region tenants. #92357
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. #87412 - 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. #87562
- 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. #87320
- Fixed an incorrect default value of
cloudstorage.gs.chunking.retry_timeout
to 60 seconds #87817 - Fixed a bug in
pg_catalog
tables that could result in an internal error if a schema is concurrently dropped. #88568 - Fixed a bug that caused
ALTER CHANGEFEED
to fail if the changefeed was created with a cursor option and had been running for more thangc.ttlseconds
. #88402 - Fixed a bug that could cause a panic when running a query with
EXPLAIN
that attempts to order on a non-output column. #88441 - 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 parametersql_stats_automatic_collection_enabled
set to true. #88673 - 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. #88080 - CockroachDB now excludes check constraints of hash-shared indexes from being invalidated when executing
IMPORT INTO
. #89231 - CockroachDB now flushes WAL when writing storage checkpoints on consistency checker failures. #89369
- 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). #89261
- Changefeeds will now never permanently error on a "failed to send RPC" error. #87763
- 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. #89504
- CockroachDB now avoids a source of internal connectivity problems that would resolve after restarting the affected node. #89539
- CockroachDB now shows the correct value on table stats on UI, when there are no values to show. #89867
- Charts on the Statement Details page in the DB Console are no longer overlapping. #90014
- 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. #89903 - 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. #90107 - Fixed an issue with the
enforce_home_region
session setting which may causeSHOW CREATE TABLE
or other non-DML statements to error out if the optimizer plan for the statement involves accessing a multi-region table. #90007 - Fixed a bug in
changefeed.batch_reduction_retry
which resulted in only a single level of retry being able to occur. #90153 - 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. #89989
- Fixed an extremely rare out of bounds crash in the protected timestamp subsystem. #90357
- Fixed the calculation of the
pg_attribute.attnum
column for indexes so that theattnum
is always based on the order the column appears in the index. Also fixed thepg_attribute
table so that it includes stored columns in secondary indexes. #90287 - 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. #90457
- 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. #90403
- Fixed a rare bug where concurrent follower read/split operations could lead to invalid read results. #89886
- Fixed a bug that could cause
UPDATE .. FROM
clauses to update the same row multiple times, resulting in incorrectUPDATED
row counts and duplicate output rows for statements with aRETURNING
clause. The bug only appeared when the target table had a hidden primary key column (e.g., an implicitrowid
primary key column). The bug has been present since support forUPDATE .. FROM
was added in v19.0. #89780 - 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. #89540
- Fixed a bug where
SELECT *
operations on tables with virtual computed columns undergoing schema changes could potentially fail. #90670 - 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. #90875
- CockroachDB now ensures changefeeds shut down when one of the aggregator nodes returns an error. #90767
- Fixed a bug the occurred when attempting to reduce the size of a fixed-size
VARCHAR
column. #91078 - Fixed a bug that caused ranges to remain without a leaseholder in cases of asymmetric network partitions. #87244
- Fixed a bug that would prevent data from a failed restore from being cleaned up quickly. #88342
- 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). #91116
- 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 thepg_catalog
,information_schema
, andcrdb_internal
schemas. #90924 - Fixed a bug that prevented the usage of implicit record types for tables in the
pg_catalog
,information_schema
, andcrdb_internal
schemas. #90924 - 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. #91174
- 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. #91130
- Fixed a bug where the experimental
scrub
command did not handle type descriptors in the database. #91085 - Fixed a panic that could occur when calling
st_distancespheroid
orst_distancesphere
with a spatial object containing anNaN
coordinate. This now produces an error, with the message "input is out of range". #90218 - Fixed a bug that could result in infrequent progress updates for very large backup or restore jobs. #89971
- Added leading zeros to fingerprint IDs with less than 16 characters. #91885
- Fixed a bug causing changefeeds to fail when a value is deleted while running on a non-primary column family with multiple columns. #91870
- Fixed a bug that existed since before v21.1 where the
cgroup
memory limit was undetected when usingsystemd
. #91789 - Fixed a bug that existed since v20.2 that could cause incorrect results in rare cases for queries with inner joins and left joins. #91425
- Fixed an unhandled error that could happen if
ALTER DEFAULT PRIVILEGES
was run on the system database. #92075 - CockroachDB now prevents schema changes on the
crdb_internal_expiration
table. #91720 - When configured to true, the
sql.metrics.statement_details.dump_to_logs
cluster setting no longer causes a mutex deadlock. #92272 - 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". #92300
- Fixed the Statement Activity page so that it no longer shows multi-statement implicit transactions as "explicit." #92408
- Server crashes that occur during startup are now more clearly reported in logs and the standard error output. #91823
- Fixed incorrect cancellation logic when attempting to detect stuck rangefeeds. #92582
- Fixed an internal error when comparing a tuple type with a non-tuple type. #92635
- Fixed incorrect selectivity estimation for queries with
OR
predicates all referencing a common single table. #89358 - Added sort setting to tables on the Transaction and Statement Insights Details pages. #92573
- Fixed an issue where
changefeed.emitted_messages
would be increased twice per message for changefeed cloud storage sinks. #92685 - Fixed a bug where
attidentity
inpg_attribute
for theGENERATED BY DEFAULT AS IDENTITY
column should bed
. #92545 - CockroachDB previously could incorrectly evaluate queries that performed left semi and left anti "virtual lookup" joins on tables in
pg_catalog
orinformation_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. #92713 - Fixed a link to index details on the Drop Index Insights in the Cloud Console. #92953
- Fixed a bug where encoding of
ARRAY
type to Parquet format would fail in some cases during theEXPORT
command. #92948 - Fixed a rare panic only present in v22.2.0 that occurs when using particular forms of existing statistics in table statistics forecasting. #92707
- In the presence of several backup files, CockroachDB now speeds up slow listing calls that could manifest as restore queries hanging during execution. #93072
- Prepared statements that use type hints can now succeed type-checking in more cases when the placeholder type is ambiguous. #92834
- Fixed a bug where glob patterns that matched no tables in
GRANT
orREVOKE
statements would return an internal error with a confusing message as opposed to the appropriate "no objects matched" error. #93173 - Fixed a bug where empty
COPY
commands would not escape after an EOF character or error if encountering a\.
with no input. #93100 - 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. #93283
- Fixed the
pg_table_is_visible
built-in function so it correctly reports visibility of indexes based on the currentsearch_path
. #90649 - Fixed a bug that would result in incomplete backups when non-default, non-public resource limiting settings (
kv.bulk_sst.max_request_time
oradmission.elastic_cpu.enabled
) were enabled. #92825 - The
pg_function_is_visible
function now correctly reports visibility based on the functions that are visible on the currentsearch_path
. #90657 - 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. #93487
- 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. #93480 - 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 whenNULLS LAST
was used. #93426 - 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. #93331
- 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 anORDER BY
clause containingASC NULLS LAST
orDESC NULLS FIRST
. #93567 - Fixed a bug where selecting a small timeframe in the past in a timeseries query resulted in no data in the graphs. #93293
- Fixed a bug where CockroachDB would error when receiving Geometry/Geography using binary parameters. #93563
- Fixed an internal error that could occur when comparing a column of type void to
NULL
usingcol IS NULL
orcol IS NOT NULL
. #93652 - Fixed a bug where a query would incorrectly pass if a given interval for
AS OF SYSTEM TIME
interval was a small positive duration. #93146
Performance improvements
- The optimizer will now plan inverted index scans for queries with JSON subscripting filters, like
json_col['field'] = '"value"
. #87957 - CockroachDB now avoids wasteful contention on the gossip mutex caused by checking if the network needs tightening hundreds of times per second. #88472
- Some types of queries with comparisons with constant values now execute faster. #88638
- The optimizer now explores plans with a single lookup join expressions in rare cases where it previously planned two lookup join expressions. #88491
- Consistency checks are now properly cancelled on timeout, preventing them from piling up. #86591
- 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. #86240
- 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. #88950 pg_catalog.col_description
is now much faster when resolving columns for tables in thepg_catalog
,crdb_internal
, orinformation_schema
namespaces. #89465- The optimizer now does less copying of histograms while planning queries, which will reduce memory pressure a little. #88526
- Added early inlining of
VALUES
clauses and unnested arrays inWITH
queries in order to eliminate unnecessary joins. #87790 - Added significantly faster JSON parsing, which should help with any workloads that insert large amounts of JSON data, including
IMPORT
workloads. #89884 - 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. #90198
- Tables in
pg_catalog
andinformation_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. #90116 - The overhead of running
EXPLAIN ANALYZE
andEXPLAIN ANALYZE (DISTSQL)
has been significantly reduced. The overhead ofEXPLAIN ANALYZE (DEBUG)
did not change. #91117 - Enabled more efficient lookup joins 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. #90599 - The setup of the distributed query execution is now fully parallelized which should reduce the query latencies, especially in multi-region setups. #89649
- Performance of the
LIKE
andILIKE
operators using patterns without any wildcards has been improved. #91895 - The optimizer can now better calculate the properties of recursive common table expressions in the presence of a
LIMIT
. #90725 - Certain types of reads will now have a far smaller contention footprint with conflicting concurrent writers. #85993
- 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. #91638
- 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. #92118
- 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 theLIMIT
clause is also present. Note that there was no correctness issue here, only that extra unnecessary rows could be read. #92779 - In 22.2, privileges on virtual tables (system catalogs like
pg_catalog
,information_schema
, andcrdb_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 accessingpg_catalog
right after the server boots up. #93557
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