What's New in v20.2.7

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.

March 29, 2021

This page lists additions and changes in v20.2.7 since version v20.2.6.


Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v20.2.0 - v20.2.7. If a backup coincides with an in-progress index creation (backfill), RESTORE, or IMPORT, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.

Users are advised to upgrade to v20.2.8 or later, which includes resolutions.

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

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.7

SQL language changes

  • The following cluster settings were added or changed:
    • sql.defaults.statement_timeout was added to control the default value for the statement_timeout session setting.
    • sql.defaults.idle_in_transaction_session_timeout was added to control the default value for the idle_in_transaction_session_timeout timeout setting.
    • sql.defaults.idle_in_session_timeout is now a public cluster setting. #62185

Bug fixes

  • Previously, changefeeds were checking the SELECT privilege on every descriptor associated with targeted tables, including the database and custom types. They now only check SELECT on the targeted tables. #61661
  • The names of custom types are no longer sent to Cockroach Labs in telemetry and crash reports. #61645
  • Fixed a bug where some import failures would cause tables to stay OFFLINE when they should have been brought back to PUBLIC. #61480
  • Fixed a runtime error observed with a SpanFromContext call in the stack trace. #61703
  • Exporting data to userfile locations now works correctly. #61789
  • The indexdef column in the pg_indexes table would always report that the index belonged to the public schema. Now it correctly reports user-defined schemas if necessary. #61753
  • Previously, when using SHOW, the idle_in_session_timeout and idle_in_transaction_session_timeout settings would incorrectly display the value of the statement_timeout setting. This is now fixed. #61958
  • Fixed a bug where random numbers generated as default expressions during an IMPORT would be likely to match (collide with) other generated values in the same column. #61630
  • Previously, using EXPLAIN (OPT, ENV) would fail when used on a query that referenced a table in a user-defined schema. This is now fixed. #61890
  • Fixed a bug that caused column does not exist errors in specific cases of UPDATE ... FROM statements. The error occurred when updating a DECIMAL column to a column in the FROM clause where the column had a CHECK constraint or was referenced by a partial index predicate. #61953
  • Fixed command is too large errors in some cases when using EXPLAIN ANALYZE (DEBUG) or statement diagnostics on complex queries. #61910
  • Previously, the target column of crdb_internal.zones would show names without properly accounting for user-defined schemas. This is now fixed. #62019
  • Dropping and recreating a view/table/sequence in a transaction will now correctly error out if a conflicting object exists or if the drop is incomplete. #62343
  • Fixed a bug that sometimes caused queries sent to a freshly restarted node to hang for a long time while the node caught up with replication. #62204
  • Previously, the pg_type_is_visible builtin function did not correctly handle user-defined types. This is now fixed. #62231
  • Fix a bug where full cluster restore would sometimes (very rarely) fail after retrying. #61217
  • Fixed a bug where an enum with large numbers of values might cause unexpected errors when attempting to read from tables with columns using that enum. #62211


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

  • Tharun (first-time contributor)
YesYes NoNo