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

April 12, 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.

Beta releases are intended for testing and experimentation only. Beta releases are not recommended for production use, as they can lead to data corruption, cluster unavailability, performance issues, etc.

Docker image

$ docker pull cockroachdb/cockroach-unstable:v21.1.0-beta.3

Enterprise edition changes

SQL language changes

Multi-region SQL changes

  • Users can now use a multi-region ALTER DATABASE command if:

    • The user is an admin user
    • The user is the owner of the database.
    • The user has CREATE privileges on the database. #62528
  • Availability zones are now ordered when using the SHOW REGIONS set of commands. #62619

General SQL changes

  • Added the stub_catalog_tables session variable, which is enabled by default. If disabled, querying an unimplemented pg_catalog table will result in an error, as is the case in v20.2 and earlier. Otherwise, the query will simply return no rows. #62621

DB Console changes

Bug fixes

  • Fixed a bug that in rare circumstances could cause an implicitly committed (STAGING) transaction to be uncommitted if any unresolved intents were removed by a range clear (e.g. when cleaning up a dropped table). This bug fix is only effective with separated intents, which are disabled by default. #62376
  • Added a DuplicateObject error code for when a user attempts to ADD REGION to a database where the region already exists. #62491
  • Fixed an internal error that could occur during planning for queries involving tables with many columns and at least one inverted index. The error, "estimated distinct count must be non-zero", was caused by an invalid pointer access in the cardinality estimation code. This has now been fixed. #62545
  • Writing files to userfile would sometimes result in an error claiming that the userfile table already exists. This is now fixed. #62544
  • When adding/dropping regions from a multi-region database, the user must now have privileges on all regional-by-row tables as these are implicitly re-partitioned under the hood. #62612
  • Fixed an internal error caused by comparing collation names that had different upper/lower case characters. #62637
  • Fixed a bug whereby ENUM types which have large numbers of values would cause unexpected errors when attempting to read from tables with columns using that ENUM type. #62210
  • Fixed a bug introduced in earlier v21.1 alpha releases which could cause panics when dropping indexes on tables partitioned by user-defined types. #62725
  • Fixed a bug from earlier v21.1 alpha releases whereby dropping an index on a table partitioned by a user-defined type and then dropping the table and then dropping the type before the GC TTL for the index has expired could result in a crash. #62725

Performance improvements

  • Improved the performance of the vectorized engine when scanning fewer than 1024 rows at a time. #62365
  • Improved logic in determining the configuration for data to avoid expensive work when there are a large number of user-defined schemas. #62577
  • Addressed a performance regression from a past change regarding read-triggered compactions. #62676


This release includes 37 merged PRs by 23 authors.

YesYes NoNo