---
title: What's New in v20.1.6
toc: true
summary: Additions and changes in CockroachDB version v20.1.6 since version v20.1.5
---
## September 24, 2020
Get future release notes emailed to you:
### Downloads
### Docker image
{% include copy-clipboard.html %}
~~~shell
$ docker pull cockroachdb/cockroach:v20.1.6
~~~
### SQL language changes
- The concurrency of the evaluation of [`UNION ALL`](../v20.1/selection-queries.html#union-combine-two-queries) queries has been reduced. Previously, such queries could crash a server (in extreme cases, due to memory shortage). That bug is now fixed, at the expense of possible minor reduction in performance. [#53444][#53444]
### Bug fixes
- The [cluster Node Map](../v20.1/admin-ui-cluster-overview-page.html#node-map-enterprise) and the [debug page](../v20.1/admin-ui-debug-pages.html) for cluster locality reports are now again available to non-admin users. [#53331][#53331]
- Previously, CockroachDB could return incorrect results when performing `LEFT ANTI` [hash joins](../v20.1/joins.html#hash-joins) when the right equality columns formed a key and the query was executed with the [vectorized engine](../v20.1/vectorized-execution.html). This bug has been fixed. [#53346][#53346]
- Fixed a rare internal error related to [foreign key checks](../v20.1/foreign-key.html). [#53648][#53648]
- CockroachDB could previously crash when evaluating queries containing [window functions](../v20.1/window-functions.html) with the `GROUPS` framing mode when ` FOLLOWING` boundary was used and the offset was a very large value such that it could result in an integer overflow. This is now fixed. [#53755][#53755]
- Fixed the "no binding for WithID" internal error when using [`WITH RECURSIVE`](../v20.1/common-table-expressions.html#recursive-common-table-expressions) in queries with placeholders. [#54037][#54037]
- A change in v20.1 caused a certain class of bulk [`UPDATE`](../v20.1/update.html) and [`DELETE`](../v20.1/delete.html) statements to hang indefinitely if run in an implicit transaction. We now break up these statements to avoid starvation and prevent them from hanging indefinitely. [#53561][#53561]
- Fixed a bug that could cause [garbage collection](../v20.1/architecture/storage-layer.html#garbage-collection) jobs for tables dropped as part of a [`DROP DATABASE CASCADE`](../v20.1/drop-database.html) to never complete. [#54129][#54129]
- Fixed a bug that caused a crash when using a `RANGE`-mode [window function](../v20.1/window-functions.html) with an offset (e.g, `OVER (PARTITION BY b ORDER BY a RANGE 1 PRECEDING)`). [#54075][#54075]
- Fixed a bug that could cause the asynchronous migration to upgrade jobs from v19.2 to fail to complete and keep retrying indefinitely upon encountering a dropped database where some, but not all, of the tables have already been cleaned up. This bug can only occur if an upgrade to v20.1 happened while a database was in the process of being [dropped](../v20.1/drop-database.html) or a set of tables was being [truncated](../v20.1/truncate.html). [#51176][#51176]
- Asynchronous schema change migrations now mark a job as failed instead of retrying indefinitely when a descriptor referenced by a schema change job does not exist. [#51176][#51176]
- Fixed a potential race condition in the schema change job migration from v19.2 that could cause spurious errors and retries due to the wrong transaction being used internally. [#51176][#51176]
- Fixed a bug that allowed new types to be used in an [array type](../v20.1/array.html) during a [version upgrade](../v20.1/upgrade-cockroach-version.html). [#53962][#53962]
- Database [creation](../v20.1/create-database.html) and [deletion](../v20.1/drop-database.html) was previously not correctly tracked by `revision_history` cluster backups. This is now fixed. [#53806][#53806]
- Fixed two bugs that caused CockroachDB to return errors when attempting to add [constraints](../v20.1/constraints.html) in the same transaction in which the table was created:
1. Adding a [`NOT NULL` constraint](../v20.1/not-null.html) no longer fails with the error `check ... does not exist`.
2. Adding a `NOT VALID` [foreign key constraint](../v20.1/foreign-key.html) no longer fails with the internal error `table descriptor is not valid: duplicate constraint name`. [#54288][#54288]
- Fixed a bug that could lead to out-of-memory errors when [dropping](../v20.1/drop-table.html) large numbers of tables at a high frequency. [#54285][#54285]
- CockroachDB could previously crash in rare circumstances when many queries running in the cluster were consuming a lot of memory and at least one query was running through the [vectorized execution engine](../v20.1/vectorized-execution.html). This is now fixed. [#54406][#54406]
- In releases v20.1.4 and v20.1.5, CockroachDB might finish [`UPSERT`](../v20.1/upsert.html) operations too early. A simple `UPSERT` would correctly insert up to 10,000 rows and then ignore the rest. An `UPSERT` with a `RETURNING` clause would process up to 10,000 rows but return no rows. For more information, see [Technical Advisory 54418](../advisories/a54418.html). [#54418][#54418]
### Contributors
This release includes 27 merged PRs by 15 authors.
[#51176]: https://github.com/cockroachdb/cockroach/pull/51176
[#53331]: https://github.com/cockroachdb/cockroach/pull/53331
[#53346]: https://github.com/cockroachdb/cockroach/pull/53346
[#53444]: https://github.com/cockroachdb/cockroach/pull/53444
[#53561]: https://github.com/cockroachdb/cockroach/pull/53561
[#53648]: https://github.com/cockroachdb/cockroach/pull/53648
[#53755]: https://github.com/cockroachdb/cockroach/pull/53755
[#53806]: https://github.com/cockroachdb/cockroach/pull/53806
[#53962]: https://github.com/cockroachdb/cockroach/pull/53962
[#54037]: https://github.com/cockroachdb/cockroach/pull/54037
[#54075]: https://github.com/cockroachdb/cockroach/pull/54075
[#54129]: https://github.com/cockroachdb/cockroach/pull/54129
[#54285]: https://github.com/cockroachdb/cockroach/pull/54285
[#54288]: https://github.com/cockroachdb/cockroach/pull/54288
[#54380]: https://github.com/cockroachdb/cockroach/pull/54380
[#54406]: https://github.com/cockroachdb/cockroach/pull/54406
[#54418]: https://github.com/cockroachdb/cockroach/pull/54418