August 16, 2021
- For a comprehensive summary of features in v20.2, see the v20.2 GA release notes.
- To upgrade to v20.2, see Upgrade to CockroachDB v20.2.
Get future release notes emailed to you:
Downloads
Warning:
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.14
Security updates
- The
cert-principal-map
flag passed tocockroach
commands now allows the certificate principal name to contain colons. #67811 - The node status retrieval endpoints over HTTP [
/_status/nodes
,/_status/nodes/<N>
and the DB Console/#/reports/nodes
) now require theadmin
role from the requesting user. This ensures that operational details such as network addresses and command-line flags do not leak to unprivileged users. This change means that the Overview page and Hardware dashboard of the DB Console will not show all details for non-admin
users. #67069
Enterprise edition changes
- Incremental backups to a cloud storage location that already contains large existing backups now find their derived destination without listing as many remote files. #67289
SQL language changes
- Added a new
EXPLAIN
flag,MEMO
, to be used withEXPLAIN (OPT)
. When theMEMO
flag is passed, a representation of the optimizer memo will be printed along with the best plan. TheMEMO
flag can be used in combination with other flags such asCATALOG
andVERBOSE
. For example,EXPLAIN (OPT, MEMO, VERBOSE)
will print the memo along with verbose output for the best plan. #67778
DB Console changes
- The DB Console will now redirect the user to the originally requested page after user login. #67859
Bug fixes
- Fixed a statement buffer memory leak when using suspended portals. #67370
- Correlated subqueries that couldn't be decorrelated and that have their own subqueries are now executed correctly when supported. Note that this is a very rare edge case. #67571
- Fixed a very rare unexpected error from the vectorized engine ("index out of bounds") when evaluating the
CASE
operator. #67785 - Catching up Raft followers on the Raft log is now more efficient in the presence of many large Raft log entries. This helps avoid situations where Raft leaders struggle to retain leadership while catching up their followers. #67126
- Fixed a rare bug when a lease change occured during a range merge. This bug allowed
AS OF SYSTEM TIME
queries to serve inconsistent results. #65823 - The v20.2 SQL shell now properly reports detailed execution timings (using the client-side configuration setting
verbose_times
) when run against a v21.1+ server. #67853 - Fixed a deadlock that could occur when many replicas were rapidly queued for removal. #65861
- Fixed two bugs which affected geospatial queries with the
st_distance
function. The first caused errors for filters of the formst_distance(g1, g2, use_spheroid) = 0
. The second incorrectly transformed filters of the formst_distance(g1, g2) = 0
wheng1
andg2
are geographies tost_instersects(g1, g2)
. This is not a valid transformation becausest_distance
makes spheroid-based calculations by default whilest_intersects
only makes sphere-based calculations. #67412 - Fixed an issue with statistics estimation in the optimizer that could have caused it to over-estimate the number of rows for some expressions and thus choose a sub-optimal plan. This issue could happen when multi-column statistics were used in combination with histograms, the query contained a predicate on two or more columns where the columns were hightly correlated, and the selected values were very common according to the histograms. #68012
- Fixed an issue where CockroachDB could encounter an internal error or crash when performing a cast of a
NULL
JSON
value to Geography or Geometry types. #67903 INSERT
andUPDATE
statements which operate on larger rows are now split into batches using thesql.mutations.mutation_batch_byte_size
setting. #67963- Fixed a rare bug that could result in a crash while creating a
debug.zip
. The bug would only occur if adebug.zip
was captured during a period of rapid lease movement. #67727 - Fixed a rare crash when a backup writing to Google Cloud Storage failed while writing a file. #68258
- Fixed missing foreign key checks in some cases when there are multiple checks and the inserted data contains a
NULL
for one of the checks. #68521 - Fixed a bug that prevented upreplication of an underreplicated range while in a joint quorum configuration. #68576
Performance improvements
- Improved the selectivity estimate for array containing predicates (for example,
arr @> ARRAY[1]
) in the optimizer. This improves the optimizer's cardinality estimation for queries containing these predicates, and may result in better query plans in some cases. #67530 - Updated the cost model in the optimizer to make index joins more expensive and better reflect the reality of their cost. As a result, the optimizer will choose index joins less frequently, generally resulting in more efficient query plans. #67530
- Improved the performance of the
pg_table_is_visible
builtin function. #68113
Contributors
This release includes 35 merged PRs by 22 authors. We would like to thank the following contributors from the CockroachDB community:
- joesankey (first-time contributor)