Note:
Cockroach Labs supports the current stable release and two releases prior. Therefore, this version will no longer be supported after the Spring 2020 release.

April 16, 2018

Get future release notes emailed to you:

Downloads

General Changes

  • Prevent execution errors reporting a missing libtinfo.so.5 on Linux systems. #24513
  • A CockroachDB process will now flush its logs upon receiving SIGHUP.
  • Added a cluster setting for HLC to be monotonic across restarts #23744
  • Added a cluster setting for HLC to panic on clock jumps. #23717
  • Statistics on the types of errors encountered are now included in diagnostics reporting. #22912

Enterprise Edition Changes

  • It is now possible to RESTORE views when using the into_db option. #24555
  • Relaxed the limitation on using BACKUP in a mixed version cluster. #24493
  • BACKUP and RESTORE are more resilient to non-URL-safe characters in query string authentication parameters. #24300
  • The new jobs.registry.leniency cluster setting can be used to allow long-running import jobs to survive temporary node saturation. #23913
  • Added configurable limits on the number of BACKUP/RESTORE requests each store will process. #23517

SQL Language Changes

  • Added configurable limits on the number of IMPORT requests each store will process. #23517
  • The new ALTER TABLE ... INJECT STATS command injects table statistics from a JSON object (which can be obtained via SHOW HISTOGRAM USING JSON). #24488
  • The new SHOW STATISTICS USING JSON variant of SHOW STATISTICS outputs table statistics as a JSON object; it can be used to extract statistics from clusters to reproduce issues. #24488
  • VIRTUAL and WORK are no longer reserved keywords and can again be used as unrestricted names. #24491
  • Added the CANCEL SESSION statement as well as an IF EXISTS variant to CANCEL QUERY. #23861
  • Added a new session_id column to the result of SHOW SESSIONS. #23861
  • Added support for the information_schema.pg_expandarray() function. #24422
  • DROP DATABASE and ALTER DATABASE ... RENAME now prevent the removal of a database name if that database is set as the current database (SET database / USE) and the session setting sql_safe_updates is also set. #24246
  • Added support for naming array types via the _type form and quoted type names. #24190
  • Added the quote_ident() built-in function for increased PostgreSQL compatibility. #24190
  • The behavior of UPSERT and INSERT ... ON CONFLICT when a RETURNING clause is present is now more consistent when an update touches the same row twice or more. This is a CockroachDB-specific extension. #23698
  • Added the statement_timeout session variable. #23399
  • The type determined for constant NULL expressions has been renamed to "unknown" for better compatibility with PostgreSQL. #23142
  • Attempts to modify virtual schemas with DDL statements now fail with a clearer error message. #23044
  • CockroachDB now recognizes the special syntax SET SCHEMA <name> as an alias for SET search_path = <name> for better compatibility with PostgreSQL. #22997
  • Added support for pg_sleep() function. #22804
  • Division by zero now returns the correct error code. #22912
  • The GC of table data after a DROP TABLE now respects changes to the GC TTL interval specified in the relevant replication zone. #22774
  • The full names of tables/views/sequences are now properly logged in the system event log. #22842
  • current_role is now recognized as an alias for current_user for better compatibility with PostgreSQL. #22828
  • The special identifier current_catalog is now supported as an alias for current_database() for better compatibility with PostgreSQL. #22828
  • Added the skip option to the IMPORT command. #23466
  • The service latency tracked for SQL statements now includes the wait time of the execute message in the input queue. #22880

