What's New in v20.2.9

Cockroach Labs will stop providing Assistance Support for this version on May 10, 2022. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the Release Support Policy.

May 10, 2021

This page lists additions and changes in v20.2.9 since v20.2.8.

Get future release notes emailed to you:


The CockroachDB executable for Windows is experimental and not suitable for production deployments. Windows 8 or higher is required.

Docker image

$ docker pull cockroachdb/cockroach:v20.2.9

SQL language changes

  • Prior to this change, st_simplify with NaN caused a node to crash. The behavior has been changed to align with PostGIS. #63798
  • Validation queries that run on behalf of schema changes, such as foreign key validations, unique constraint validations, and check constraint validations, will now use the vectorized engine and DistSQL distribution based on the defaults set in the cluster settings. This may speed up validation queries. #64005
  • TRUNCATE is now less disruptive on tables with a lot of concurrent traffic. #64445

Bug fixes

  • Fixed a correctness bug which caused partitioned index scans to omit rows where the value of the first index column was NULL. This bug was present since v19.2.0. #64049
  • Fixed a bug where multiple concurrent invocations of cockroach debug zip could result in cluster instability. This bug had been present since CockroachDB v20.1. #64084
  • Fixed a rare bug which could cause a crash if CREATE SCHEMA were run in a transaction which began prior to a cluster version update which enabled that statement. #63786
  • Fixed a race condition where read-only requests during replica removal (e.g., during range merges or rebalancing) could be evaluated on the removed replica, returning an empty result. #64375
  • Fixed a bug where encryption-at-rest metadata was not synced and might become corrupted during a hard reset. #64496
  • Fixed a panic which could occur in cases after a RESTORE of a table using user-defined types. #63550
  • Fixed bugs where TRUNCATE concurrent with index construction and other schema changes could result in corruption. #63153
  • Fixed a bug where upon failure of the CREATE TABLE AS or CREATE MATERIALIZED VIEW statements, tables would be left in an invalid non-public state until GC instead of being marked as dropped, possibly causing spurious validation failures. The bug was introduced in earlier v20.2 testing releases. #63987
  • Fixed crdb_internal.encode_key for user-defined types. This would previously return an error. #64031
  • Fixed a theoretical issue in index backfills that could result in stale entries that would likely fail validation. #64045
  • Fixed a bug where CockroachDB would either return an error or crash when comparing an infinite date coming from a subquery against a timestamp. #64075
  • The CREATE STATISTICS statement no longer fails when creating statistics on a table with a partial index predicate containing references to an inverted-type column, such as JSON, ARRAY, GEOMETRY, or GEOGRAPHY. This bug was present since partial indexes were introduced in v20.2.0. #64226
  • Fixed an issue where store information would be incorrectly redacted from the CockroachDB logs, when configured with redaction. #64333
  • Previously, passwords in SQL statements in telemetry updates and crash reports were anonymized as *****. Passwords are now anonymized as '*****' so that the SQL statements do not result in parsing errors when executed. #64345
  • Previously, the remote flows of execution in the vectorized engine could take quite a long time to shut down whenever a node participating in the plan dies. This has been fixed. #64220
  • CockroachDB now correctly accounts for used memory when closing compressed files. #63916

Performance improvements

  • Certain queries containing <tuple> IN (<subquery>) conditions may run significantly faster. #63869
  • The Raft processing goroutine pool's size is now capped at 96. This was observed to prevent instability on large machines (32+ vCPU) in clusters with many ranges (50k+ per node). #64567
  • The Raft scheduler now prioritizes the node liveness Range. This was observed to prevent instability on large machines (32+ vCPU) in clusters with many ranges (50k+ per node). #64567
  • Reduced memory usage in some write-heavy workloads. Improved write performance when a lot of files are being deleted. Addressed one case where too many small sstable files were generated. #64599

Build changes

  • CockroachDB now builds on Ubuntu 20.10 and other distros using gcc-10. #62201


This release includes 35 merged PRs by 22 authors. We would like to thank the following contributors from the CockroachDB community:

  • Rupesh Harode (first-time contributor)
YesYes NoNo