What's New in v20.2.0-rc.1

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.

October 15, 2020


A denial-of-service (DoS) vulnerability is present in CockroachDB v20.2.0 - v20.2.3 due to a bug in protobuf. This is resolved in CockroachDB v20.2.4 and later releases. When upgrading is not an option, users should audit their network configuration to verify that the CockroachDB HTTP port is not available to untrusted clients. We recommend blocking the HTTP port behind a firewall.

For more information, including other affected versions, see Technical Advisory 58932.

Get future release notes emailed to you:


Docker image

$ docker pull cockroachdb/cockroach-unstable:v20.2.0-rc.1

Known limitations

  • The new Docker image (see release note below) does not work with the CockroachDB Kubernetes manifest, so customers using Kubernetes cannot upgrade to this testing release. This will be fixed in the next testing release (see tracking issue).

Backward-incompatible changes

  • CockroachDB Docker images are now based on the RedHat UBI 8 base image instead of Debian 9.12 slim. This will help on-premise customers from a security and compliance perspective. #55130
  • For PostgreSQL compatibility, the CREATEROLE privilege is no longer inherited by children of a role which has that privilege. For example, say we run these statements: CREATE ROLE parent WITH CREATEROLE; CREATE ROLE child; GRANT parent TO child; Previously, the child role would have the CREATEROLE privilege. Now it will not. In order to grant this privilege to the child role, it is necessary to run ALTER ROLE child WITH CREATEROLE. #55305

Security updates

General changes

  • This change affects schema change jobs originally initiated on clusters running CockroachDB v19.2 or earlier which have not reached a terminal state (i.e., succeeded, failed, or canceled), and which have not finished undergoing an automatic internal migration to allow them to run in v20.1 clusters. These jobs will now be marked as failed upon upgrading to v20.2. Users who have ongoing schema changes initiated in v19.2 are advised to wait for them to finish running on v20.1 before upgrading to v20.2 (at the very least, wait until at least the v20.1 internal migration for the job has completed, which is indicated in the logs). This may also affect users who have schema change jobs from prior to v20.1 which are stuck in a non-terminal state due to bugs despite making no progress. In this case, marking the job as failed has no real effect. #54902

SQL language changes

  • Implemented the geometry built-in functions ST_SwapOrdinates and ST_OrderingEquals. #54564
  • Setting and retrieving zone configurations on tables from non-public schemas is now permitted. #54849
  • A string literal like '{X, Y, Z}' is now automatically casted to an ARRAY when appropriate. Support is added for UUID, DATE, BOOL, TIME, TIMETZ, TIMESTAMP, TIMESTAMPTZ, FLOAT, INET, VARBIT, and INTERVAL arrays. Note that INT and DECIMAL arrays were already supported. #54944
  • The sql.mem.root timeseries is now available to track the accounted memory usage of all memory in the cluster. #54904
  • Populated the datdba field of pg_catalog.pg_database. This was previously DNull. #55069
  • SHOW SEQUENCES now displays sequences in user-defined schemas. The schema is now displayed in a newly added sequence_schema column. #55175
  • Added the parent_schema_id field to crdb_internal.tables. #55264

Command-line changes

  • The --help texts and informational messages upon server start-up have been modified to better inform the user about the nature and risks of the --insecure flag. #55025

DB Console changes

  • The DB Console's Databases page now includes tables that live within user-defined schemas. #54901
  • Added a SQL Memory graph to the SQL Metrics dashboard that tracks the current number of bytes in all SQL memory accounts. This number is a current snapshot of the number whose maximum is set by --max-sql-memory. #54904

Bug fixes

  • Fixed a bug where previous testing releases of v20.2 would not properly clear grants and owners on non-cluster restores. #54854
  • Fixed a bug in v20.2 testing releases that under-accounted for scan memory. Note that the bug wasn't a regression from v20.1, which never had any scan memory accounting at all. #54894
  • Fixed issue when jobs duration could be negative value or increased periodically for finished jobs. #54872
  • Fixed a rare bug which could lead to index backfills failing in the face of transaction restarts. #54858
  • Fixed a bug which led to inscrutable errors being returned when creating a backup failed; for example, due to protected timestamp limits. #54967
  • Fixed a bug where a transaction restart at the wrong moment during a restore could leave descriptors offline after the restore completed successfully. #54965
  • Fixed a bug where the presence of types or schemas in a database to be restored would prevent the database from being cleaned up on restore failure. #55060
  • Previously, canceling schema changes when there were multiple queued schema changes could result in future schema changes being stuck. This has been fixed. #55056
  • Fixed an error that could occur during planning when attempting to create or use a partial index. The error implied that the partial index could not be used (e.g., "my_index is a partial index that does not contain all the rows needed to execute this query") when in fact the partial index could be used correctly. #55080
  • Cross-database temporary schemas are now properly resolved. #55198
  • Previously, restoring a cluster backup that contained user-defined schemas or user-defined types in defaultdb would fail. #55249
  • Options set on users (e.g., ALTER USER u CREATEDB) were not included in cluster backups and thus not restored. Role options have been introduced in v20.2. #55250
  • Previously, all tables in any schema showed up as public in the schema_name column in the crdb_internal table. They now display the correct schema. #55264


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

  • Azdim Zul Fahmi (first-time contributor)
  • Erik Grinaker
YesYes NoNo