Command-Line Changes

  • The cockroach gen autocomplete command can now generate zsh-compatible completion files by passing zsh as an argument. #24400
  • Removed the cockroach load csv subcommand. #24319
  • When cockroach gen haproxy is run, if an haproxy.cfg file already exists in the current directory, it now gets fully overwritten instead of potentially resulting in an unusable config. #24332
  • The new cockroach demo command opens a SQL shell connected to a fully in-memory store, and an empty database named demo. It's useful for users or developers who wish to test out Cockroach's SQL dialect. #24259
  • Replication zones now allow for specifying an ordered list of lease placement preferences. Whenever possible, CockroachDB will attempt to put the lease for a range on a store that satisfies the first set of constraints. If that's not possible, it'll attempt to put the lease on a store that satisfies the second set of constraints, and so on. If none of the preferences can be met, the lease will be placed as it is today. #23202
  • Bracketed pastes are requested from the terminal emulator when possible. Pasting text into the interactive SQL shell is more reliable as a result. #23116
  • The cockroach sql command now reminds you about SET database = ... and CREATE DATABASE if started with no current database. #23077
  • Per-replica constraints in replication zones no longer have to add up to the total number of replicas in a range. If all replicas aren't specified, then the remaining replicas will be allowed on any store. #23057

Admin UI Changes

  • Removed explicit back links on Events and Nodes pages. #23904
  • Added a new debug page to display all cluster settings. #24064
  • While the Logs page loads, a spinner is now shown instead of a "no data" message. #23496
  • The Logs page now uses a monospaced font, properly renders newlines, and packs lines together more tightly. #23496
  • The Node Map now shows how long a node has been dead. #23255

Bug Fixes

  • Fixed a bug when using fractional units (e.g., 0.5GiB) for the --cache and --sql-max-memory flags of cockroach start. #24381
  • Fixed the handling of role membership lookups within transactions. #24284
  • Fixed a panic around inverted index queries using the -> operator. #24576
  • JSONB values can now be cast to STRING values. #24518
  • Fixed a panic caused by a WHERE condition that requires a column to equal a specific value and at the same time equal another column. #24506
  • Fixed panics resulting from distributed execution of queries with OID types. #24431
  • Fixed a bug where an expected transaction heartbeat failure aborted the transaction. #24134
  • Fixed a bug causing index backfills to fail in a loop after exceeding the GC TTL of their source table. #24293
  • Inverted index queries involving NULL are now properly handled. #24251
  • Fixed a bug involving Npgsql and array values. #24227
  • Fixed a panic caused by passing a Name type to has_database_privilege(). #24252
  • On-disk checksums are now correctly generated during IMPORT. If there is existing data created by IMPORT that cannot be recreated, use cockroach dump to rewrite any affected tables. #24128
  • Attempts to RESTORE to a time later than that covered by the latest BACKUP are now rejected. #23727
  • Fixed a bug that could prevent disk space from being reclaimed. #23136
  • Replication zone configs no longer accept negative numbers as input. #22870
  • Fixed the occasional selection of sub-optimal rebalance targets. #23036
  • The cockroach dump command is now able to dump sequences with non-default parameters. #23051
  • SHOW TABLES is once again able to inspect virtual schemas. #22994
  • The CREATE TABLE .. AS statement now properly supports placeholders in the subquery. #23006
  • Fixed a bug where ranges could get stuck in an infinite "removal pending" state and would refuse to accept new writes. #22916
  • Arrays now support IS [NOT] DISTINCT FROM operators. #23005
  • Fixed incorrect index constraints on primary key columns on unique indexes. #22977
  • Fixed a bug that prevented joins on interleaved tables with certain layouts from working. #22920
  • The conversion from INTERVAL to FLOAT now properly returns the number of seconds in the interval. #22892
  • Fix a panic cause sometimes by Flush protocol messages. #24119

Performance Improvements

  • Deleting many rows at once now consumes less memory. #22991
  • Fewer disk writes are required for each database write, increasing write throughput and reducing write latency. #22317
  • Reduced the amount of memory used during garbage collection of old versions. #24209
  • Greatly improved the performance of the DISTINCT operator when its inputs are known to be sorted. #24438 #24148
  • Write requests that result in no-ops are no longer proposed through Raft. #24345

Build Changes

  • Release binaries are now built with enough debug information to produce useful CPU profiles and backtraces. #24296

Contributors

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

  • Mahmoud Al-Qudsi
  • Vijay Karthik (first-time contributor)


Yes No