What's New in v19.1.0-rc.1

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

April 2, 2019

In addition to bug fixes and various enterprise, SQL, and Admin UI enhancements, with this release, we also want to highlight the following feature:

  • Prefer the nearest secondary index: Given multiple identical indexes that have different locality constraints using replication zones, the cost-based optimizer will now prefer the index that is closest to the gateway node that is planning the query. In a properly configured geo-distributed cluster, this can lead to performance improvements due to improved data locality and reduced network traffic. This feature enables scenarios where reference data such as a table of postal codes can be replicated to different regions, and queries will use the copy in the same region.
  • Encryption at Rest: This feature, which provides transparent encryption of a node's data on the local disk, was introduced as an experimental in CockroachDB v2.1. With this release, it is no longer considered experimental and is ready for production use.

Get future release notes emailed to you:


Docker image

$ docker pull cockroachdb/cockroach-unstable:v19.1.0-rc.1

Enterprise edition changes

  • CHANGEFEEDs now support TLS connections to Kafka. #35510
  • CHANGEFEEDs now support SASL/PLAIN authentication when connecting to a Kafka sink. #35800
  • CHANGEFEEDs using Kafka now log information to help debug connection issues. #35661

SQL language changes

  • The cost-based optimizer now picks lookup-joins less frequently. #35561
  • CockroachDB now reports uses of CTEs (WITH ...) and subqueries in diagnostics reporting, to guide future product planning. #35650
  • It is now possible to specify a HASH / MERGE / LOOKUP join hint with cross joins (CROSS <hint> JOIN). #35700
  • The output of EXPLAIN now uses hash-join or merge-join instead of join. #35688
  • Added an EXPLAIN (opt, env) option, which provides all relevant information for the planning of a query. #35802
  • transaction deadline exceeded errors are now returned to the client with a retryable code. #35284
  • Regular SQL errors that indicate erroneous SQL and for which CockroachDB does not yet populate a well-defined PostgreSQL error code will now be reported with code XXUUU instead of code XX000. #35896
  • Removed "experimental" from the names of the two existing automatic statistics cluster settings, and added two new cluster settings to control the target number of stale rows per table that will trigger a statistics refresh. #36085
  • Renamed the experimental_reorder_joins_limit session variable to reorder_joins_limit. #36085
  • Changed SHOW JOBS to no longer display automatic statistics jobs. SHOW AUTOMATIC JOBS can now be used instead to view automatic statistics jobs. #36112
  • The cost-based optimizer will now try to select the index having a leaseholder preference that is closest. #36123
  • Computed columns are now evaluated after rounding any decimal values in input columns. #36128
  • Changed the generation algorithm for the OID column of tables in pg_catalog. As with previous CockroachDB releases, we guarantee that the OID values are consistent between pg_catalog tables (so that tables can be joined together), but we do not guarantee that they are stable across CockroachDB versions. Avoid storing them in client apps. #33697

Command-line changes

Admin UI changes

  • Improved progress reporting for CREATE STATISTICS jobs. #35684
  • The Queries per second metric in the Summary bar now summarizes only the query types displayed in the SQL Queries graph and Node Map. #35905
  • The Jobs screen no longer shows automatic statistics by default. To see these jobs, you must now select Auto-Statistics Creation from the Type menu. #36112

Bug fixes

  • Increased speed of automatic statistic jobs on clusters with low load. #35698
  • CHANGEFEEDs connected to a slow sink now error instead of using unbounded amounts of memory. #35745
  • Removed historical log entries from Raft snapshots that could lead to failed snapshots. #35701
  • Fixed a bug in RESTORE where some unusual range boundaries in interleaved tables caused an error. #36005
  • Fixed an error that occurred when creating statistics on tables with an inverted index. #35982
  • Fixed a panic that occurred when comparing a value to the result of an EXISTS. #36038
  • Fixed an error caused by incorrect calculation of null counts in VALUES clauses. #35997
  • Reduced the occurrence of ASYNC_WRITE_FAILURE transaction retry errors, especially for the first insert into a newly-created table. #36104
  • Fixed panics with the message "unexpected non-pending txn in augmentMetaLocked" caused by distributed queries encountering multiple errors. #36041
  • CHANGEFEEDs with changefeed.push.enabled = true (which is the default) no longer fail when run for longer than the garbage collection window of the source data and a range split occurred. They also now emit dramatically fewer duplicates. #35981
  • Fixed panics caused by certain window functions that operate on tuples. #36124
  • Prevented deadlocks when cancelling distributed queries in some cases. #36122
  • Fixed a planning error that occurred with some IN expressions containing a list of constant and non-constant items. #36134
  • Reduced risk of data unavailability during AZ/region failure. #36133
  • Fixed a planning error that occurred when using set operations with multiple columns and many null values. #36169

Performance improvements

  • Improved performance of the TPC-C benchmark by pre-calculating statistics and injecting them during IMPORT. #35940
  • Reduced the default frequency of automatic statistics refreshes. #35992
  • Improved the selectivity estimation of range predicates during query optimization. #36093

Build changes

  • Go 1.11.6 is now the minimum required version necessary to build CockroachDB. #35909

Doc updates


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

  • Dong Liang (first-time contributor)
YesYes NoNo