What's New in v2.1.1

This version of CockroachDB is no longer supported. For more details, see the Release Support Policy.

November 19, 2018

Get future release notes emailed to you:


Docker image

$ docker pull cockroachdb/cockroach:v2.1.1

SQL language changes

  • Renamed the first column name returned by SHOW STATISTICS to statistics_name. #32045
  • CockroachDB now de-correlates and successfully executes many queries containing correlated EXISTS subqueries. Previously, these queries caused a de-correlation error. #32026
  • If diagnostics reporting is enabled, attempts to use CREATE/DROP SCHEMA, DEFERRABLE, CREATE TABLE (LIKE ...), CREATE TABLE ... WITH, and the "fetch limit" parameter (e.g., via JDBC) will now be collected as telemetry to gauge demand for these currently unsupported features. Also, the name of SQL built-in functions will be collected upon evaluation errors. #31638

Bug fixes

  • Fixed a small memory leak when running distributed queries. #31759
  • The confkey column of pg_catalog.pg_constraint no longer includes columns that were not involved in the foreign key reference. #31895
  • The cost-based optimizer no longer chooses the wrong index for a scan because of incorrect selectivity estimation. #32011
  • Fixed a bug that caused transactions to unnecessarily return a "too large" error. #31821
  • Fixed rare deadlocks during IMPORT, RESTORE, and BACKUP. #32016
  • Fixed a panic caused by incorrectly encoded Azure credentials. #32016
  • Fixed a bug in the cost-based optimizer that sometimes prevented passing ordering requirements through aggregations. #32089
  • Fixed a bug that sometimes caused invalid results or an "incorrectly ordered stream" error with streaming aggregations. #32097
  • Fixed a bug that caused some queries with DISTINCT ON and ORDER BY with descending columns to return an error incorrectly. #32175
  • Fixed a bug that caused queries with GROUP BY or DISTINCT ON to return incorrect results or an "incorrectly ordered stream" error. Also improved performance of some aggregations by utilizing streaming aggregation in more cases. #32175
  • Fixed a panic caused by an incorrect assumption in the SQL optimizer code that ROWS FROM clauses contain only functions. #32168
  • Fix an error returned by cockroach node status after a new node is added to the cluster at a previous node's address. #32198
  • Fixed a mismatch between lookup join planning and execution, which could cause queries to fail with the error "X lookup columns specified, expecting at most Y". #31896
  • Fixed a bug that caused transactions to appear partially committed. CockroachDB was sometimes claiming to have failed to commit a transaction when some (or all) of its writes were actually persisted. #32220
  • Prevented long stalls that can occur in contended transactions. #32217
  • Non-superusers can no longer see other users' sessions and queries via the ListSessions and ListLocalSessions status server API methods. #32284
  • The graphite metrics sender now collects and sends only the latest data point instead of all data points since startup. #31888

Performance improvements

  • Improved the performance of AS OF SYSTEM TIME queries by letting them use the table descriptor cache. #31756
  • The cost-based optimizer can now determine more keys in certain cases involving unique indexes, potentially resulting in better plans. #32044
  • Within a transaction, when performing a schema change after the table descriptor has been modified, accessing the descriptor should be faster. #31756

Doc updates


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

  • Vijay Karthik
  • neeral
YesYes NoNo