What's New in v21.1.0-beta.5

April 29, 2021

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-unstable:v21.1.0-beta.5

Backward-incompatible changes

  • The internal representation of the voter_constraints zone configuration attribute (new in v21.1) has been altered in a way that is partially incompatible with the representation used by previous v21.1 betas (and the alphas that include this attribute). This means that users who directly set the voter_constraints attribute to an empty list will lose those constraints and will have to reset them. #63674

General changes

  • Upgraded the CockroachDB binary to Go 1.15.10. #63865

Enterprise edition changes

  • Changefeeds will now fail on any regional by row table with an error, CHANGEFEED cannot target REGIONAL BY ROW tables: <table_name>. This is to prevent unexpected behavior in changefeeds until they offer full support for this type of table. #63542

SQL language changes

  • RESTORE now re-validates restored indexes if they were restored from an incremental backup that was taken while the index was being created. #63320
  • The sql.distsql.temp_storage.workmem cluster setting is now marked as public and is included in the documentation. It determines how much RAM a single operation of a single query can use before it must spill to temporary storage. Note the operations that do not support the disk spilling will ignore this setting and are subject only to the --max-sql-memory startup argument. #63997
  • SQL executor data validation queries spawned by a schema change or a RESTORE will now use vectorized query execution and DistSQL optimization if these are enabled in the cluster settings sql.defaults.distsql and sql.defaults.vectorized, respectively. This may improve the speed of these queries. [#64004][#64004]

Bug fixes

  • Allow the leases of offline descriptors to be cached, preventing issues with lease acquisitions during bulk operations (backup and restore operations). #63558
  • Fixed bugs where TRUNCATE concurrent with index construction and other schema changes could result in corruption. #63143
  • Fixed a panic condition which could occur in cases after a RESTORE of a table with user-defined types. #63549
  • CockroachDB now prevents a panic condition and offers a graceful error when spatial function ST_Segmentize attempts to generate an extremely large number of points on a GEOGRAPHY. #63758
  • Previously, running the ST_Simplify spatial function on a non-numeric value would cause the node to crash. This is now resolved. #63797
  • CockroachDB now uses the existing primary key to validate indexes built for ALTER PRIMARY KEY changes. #63609
  • Fixed occasional stalls and excessive CPU usage under macOS Big Sur when building CockroachDB with Go 1.14 or newer. #63789
  • Fixed a bug where crdb_internal.validate_multi_region_zone_configs() would fail during a REGIONAL BY ROW locality transition. #63834
  • Fixed an internal error that could occur when executing queries using an inverted index. The error was an index out of range error, and could occur in rare cases when a filter or join predicate contained at least two JSON, Array, Geometry or Geography expressions that were combined with AND. This has now been fixed. #63811
  • Fixed a bug leading to crashes with the error message writing below closed ts. #63861
  • Previously, if a user altered a table to REGIONAL BY ROW when a region was being dropped, and the drop failed and had to be rolled back, it could have resulted in the regional by row table missing a partition for this region. This is now fixed. #63793
  • Prevent an internal error use of enum metadata before hydration as an enum when querying or showing ranges from tables with user-defined types as their PRIMARY KEY. #63878
  • Fixed a theoretical issue in index backfills that could result in stale entries that would likely fail validation. [#64044][#64044]
  • CockroachDB now correctly accounts for used memory when closing compressed files. #63917

Performance improvements

  • CockroachDB now limits a series of heap allocations when serving read-only queries. #63972
  • CockroachDB now limits the amount of memory that can be used in internal buffers for Kafka and cloud sinks. #63611


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

  • Miguel Novelo (first-time contributor)
  • Rupesh Harode (first-time contributor)
YesYes NoNo