What's New in v2.0

On this page Carat arrow pointing down
Warning:
CockroachDB v2.0 is no longer supported as of October 4, 2019. For more details, refer to the Release Support Policy.

On this page, you can read about changes and find downloads for all production and testing releases of CockroachDB v2.0.

Get future release notes emailed to you:

To upgrade to v2.0, see Upgrade to CockroachDB v2.0.

v2.0.7

Release Date: December 10, 2018

Downloads

Docker image

icon/buttons/copy
$ docker pull cockroachdb/cockroach:v2.0.7

Bug fixes

  • Fixed a security vulnerability in which data could be leaked from a cluster, or tampered with in a cluster, in secure mode. #30823
  • Fixed a bug where queries could get stuck for seconds or minutes, usually following node restarts. #31350
  • CockroachDB no longer crashes due to a SIGTRAP error soon after startup on macOS Mojave. #31522
  • Fixed bug causing transactions to unnecessarily hit a "too large" error. #31827
  • Fixed a bug causing transactions to appear partially committed. Occasionally, CockroachDB claimed to have failed to commit a transaction when some (or all) of its writes were actually persisted. #32223
  • Fixed a bug where entry application on Raft followers could fall behind entry application on the leader, causing stalls during splits. #32601
  • CockroachDB now properly rejects queries that use an invalid function (e.g., an aggregation) in the SET clause of an UPDATE statement. #32507

Build changes

  • CockroachDB can now be built from source on macOS 10.14 (Mojave). #31310

Contributors

This release includes 11 merged PRs by 6 authors.

v2.0.6

Release Date: October 1, 2018

Downloads

Security bug fix

  • Fixed a vulnerability in which TLS certificates were not validated correctly for internal RPC interfaces. This vulnerability could allow an unauthenticated user with network access to read and write to the cluster. #30821

Command-line changes

  • The cockroach zone command is now compatible with CockroachDB v2.1. However, note that cockroach zone is also deprecated in CockroachDB v2.1 in favor of ALTER ... CONFIGURE ZONE and SHOW ZONE CONFIGURATION statements to update and view replication zones. #29632

Bug fixes

  • The Jobs page now sorts by Creation Time by default instead of by User. #30429
  • Fixed out-of-memory errors caused by very large raft logs. #28398 #28526
  • Fixed a rare scenario where the value written for one system key was seen when another system key was read, leading to the violation of internal invariants. #28798
  • Fixed a memory leak when contended queries time out. #29100
  • Fixed a bug causing index creation to fail under rare circumstances. #29203
  • Fixed a panic that occurred when not all values were present in a composite foreign key. #30154
  • The ON DELETE CASCADE and ON UPDATE CASCADE foreign key actions no longer cascade through NULLs. #30129
  • Fixed the occasional improper processing of the WITH operand with IMPORT/BACKUP/RESTORE and common table expressions. #30199
  • Transaction size limit errors are no longer returned for transactions that have already committed. #30309
  • Fixed a potential infinite loop when the merge joiner encountered an error or cancellation. #30380
  • This release includes the following fixes to the cockroach sql command:
    • The command now properly prints a warning when a ? character is mistakenly used to receive contextual help in a non-interactive session, instead of crashing. #28325
    • The command now works properly even when the TERM environment variable is not set. #28614
    • The commands are now properly able to customize the prompt with ~/.editrc on Linux. #28614
    • The commands once again support copy-pasting special unicode character from other documents. #28614

Performance improvements

  • Greatly improved the performance of catching up followers that are behind when Raft logs are large. #28526

Contributors

This release includes 26 merged PRs by 12 authors.

v2.0.5

Release Date: August 13, 2018

Downloads

SQL language changes

  • The binary Postgres wire format is now supported for INTERVAL values. #28135

Bug fixes

  • IMPORT no longer silently converts rn characters in CSV files into n. #28225
  • Fixed a bug that could cause the row following a deleted row to be skipped during BACKUP. #28196
  • Limited the size of "batch groups" when committing a batch to RocksDB to avoid rare scenarios in which multi-gigabyte batch groups are created, which can cause a server to run out of memory when replaying the RocksDB log at startup. #28009
  • Prevented unbounded growth of the Raft log caused by a loss of quorum. #27868
  • CockroachDB now properly reports an error when a query attempts to use ORDER BY within a function argument list, which is an unsupported feature. #25147

Doc updates

Contributors

This release includes 9 merged PRs by 7 authors. We would like to thank the following contributor from the CockroachDB community:

  • neeral

v2.0.4

Release Date: July 16, 2018

Downloads

SQL Language Changes

  • CHECK constraints are now checked when updating a conflicting row in INSERT ... ON CONFLICT DO UPDATE statements. #26699
  • An error is now returned to the user instead of panicking when trying to add a column with a UNIQUE constraint when that column's type is not indexable. #26728

Command-Line Changes

  • CockroachDB now computes the correct number of replicas on down nodes. Therefore, when decommissioning nodes via the cockroach node decommission command, the --wait=all option no longer hangs indefinitely when there are down nodes. As a result, the --wait=live option is no longer necessary and has been deprecated. #27158

Bug Fixes

  • Fixed a typo on Node Map screen of the Admin UI. #27129
  • Fixed a rare crash on node decommissioning. #26717
  • Joins across two interleaved tables no longer return incorrect results under certain circumstances when the equality columns aren't all part of the interleaved columns. #26832
  • Successes of time series maintenance queue operations are no longer counted as errors in the Metrics dashboard of the Admin UI. #26820
  • Prevented a situation in which ranges repeatedly fail to perform a split. #26944
  • Fixed a crash that could occur when distributed LIMIT queries were run on a cluster with at least one unhealthy node. #26953
  • Failed IMPORTs now begin to clean up partially imported data immediately and in a faster manner. #26986
  • Alleviated a scenario in which a large number of uncommitted Raft commands could cause memory pressure at startup time. #27024
  • The pg-specific syntax SET transaction_isolation now supports settings other than SNAPSHOT. This bug did not affect the standard SQL SET TRANSACTION ISOLATION LEVEL. #27047
  • The DISTINCT ON clause is now reported properly in statement statistics. #27222
  • Fixed a crash when trying to plan certain UNION ALL queries. #27233
  • Commands are now abandoned earlier once a deadline has been reached. #27215
  • Fixed a panic in IMPORT when creating a table using a sequence operation (e.g., nextval()) in a column's DEFAULT expression. #27294

Doc Updates

Contributors

This release includes 22 merged PRs by 17 authors. We would like to thank the following contributors from the CockroachDB community, with special thanks to first-time contributors Emmanuel.

  • Emmanuel
  • neeral

v2.0.3

Release Date: June 18, 2018

Downloads

General Changes

SQL Language Changes

Command-Line Changes

  • The cockroach sql command no longer prompts for a password when a certificate is provided. #26232
  • The cockroach quit command now prints warning messages to the standard error stream, not to standard output. #26163

Bug Fixes

  • Prevented the internal gossip network from being partitioned by making it much less likely that nodes in the network could forget about each other. #25521
  • Prevented spurious BudgetExceededErrors for some queries that read a lot of JSON data from disk. #25719
  • Fixed a crash in some cases when using a GROUP BY with HAVING. #25654
  • Fixed a crash caused by inserting data into a table with computed columns that reference other columns that weren't present in the INSERT statement. #25807
  • UPSERT is now properly able to write NULL values to every column in tables containing more than one column family. #26181
  • Fixed a bug where a long-running query running from one day to the next would not always produce the right value for current_date(). #26413
  • Fixed a bug where cockroach quit would erroneously fail even though the node already successfully shut down. #26163
  • Rows larger than 8192 bytes are now supported by the "copy from" protocol. #26641
  • Trying to "copy from stdin" into a table that doesn't exist no longer drops the connection. #26641
  • Previously, expired compactions could stay in the queue forever. Now, they are removed when they expire. #26659

Performance Improvements

  • The performance impact of dropping a large table has been substantially reduced. #26615

Doc Updates

Contributors

This release includes 19 merged PRs by 14 authors.

v2.0.2

Release Date: May 21, 2018

Downloads

General Changes

  • The header of new log files generated by cockroach start will now include the cluster ID once it has been determined. #24982
  • The cluster ID is now reported with tag [config] in the first log file, not only when log files are rotated. #24982
  • Stopped spamming the server logs with "error closing gzip response writer" messages. #25108

SQL Language Changes

  • Added more ways to specify an index name for statements that require one (e.g., DROP INDEX, ALTER INDEX ... RENAME, etc.), improving PostgreSQL compatibility. #24817
  • Clarified the error message produced upon accessing a virtual schema with no database prefix (e.g., when database is not set). #24809
  • STORED is no longer a reserved keyword and can again be used as an unrestricted name for databases, tables and columns. #24864
  • Errors detected by SHOW SYNTAX are now tracked internally like other SQL errors. #24900
  • IMPORT now supports hex-encoded byte literals for BYTES columns. #25063
  • Collated strings can now be used in WHERE clauses on indexed columns. #25175
  • The Level and Type columns of EXPLAIN (VERBOSE) results are now hidden; if they are needed, they can be SELECTed explicitly. #25206

Admin UI Changes

  • Added RocksDB compactions/flushes to storage graphs. #25457

Bug Fixes

  • It is once again possible to use a simply qualified table name in qualified stars (e.g., SELECT mydb.kv.* FROM kv) for compatibility with CockroachDB v1.x. #24842
  • Fixed a scenario in which a node could deadlock while starting up. #24831
  • Ranges in partitioned tables now properly split to respect their configured maximum size. #24912
  • Some kinds of schema change errors that were stuck in a permanent loop now correctly fail. #25015
  • When adding a column, CockroachDB now verifies that the column is referenced by no more than one foreign key. Existing tables with a column that is used by multiple foreign key constraints should be manually changed to have at most one foreign key per column. #25079
  • CockroachDB now properly reports an error when using the internal-only functions final_variance() and final_stddev() instead of causing a crash. #25218
  • The constraint_schema column in information_schema.constraint_column_usage now displays the constraint's schema instead of its catalog. #25220
  • Fix a panic caused by certain queries containing OFFSET and ORDER BY. #25238
  • BEGIN; RELEASE SAVEPOINT now returns an error instead of causing a crash. #25251
  • Fixed a rare segfault that occurred when reading from an invalid memory location returned from C++. #25361
  • Fixed a bug with IS DISTINCT FROM not returning NULL values that pass the condition in some cases. #25339
  • Restarting a CockroachDB server on Windows no longer fails due to file system locks in the store directory. #25439
  • Prevented the consistency checker from deadlocking. This would previously manifest itself as a steady number of replicas queued for consistency checking on one or more nodes and would resolve by restarting the affected nodes. #25474
  • Fixed problems with IMPORT sometimes failing after node decommissioning. #25307
  • Fixed a bug causing PREPARE to hang when run in the same transaction as a CREATE TABLE statement. #24874

Build Changes

  • Build metadata, like the commit SHA and build time, is properly injected into the binary when using Go 1.10 and building from a symlink. #25062

Doc Updates

  • Improved the documentation of the now(), current_time(), current_date(), current_timestamp(), clock_timestamp(), statement_timestamp(), cluster_logical_timestamp(), and age() built-in functions. #25383 #25145

Contributors

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

  • Garvit Juniwal
  • Jingguo Yao

v2.0.1

Release Date: April 23, 2018

Downloads

General Changes

  • The new server.clock.persist_upper_bound_interval cluster setting can be used to guarantees monotonic wall time across server restarts. #24624
  • The new server.clock.forward_jump_check_enabled cluster setting can be used to cause nodes to panic on clock jumps. #24606
  • Prevented execution errors reporting a missing libtinfo.so.5 on Linux systems. #24531

Enterprise Edition Changes

  • It is now possible to RESTORE views when using the into_db option. #24590
  • The new jobs.registry.leniency cluster setting can be used to allow long-running IMPORT jobs to survive temporary node saturation. #24505
  • Relaxed the limitation on using BACKUP in a mixed version cluster. #24515

SQL Language Changes

  • Improved the error message returned on object creation when no current database is set or only invalid schemas are in the search_path. #24812
  • The current_schema() and current_schemas() built-in functions now only consider valid schemas, like PostgreSQL does. #24758
  • The experimental SQL features SHOW TESTING_RANGES and ALTER ... TESTING_RELOCATE have been renamed SHOW EXPERIMENTAL_RANGES and ALTER ... EXPERIMENTAL_RELOCATE. #24699
  • ROLE, VIRTUAL, and WORK are no longer reserved keywords and can again be used as unrestricted names. #24665 #24549

Command-Line Changes

  • 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. #24336

Bug Fixes

  • Fixed a bug when using fractional units (e.g., 0.5GiB) for the --cache and --sql-max-memory flags of cockroach start. #24388
  • Fixed the handling of role membership lookups within transactions. #24334
  • Fixed a bug causing some lookup join queries to report incorrect type errors. #24825
  • ALTER INDEX ... RENAME can now be used on the primary index. #24777
  • Fixed a panic involving inverted index queries using the -> operator. #24596
  • Fix a panic involving inverted index queries over NULL. #24566
  • Fixed a bug preventing inverted index queries that have a root with a single entry or element but multiple children overall. #24376
  • JSONB values can now be cast to STRING values. #24553
  • Prevented executing distributed SQL operations on draining nodes. #23916
  • 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. #24517
  • Fixed a panic caused by passing a Name type to has_database_privilege(). #24270
  • Fixed a bug causing index backfills to fail in a loop after exceeding the GC TTL of their source table. #24427
  • Fixed a panic caused by null config zones in diagnostics reporting. #24526

Performance Improvements

  • Some SELECTs with limits no longer require a second low-level scan, resulting in much faster execution. #24796

Contributors

This release includes 39 merged PRs by 16 authors. Special thanks to Vijay Karthik from the CockroachDB community.

v2.0.0

Release Date: April 4, 2018

With the release of CockroachDB v2.0, we’ve made significant performance improvements, expanded our PostgreSQL compatibility by adding support for JSON (among other types), and provided functionality for managing multi-regional clusters in production.

Downloads

Summary

This section summarizes the most significant user-facing changes in v2.0.0. For a complete list of features and changes, including bug fixes and performance improvements, see the release notes for previous testing releases.

Enterprise Features

These new features require an enterprise license. You can register for a 30-day trial license.

Feature Description
Table Partitioning Table partitioning gives you row-level control of how and where your data is stored. This feature can be used to keep data close to users, thereby reducing latency, or to store infrequently-accessed data on slower and cheaper storage, thereby reducing costs.
Node Map The Node Map in the Admin UI visualizes the geographical configuration of a multi-region cluster by plotting the node localities on a world map. This feature provides real-time cluster metrics, with the ability to drill down to individual nodes to monitor and troubleshoot cluster health and performance.
Role-Based Access Control Roles simplify access control by letting you assign SQL privileges to groups of users rather than to individuals.
Point-in-time Backup/Restore (Beta) Data can now be restored as it existed at a specific point-in-time within the revision history of a backup.

This is a beta feature. It is currently undergoing continued testing. Please file a Github issue with us if you identify a bug.

Core Features

These new features are freely available in the core version and do not require an enterprise license.

SQL

Feature Description
JSON Support The JSONB data type and inverted indexes give you the flexibility to store and efficiently query semi-structured data.
Sequences Sequences generate sequential integers according to defined rules. They are generally used for creating numeric primary keys.
SQL Audit Logging (Experimental) SQL audit logging gives you detailed information about queries being executed against your system. This feature is especially useful when you want to log all queries that are run against a table containing personally identifiable information (PII).

This is an experimental feature. Its interface and output are subject to change.
Common Table Expressions Common Table Expressions (CTEs) simplify the definition and use of subqueries. They can be used in combination with SELECT clauses and INSERT, DELETE, UPDATE and UPSERT statements.
Computed Columns Computed columns store data generated from other columns by an expression that's included in the column definition. They are especially useful in combination with table partitioning, JSONB columns, and secondary indexes.
Foreign Key Actions The ON UPDATE and ON DELETE foreign key actions control what happens to a constrained column when the column it's referencing (the foreign key) is deleted or updated.
Virtual Schemas For PostgreSQL compatibility, CockroachDB now supports a three-level structure for names: database name > virtual schema name > object name. The new SHOW SCHEMAS statement can be used to list all virtual schemas for a given database.
IMPORT The IMPORT statement now imports tabular data in a fully distributed fashion, and import jobs can now be paused, resumed, and cancelled.
INET The INET data type stores an IPv4 or IPv6 address.
TIME The TIME data type stores the time of day without a time zone.

Operations

Feature Description
Node Readiness Endpoint The new /health?ready=1 endpoint returns an HTTP 503 Service Unavailable status response code with an error when a node is being decommissioned or is in the process of shutting down and is therefore not able to accept SQL connections and execute queries. This is especially useful for making sure load balancers do not direct traffic to nodes that are live but not "ready", which is a necessary check during rolling upgrades.
Node Decommissioning Nodes that have been decommissioned and stopped no longer appear in Admin UI and command-line interface metrics.
Per-Replica Constraints in Replication Zones When defining a replication zone, unique constraints can be defined for each affected replica, meaning you can effectively pick the exact location of each replica.
Replication Zone for "Liveness" Range Clusters now come with a pre-defined replication zone for the "liveness" range, which contains the authoritative information about which nodes are live at any given time.
Timeseries Data Controls It is now possible to reduce the amount of timeseries data stored by a CockroachDB cluster or to disable the storage of timeseries data entirely. The latter is recommended only when using a third-party tool such as Prometheus for timeseries monitoring.

Backward-Incompatible Changes

Change Description
Replication Zones Positive replication zone constraints no longer work. Any existing positive constraints will be ignored. This change should not impact existing deployments since positive constraints have not been documented or supported for some time.
Casts from BYTES to STRING Casting between these types now works the same way as in PostgreSQL. New functions encode() and decode() are available to replace the former functionality.
NaN Comparisons NaN comparisons have been redefined to be compatible with PostgreSQL. NaN is now equal to itself and sorts before all other non-NULL values.
DROP USER It is no longer possible to drop a user with grants; the user's grants must first be revoked.
Cluster Settings The obsolete kv.gc.batch_size cluster setting has been removed.
Environment Variables The COCKROACH_METRICS_SAMPLE_INTERVAL environment variable has been removed. Users that relied on it should reduce the value for the timeseries.resolution_10s.storage_duration cluster setting instead.
Sequences As of the v1.2-alpha.20171113 release, how sequences are stored in the key-value layer changed. Sequences created prior to that release must therefore be dropped and recreated. Since a sequence cannot be dropped while it is being used in a column's DEFAULT expression, those expressions must be dropped before the sequence is dropped, and recreated after the sequence is recreated. The setval() function can be used to set the value of a sequence to what it was previously.
Reserved Keywords ROLE, VIRTUAL, and WORK have been added as reserved keywords and are no longer allowed as identifiers.

Known Limitations

For information about limitations we've identified in CockroachDB v2.0, with suggested workarounds where applicable, see Known Limitations.

Documentation Updates

Topic Description
Production Checklist This topic now provides cloud-specific hardware, security, load balancing, monitoring and alerting, and clock synchronization recommendations as well as expanded cluster topology guidance. Related deployment tutorials have been enhanced with much of this information as well.
Monitoring and Alerting This new topic explains available tools for monitoring the overall health and performance of a cluster and critical events and metrics to alert on.
Common Errors This new topic helps you understand and resolve errors you might encounter, including retryable and ambiguous errors for transactions.
SQL Performance This new topic provides best practices for optimizing SQL performance in CockroachDB.
SQL Standard Comparison This new topic lists which SQL standard features are supported, partially-supported, and unsupported by CockroachDB.
Selection Queries This new topic explains the function and syntax of queries and operations involved in reading and processing data in CockroachDB, alongside more detailed information about ordering query results, limiting query results, subqueries, and join expressions.

v2.0-rc.1

Release Date: April 2, 2018

This is the first release candidate for CockroachDB v2.0. All known bugs have either been fixed or pushed to a future release, with large bugs documented as known limitations.

  • Improved the Node Map to provide guidance when an enterprise license or additional configuration is required. #24271
  • Bug fixes and stability improvements.

Downloads

Admin UI Changes

  • Improved the Node Map to provide guidance when an enterprise license or additional configuration is required. #24271
  • Added the available storage capacity to the Cluster Overview metrics. #24254

Bug Fixes

  • Fixed a bug in RESTORE that could lead to missing rows if the RESTORE was interrupted. #24089
  • New nodes running CockroachDB v2.0 can now join clusters that contain nodes running v1.1. #24257
  • Fixed a crash in cockroach zone ls that would happen if a table with a zone config on it had been deleted but not yet garbage collected. (This was broken in v2.0 alphas, not in v1.1.) #24180
  • Fixed a bug where zooming on the Node Map could break after zooming out to the maximum extent. #24183
  • Fixed a crash while performing rolling restarts. #24260
  • Fixed a bug where privileges were sometimes set incorrectly after upgrading from an older release. #24393

Contributors

This release includes 11 merged PRs by 10 authors. We would like to thank all contributors from the CockroachDB community, with special thanks to first-time contributor Vijay Karthik.

v2.0-beta.20180326

Release Date: March 26, 2018

Downloads

General Changes

  • A CockroachDB process now flushes its logs upon receiving SIGHUP instead of SIGUSR1 as it did earlier. This is aimed to simplify the automation of process monitoring, test, and backup tools. #23783
  • Information about zone config usage is now included in diagnostic reports. #23750

Enterprise Edition Changes

SQL Language Changes

  • SQL features introduced in CockroachDB v2.0 cannot be used in clusters that are not upgraded fully to v2.0. #24013
  • Added an escape option to the encode() and decode() built-in functions. #23781
  • Introduced a series of PostgreSQL-compatible, privilege-related built-in functions. #23839
  • Added the pg_language table to the pg_catalog virtual schema. #23839
  • Added the anyarray type to the pg_type virtual schema. #23836
  • Retryable errors on schema change operations are now less likely to be returned to clients; more operations are retried internally. #24050

Command-Line Changes

  • Client commands now report a warning if the connection URL is specified by the --url as well as some other command-line flag. If you use the --url flag, other flags can fill in pieces missing from the URL.
  • Added per-node heap profiles to the debug zip command output. #23858

Admin UI Changes

  • More debug pages are now locked down by the server.remote_debugging.mode cluster setting. #24022
  • The Network Diagnostics report no longer crashes when the latencies are very small or on a single node cluster. #23868
  • Fixed the flicker in the Node Map as data is being reloaded. #23757
  • Fixed the text overflowing past the table cell boundaries on the Jobs page. #23748
  • Updated the labels for the Snapshots graph on the Replication dashboard to be more specific. #23742
  • Fixed a bug where graphs would not display on clusters with large numbers of nodes. #24045
  • Decommissioned nodes no longer appear in the node selection dropdown on the Metrics page. #23800
  • Fixed a condition where a persistent trailing dip could appear in graphs for longer time periods. #23874

Bug Fixes

  • Redacted string values in debug API responses. #24070
  • Old replicas are now garbage collected in a more timely fashion after a node has been offline for a long time (this bug only exists in recent v2.0 alpha/beta releases, not in v1.1). #24066
  • Fixed a bug where some inverted index queries could return incorrect results. #23968
  • Fixed the behavior of the @> operator with arrays and scalars. #23969
  • Inverted indexes can no longer be hinted for inappropriate queries. #23989
  • Enforced minimum privileges for the admin role. #23935
  • A panic is now avoided if the SQL audit log directory does not exist when the node is started. #23928
  • Supported Postgres syntax for USING GIN. #23910
  • Fixed a bug where INSERT/DELETE/UPDATE/UPSERT may lose updates if run using WITH or the [ ... ] syntax. #23895
  • Made sure that all built-in functions have a unique Postgres OID for compatibility. #23880
  • Fixed an error message generated by the experimental SCRUB feature. #23845
  • Fixed a bug where CREATE VIEW after ALTER TABLE ADD COLUMN would fail to register the dependency on the newly added column. #23845
  • Fixed crashes or incorrect results when combining an OUTER JOIN with a VALUES clause that contains only NULL values on a column (or other subqueries which result in a NULL column). #23838
  • Fixed rare nil pointer exception in rebalance target selection. #23807
  • The cockroach zone set command will now automatically retry if it encounters an error while setting zone configurations. #23782
  • Fixed a bug where closing a connection in the middle of executing a query sometimes crashed the server. #23761
  • Fixed a bug where expressions could be mistakenly considered equal, despite their types being different. #23722
  • Fixed a bug where the RANGE COUNT metric on the Cluster Overview page of the Admin UI could significantly undercount the number of ranges. #23746
  • The client URL reported upon cockroach start now does not include the option application_name. #23894

Performance Improvements

  • Improved cluster performance during overload scenarios. #23884

Doc Updates

Contributors

This release includes 64 merged PRs by 23 authors. We would like to thank the following contributors from the CockroachDB community, with special thanks to first-time contributors Bob Vawter.

v2.0-beta.20180319

Release Date: March 19, 2018

In this release, we’ve improved CockroachDB’s ability to run in orchestrated environments and closed several Postgres capability gaps.

  • Better /health behavior to support orchestrated deployments. #23551

Downloads

SQL Language Changes

  • NO CYCLE and CACHE 1 are now supported options during sequence creation. #23518
  • ISNULL and NOTNULL are now accepted as alternatives to IS NULL and IS NOT NULL. #23518

Command-Line Changes

Admin UI Changes

  • Implemented a spinner on the Logs page instead of saying "No Data" while loading. #23556
  • Now using monospace font and rendering new lines on the Logs page. Also, packed lines together more tightly. #23556
  • Moved the Clock Offset graph from the Distributed dashboard to the Runtime dashboard. Now displaying each node's clock offset independently rather than aggregating them together. #23627
  • When reporting anonymous usage details, locality tier names are now redacted. #23588
  • Clicking on the entire node component is now allowed in the Node Map, not just the visible elements. #23536
  • The Node Map now shows how long a node has been dead. #23404
  • Correct liveness status text now displays on nodes in the Node Map. #23404

Bug Fixes

  • Fixed a bug in which the usable capacity of nodes was not added up correctly in the Admin UI. #23695
  • An ARRAY can now be used with the PostgreSQL binary format. #23467
  • Fixed a panic when a query would incorrectly attempt to use an aggregation or window function in ON CONFLICT DO UPDATE. #23658
  • CREATE TABLE AS can now be used with scalar subqueries. #23470
  • Connection attempts to former members of the cluster and the associated spurious log messages are now prevented. #23605
  • Fixed a panic when executing INSERT INTO ... SELECT queries where the number of columns targeted for insertion does not match the number of columns returned by the SELECT. #23642
  • Reduced the risk that a node in the process of crashing could serve inconsistent data. #23616
  • Fixed a correctness bug where some ORDER BY queries would not return the correct results under concurrent transactional load. #23602
  • RETURNING NOTHING now properly detects parallel statement execution opportunities against statements that contain data-modifying statements in subqueries. #23524
  • The /health HTTP endpoint is now accessible before a node has successfully become part of an initialized cluster, meaning that it now accurately reflects the health of the process rather than the ability of the process to serve queries. This has been the intention all along, but it didn't work until the node had joined a cluster or had cockroach init run on it. #23551
  • Fixed a panic that could occur with certain types of casts. #23535
  • Prevented a hang while crashing when stderr is blocked. #23484
  • Fixed panics related to distributed execution of queries with REGCLASS casts. #23482
  • Fixed a panic with computed columns. #23435
  • Added prevention against potential consistency issues when a node is stopped and restarted in rapid succession. #23339
  • Decommissioning a node that has already been terminated now works in all cases. Success previously depended on whether the gateway node "remembered" the absent decommissioned node. #23378

Build Changes

  • Go 1.10 is now the minimum required version necessary to build CockroachDB. #23494

Doc Updates

Contributors

This release includes 48 merged PRs by 21 authors.

v2.0-beta.20180312

Release Date: March 12, 2018

In this release, we’ve enhanced our debug pages to support graphing custom metrics, improved handling of large deletes, and fixed several bugs.

  • Custom graph debug page #23227
  • Improve handling of large deletes #23289

Downloads

Build Changes

  • Binaries are now built with Go 1.10 by default. #23311

General Changes

  • Logging data is now flushed to files every second to aid troubleshooting and monitoring. Synchronization to disk is performed separately every 30 seconds. #23231
  • Disabling diagnostics reporting also disables new version notification checks. #23007
  • Removed the diagnostics.reporting.report_metrics cluster setting, which is duplicative with the COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING environment variable. #23007
  • All internal error messages are now logged when logging is set to a high enough verbosity. #23127

SQL Language Changes

  • Improved handling of large DELETE statements. They are now either allowed to complete or exited with an error message indicating that the transaction is too large to complete. #23289
  • The pg_catalog virtual tables, as well as the special casts ::regproc and ::regclass, can now only be queried by clients that set a current database. #23148

Command-Line Changes

  • When a node spends more than 30 seconds waiting for an init command or to join a cluster, a help message now gets prints to stdout. #23181

Admin UI Changes

  • Added a new debug page that allows users to create a "custom" graph displaying any combination of metrics. #23227
  • In the geographical map on the homepage of the Admin UI enterprise version, node components now link to Note Details page. #23283
  • Removed the Keys Written per Second per Store graph. #23303
  • Added the Lead Transferee field to the Range Debug page. #23241

Bug Fixes

  • Fixed a correctness bug where some ORDER BY queries would not return the correct results. #23541
  • The Admin UI no longer hangs after a node's network configuration has changed. #23348
  • The binary format for JSONB values is now supported. #23215
  • A node now waits in an unready state for the length of time specified by the server.shutdown.drain_wait cluster setting before draining. This helps ensure that load balancers will not send client traffic to a node about to be drained. #23319
  • Fixed a panic when using UPSERT ... RETURNING with UNION. #23317
  • Prevented disruptions in performance when gracefully shutting down a node. #23300
  • Hardened the cluster version upgrade mechanism. Rapid upgrades through more than two versions could sometimes fail recoverably. #23287
  • Fixed a deadlock when tables are rapidly created or dropped. #23288
  • Fixed a small memory leak in IMPORT CSV. #23259
  • Prevented a panic in DistSQL under certain error conditions. #23201
  • Added a readiness endpoint (/health?ready=1) for better integration with load balancers. #23247
  • Fixed a zero QPS scenario when gracefully shutting down a node. #23246
  • Secondary log files (e.g., the SQL execution log) are now periodically flushed to disk, in addition to the flush that occurs naturally when single log files are full (--log-file-max-size) and when the process terminates gracefully. Log file rotation is also now properly active for these files. #23231
  • Previously, the ranges column in the node status command output only included ranges whose raft leader was on the node in question. It now includes the count of all ranges on the node, regardless of where the raft leader is. #23180
  • Fixed a panic caused by empty COCKROACH_UPDATE_CHECK_URL or COCKROACH_USAGE_REPORT_URL environment variables. [#23008][#23008]
  • Prevented stale reads caused by the system clock moving backwards while the cockroach process is not running. #23122
  • Corrected the handling of cases where a replica fails to retrieve the last processed timestamp of a queue. #23127
  • Fixed a bug where the liveness status would not always display correctly on the single-node page in the Admin UI. #23193
  • Fixed a bug that showed incorrect descriptions on the Jobs page in the Admin UI. #23256

Doc Updates

Contributors

This release includes 44 merged PRs by 21 authors.

v2.0-beta.20180305

Release Date: March 5, 2018

This week's release includes:

  • Improved support for large delete statements.
  • Reduced disruption during upgrades and restarts.
  • Reduced occurrence of serializable transaction restarts.
Warning:
This release has a bug that may result in incorrect results for certain queries using JOIN and ORDER BY. This bug will be fixed in next week's beta.

Downloads

Backwards-Incompatible Changes

  • Sequences are now supported in enterprise BACKUP/RESTORE jobs.

    This changes how sequences are stored in the key-value storage layer, so existing sequences must be dropped and recreated. Since a sequence cannot be dropped while it is being used in a column's DEFAULT expression, those expressions must be dropped before the sequence is dropped, and recreated after the sequence is recreated. The setval() function can be used to set the value of a sequence to what it was previously. #21684

  • Positive constraints in replication zone configs no longer work. Any existing positive constraints will be ignored. This change should not impact existing deployments since positive constraints have not been documented or supported for some time. #22906

Build Changes

  • CockroachDB now builds with go 1.9.4 and higher. #22608

General Changes

Enterprise Edition Changes

  • Revision history BACKUP/RESTORE is no longer considered experimental. #22679
  • Revision history BACKUP/RESTORE now handles schema changes. #21717
  • CockroachDB now checks that a backup actually contains the requested restore time. #22659
  • Improved BACKUP's handling of tables after TRUNCATE. #21895
  • Ensured that only the backups created by the same cluster can be used in incremental backups. #22474
  • Avoided extra internal copying of files during RESTORE. #22281
  • Added a geographical map to the homepage of the Admin UI enterprise version, showing the location of nodes and localities in the cluster. The map is annotated with several top-level metrics: storage capacity used, queries per second, and current CPU usage, as well as the liveness status of nodes in the cluster. [#22763][#22763]

SQL Language Changes

  • The type determined for constant NULL expressions is renamed to unknown for better compatibility with PostgreSQL. #23150
  • Deleting multiple rows at once now consumes less memory. #23013
  • Attempts to modify virtual schemas with DDL statements now fail with a clearer error message. #23041
  • The new SHOW SCHEMAS statement reveals which are the valid virtual schemas next to the physical schema public. #23041
  • CockroachDB now recognizes the special syntax SET SCHEMA <name> as an alias for SET search_path = <name> for better compatibility with PostgreSQL. #23041
  • current_role() and current_catalog() are supported as aliases for the current_user() and current_database() built-in functions for better compatibility with PostgreSQL. #23041
  • CockroachDB now returns the correct error code for division by zero. #22948
  • The GC of table data after a DROP TABLE statement now respects changes to the GC TTL interval specified in the zone config #22903
  • The full names of tables/view/sequences are now properly logged in the system event log. #22848
  • CockroachDB now recognizes the syntax db.public.tbl in addition to db.tbl for better compatibility with PostgreSQL. The handling of the session variable search_path, as well as that of the built-in functions current_schemas() and current_schema(), is now closer to that of PostgreSQL. Thus SHOW TABLES FROM can now inspect the tables of a specific schema (for example, SHOW TABLES FROM db.public or SHOW TABLES FROM db.pg_catalog). SHOW GRANTS also shows the schema of the databases and tables. #22753
  • Users can now configure auditing per table and per access mode with ALTER TABLE. #22534
  • SQL execution logs enabled by the cluster setting sql.trace.log_statement_execute now go to a separate log file. This is an experimental feature meant to aid troubleshooting CockroachDB. #22534
  • Added the string_to_array() built-in function. #22391
  • Added the constraint_column_usage table and roles-related tables to the information_schema database. #22323 #22242
  • IMPORT no longer requires the experimental setting. #22531
  • Computed columns and CHECK constraints now correctly report column names in the case of a type error. #22500
  • The output of JSON data now matches that of PostgreSQL. #22393
  • Allowed IMPORT jobs to be paused. IMPORT jobs now correctly resume instead of being abandoned if the coordinator goes down. #22291
  • Removed the into_db option in IMPORT. The database is now specified as part of the table name. #21813
  • Changed computed column syntax and improved related error messages. #22429
  • Implemented additional INET column type operators such as contains and contained by, binary operations, and addition/subtraction.
  • Implemented the following operators for INET column types: <<, <<=, >>, >>=, &&, +, -, ^, |, &. These operators are compatible with PostgreSQL 10 and are described in Table: 9.36 of the PostgreSQL documentation. #21437
  • CockroachDB now properly rejects incorrectly-cased SQL function names with an error. #22365
  • Allowed DEFAULT expressions in the CREATE TABLE of an IMPORT CSV. The expressions are not evaluated (data in the CSV is still required to be present). This change only allows them to be part of the table definition. #22307
  • Added the #- operator for JSON. #22375
  • The SET transaction_isolation statement is now supported for better PostgreSQL compatibility. #22389
  • Allowed creation of computed columns. #21823
  • Avoided extra internal copying of files during IMPORT. #22281
  • Casts between array types are now allowed when a cast between the parameter types is allowed. #22338
  • Scalar functions can now be used in FROM clauses. #22314
  • Added privilege checks on sequences. #22284
  • The ON DELETE SET DEFAULT, ON UPDATE SET DEFAULT, ON DELETE SET NULL, and ON UPDATE SET NULL foreign key constraint actions are now fully supported. #22220 #21767 #21716
  • The ON DELETE CASCADE and ON UPDATE CASCADE foreign key constraint actions can now also contain CHECK constraints. #22535
  • JSON inverted indexes can now be specified in a CREATE TABLE statement. #22217
  • When a node is gracefully shut down, planning queries are avoided and distributed queries are allowed the amount of time specified by the new server.drain_max_wait cluster setting before the node is drained and stopped. #20450
  • Collated string are now supported in IMPORT jobs. #21859
  • The new SHOW GRANTS ON ROLE statement and pg_catalog.pg_auth_members table lists role memberships. #22205 #21780
  • Role memberships are now considered in permission checks. #21820

Command-Line Changes

  • Replication zone constraints can now be specified on a per-replica basis, meaning you can configure some replicas in a zone's ranges to follow one set of constraints and other replicas to follow other constraints. #22906
  • Per-replica constraints no longer have to add up to the total number of replicas in a range. If you do not specify all the replicas, then the remaining replicas will be allowed on any store. #23081
  • cockroach sql now reminds the user about SET database = ... and CREATE DATABASE if started with no current database set. #23089
  • Error messages displayed while connecting to a server with an incompatible version have been improved. #22709
  • The --cache and --max-sql-memory flags of cockroach start now also support decimal notation to support a fraction of total available RAM size, e.g., --cache=.25 is equivalent to --cache=25%. This simplifies integration with system management tools. #22460
  • When printing tabular results as CSV or TSV, no final row count is emitted. This is intended to increase interoperability with external tools. #20835
  • The pretty formatter does not introduce special unicode characters in multi-line table cells, for better compatibility with certain clients. To disambiguate multi-line cells from multiple single-line cells, a user can use WITH ORDINALITY to add a row numbering column. #22324
  • Allowed specification of arbitrary RocksDB options. #22401
  • Debug commands now open RocksDB in read-only mode. This makes them faster and able to run in parallel. #21778
  • The cockroach dump command now outputs CREATE SEQUENCE statements before the CREATE TABLE statements that use them. #21774
  • For better compatibility with psql's extended format, the table formatter records now properly indicates line continuations in multi-line rows. #22325
  • The cockroach sql client-side option show_times is now always enabled when output goes to a terminal, not just when display_format is set to pretty. #22326
  • When formatting cockroach sql results with --format=sql, the row count is now printed in a SQL comment at the end. #22327
  • When formatting cockroach sql results with --format=csv or --format=tsv, result rows that contain special characters are now quoted properly. #19306

Admin UI Changes

  • Decommissioned nodes are no longer included in cluster stats aggregates. #22711
  • Time series metrics dashboards now show their own title rather than the generic "Cluster Overview". #22746
  • The URLs for Admin UI pages have been reorganized to provide more consistent structure to the site. Old links will redirect to the new location of the page. #22746
  • Nodes being decommissioned are now included in the total nodes count until they are completely decommissioned. #22690
  • Added new graphs for monitoring activity of the time series system. #22672
  • Disk usage for time series data is now visible on the Databases page. #22398
  • Added a ui-clean task. #22552
  • Added an icon to indicate when descriptions in the Jobs table are shortened and expandable. #22221
  • Added "compaction queue" graphs to the Queues dashboard. #22218
  • Added Raft snapshot queue metrics to the Queue dashboard. #22210
  • Dead nodes are now displayed before live nodes on the Nodes List page. #22222
  • Links to documentation in the Admin UI now point to the docs for v2.0. #21894

Bug Fixes

  • Fixed an issue where Admin UI graph tooltips would continue to display zero values for nodes which had long been decommissioned. #22626
  • Fixed an issue where Admin UI graphs would occasionally have a persistent "dip" at the leading edge of data. #22570
  • Fixed an issue where viewing Admin UI graphs for very long time spans (e.g., 1 month) could cause excessive memory usage. #22392
  • Fixed padding on the Node Diagnostics page of the Admin UI. #23019
  • Corrected the title of the decommissioned node list, which was mistakenly updated to say "Decommissioning". #22703
  • Fixed a bug in cockroach dump output with SEQUENCES. #22619
  • Fixed a bug that created uneven distribution of data (or failures in some cases) during IMPORT of tables without an explicit primary key. #22542
  • Fixed a bug that could prevent disk space from being reclaimed. #23153
  • Replication zone configs no longer accept negative numbers as input. #23081
  • Fixed the occasional selection of sub-optimal rebalance targets. #23081
  • cockroach dump is now able to dump sequences with non-default parameters. #23062
  • Arrays now support the IS [NOT] DISTINCT FROM operators. #23090
  • SHOW TABLES is now again able to inspect virtual schemas. #23041
  • The special form of CREATE TABLE .. AS now properly supports placeholders in the subquery. #23046
  • Fixed a bug where ranges could get stuck in an infinite "removal pending" state and would refuse to accept new writes. #23024
  • Fixed incorrect index constraints on primary key columns on unique indexes. #23003
  • Fixed a panic when upgrading quickly from v1.0.x to v2.0.x #22971
  • Fixed a bug that prevented joins on interleaved tables with certain layouts from working. #22935
  • The service latency tracked for SQL statement now includes the wait time of the execute message in the input queue. #22881
  • The conversion from INTERVAL to FLOAT now properly returns the number of seconds in the interval. #22894
  • Fixed incorrect query results when the WHERE condition contains IN expressions where the right-hand side tuple contains NULLs. #22735
  • Fixed incorrect handling for IS (NOT) DISTINCT FROM when either side is a tuple that contains NULL. #22718
  • Fixed incorrect evaluation of IN expressions where the left-hand side is a tuple, and some of the tuples on either side contain NULL. #22718
  • Expressions stored in check constraints and computed columns are now stored de-qualified so that they no longer refer to a specific database or table. #22667
  • Fixed a bug where reusing addresses of decommissioned nodes could cause issues with Admin UI graphs. #22614
  • IMPORT jobs can no longer be started if the target table already exists. #22627
  • Computed columns can no longer be added to a table after table creation. #22653
  • Allowed UPSERTing into a table with computed columns. #22517
  • Computed columns are now correctly disallowed from being foreign key references. #22511
  • Various primitives that expect table names as argument now properly reject invalid table names. #22577
  • AddSSTable no longer accidentally destroys files in the log on success. #22551
  • IsDistinctFrom with NULL placeholder no longer returns incorrect results. #22433
  • Fixed a bug that caused incorrect results for joins where columns that are constrained to be equal have different types. #22549
  • Implemented additional safeguards against RPC connections between nodes that belong to different clusters. #22518
  • The /health endpoint now returns a node as unhealthy when draining or decommissioning. #22502
  • Aggregates that take null arguments no return the correct results. #22507
  • Fixed empty plan columns of sequenceSelectNode. #22495
  • Disallowed any inserts into computed columns. #22470
  • Tables with computed columns will produce a meaningful dump. #22402
  • cockroach sql no longer produces an error anymore when an empty statement is entered at the interactive prompt. #22449
  • The pg_typeof() function now returns the correct type for the output of UNION ALL even when the left sub-select has a NULL column. #22438
  • <TYPE> <value> literal casts now work correctly for all fixed-length types. #22397
  • Errors from DDL statements sent by a client as part of a transaction, but in a different query string than the final commit, are no longer silently swallowed. #21829
  • Fixed a bug in cascading foreign key actions. #21799
  • Tabular results where the column labels contain newline characters are now rendered properly. #19306
  • Fixed a bug that prevented long descriptions in the Admin UI Jobs table from being collapsed after being expanding. #22221
  • Fixed a bug that prevented using SHOW GRANTS with a grantee but no targets. #21864
  • Fixed a panic with certain queries involving the REGCLASS type. #22310
  • Fixed the behavior and types of the encode() and decode() functions. #22230
  • Fixed a bug that prevented passing the same tuple for FROM and TO in ALTER TABLE ... SCATTER. #21830
  • Fixed a regression that caused certain queries using LIKE or SIMILAR TO with an indexed column to be slow. #21842
  • Fixed a stack overflow in the code for shutting down a server when out of disk space #21768
  • Fixed Windows release builds. #21793
  • Fixed an issue with the wire-formatting of BYTES arrays. #21712
  • Fixed a bug that could lead to a node crashing and needing to be reinitialized. #21771
  • When a database is created, dropped, or renamed, the SQL session is blocked until the effects of the operation are visible to future queries in that session. #21900
  • Fixed a bug where healthy nodes could appear as "Suspect" in the Admin UI if the web browser's local clock was skewed. #22237
  • Fixed bugs when running DistSQL queries across mixed-version (1.1.x and 2.0-alpha) clusters. #22897

Performance Improvements

  • Improved a cluster's ability to continue operating when nearly out of disk space on most nodes. #21866
  • Disk space is more aggressively freed up when the disk is almost full. #22235
  • Experimentally enabled some joins to perform a lookup join and increase join speed for cases where the right side of the join is much larger than the left. #22674
  • Supported distributed execution of INTERSECT and EXCEPT queries. #22442
  • Reduced cancellation time of DistSQL aggregation queries. #22684
  • Unnecessary value checksums are no longer computed, speeding up database writes. #22487
  • Reduced unnecessary logging in the storage layer. #22516
  • Improved the performance of distributed sql queries. #22471
  • Distributed execution of INTERSECT ALL and EXCEPT ALL queries is now supported. #21896
  • Allowed - in usernames, but not as the first character. #22728
  • A COMMIT reporting an error generated by a previous parallel statement (i.e., RETURNING NOTHING) no longer leaves the connection in an aborted transaction state. Instead, the transaction is considered completed and a ROLLBACK is not necessary. #22683
  • Significantly reduced the likelihood of serializable restarts seen by clients due to concurrent workloads. #21140
  • Reduced disruption from nodes recovering from network partitions. #22316
  • Improved the performance of scans by copying less data in memory. #22309
  • Slightly improved the performance of low-level scan operations. #22244
  • When a range grows too large, writes are now be backpressured until the range is successfully able to split. This prevents unbounded range growth and improves a clusters ability to stay healthy under hotspot workloads. #21777
  • The information_schema and pg_catalog databases are now faster to query. #21609
  • Reduced the write amplification of Raft replication. #20647

Doc Updates

Contributors

This release includes 430 merged PRs by 37 authors. We would like to thank all contributors from the CockroachDB community, with special thanks to first-time contributors noonan, Mark Wistrom, pocockn, and 何羿宏.

v2.0-alpha.20180129

Release Date: January 29, 2018

Downloads

General Changes

  • CockroachDB now uses gRPC version 1.9.2 #21600

Enterprise Changes

  • Failed RESTORE cleanup no longer causes the RESTORE job to perpetually loop if external storage fails or is removed. #21559
  • Non-transactional BACKUP and RESTORE statements are now disallowed inside transactions. #21488

SQL Language Changes

  • Reduced the size of system.rangelog entries to save disk space. #21410
  • Prevented adding both a cascading referential constraint action and a check constraint to a column. #21690
  • Added json_array_length function that returns the number of elements in the outermost JSON or JSONB array. #21611
  • Added referential_constraints table to the information_schema. The referential_constraints table contains all foreign key constraints in the current database. #21615
  • Replaced BOOL columns in the information_schema with STRING columns to conform to the SQL specification. #21612
  • Added support for inverted indexes for JSON. #20941
  • DROP SEQUENCE cannot drop a SEQUENCE that is currently in use. #21364
  • The IMPORT function now does not require the temp directory and no longer creates a RESTORE job. Additionally, the TRANSFORM_ONLY option for IMPORT has been renamed to TRANSFORM and now takes an argument specifying the target directory. #21490

Command-Line Changes

  • cockroach start --background now returns earlier for nodes awaiting the cockroach init command, facilitating use of automated scripts. #21682
  • Command-line utilities that print results with the pretty format now use consistent horizontal alignment for every row of the result. #18491

Admin UI Changes

  • The Command Queue debug page now displays errors correctly. #21529
  • The Problem Ranges debug page now displays all problem ranges for the cluster. #21522

Bug Fixes

  • Fixed a crash caused by NULL placeholder in comparison expressions. #21705
  • The EXPLAIN (VERBOSE) output now correctly shows the columns and properties of each query node (instead of incorrectly showing the columns and properties of the root). #21527
  • Added a mechanism to recompute range stats automatically over time to reflect changes in the underlying logic. #21345

Performance Improvements

  • Multiple ranges can now split at the same time, improving our ability to handle hotspot workloads. #21673
  • Improved performance for queries that do not read any columns from the key component of the row. #21571
  • Improved performance of scans by reducing efforts for non-required columns. #21572
  • Improved efficiency of the key decoding operation. #21498
  • Sped up the performance of low-level delete operations. #21507
  • Prevented the jobs table from growing excessively large during jobs table updates. #21575

Contributors

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

  • Constantine Peresypkin
  • 何羿宏

Special thanks to first-time contributors Andrew Kimball, Nathaniel Stewart, Constantine Peresypkin and Paul Bardea.

v2.0-alpha.20171218

Release Date: December 18, 2017

Downloads

SQL Language Changes

  • Added support for read-only transactions via PostgreSQL-compatible syntax. #20547
    • SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY/READ WRITE
    • SET TRANSACTION READ ONLY/READ WRITE
    • SET default_transaction_read_only
    • SET transaction_read_only
  • For compatibility with PostgreSQL, the return type of the date_trunc(STRING,TIME) function was changed from TIME to INTERVAL, and the return type of the date_trunc(STRING,DATE) function was changed from DATE to TIMESTAMPTZ. #20467

Bug Fixes

  • Fixed a bug preventing CockroachDB from starting when the filesystem generates a lost+found directory in the Cockroach data directory. #20565
  • Fixed the over-counting of memory usage by aggregations. #20585
  • Fix a panic when using the date_trunc(STRING,TIMESTAMP) or date_trunc(STRING,DATE) function during queries that run with the distributed execution engine. #20467
  • Fixed a bug where the date_trunc(STRING,TIMESTAMP) function would return a TIMESTAMPTZ value. #20467
  • Fixed a race condition that would result in some queries hanging after cancellation. #20088
  • Fixed a bug allowing privileges to be granted to non-existent users. #20438

Performance Improvements

  • Queries that use inequalities using tuples (e.g., (a,b,c) < (x,y,z)) are now slightly better optimized. #20484
  • IS DISTINCT FROM and IS NOT DISTINCT FROM clauses are now smarter about using available indexes. #20346

v1.2-alpha.20171211

Release Date: December 11, 2017

Downloads

General Changes

SQL Language Changes

Command-Line Interface Changes

Admin UI Changes

  • The Admin UI now sets the Last-Modified header when serving assets to permit browser caching. This improves page load times, especially on slow connections #20429.

Bug Fixes

  • Removed the possibility for OOM errors during distributed IMPORT from csv. #20506
  • Fixed a crash triggered by some corner-case queries containing ORDER BY. #20489
  • Added missing Distributed SQL flows to the exported sql.distsql.flows.active and sql.distsql.flows.total metrics and the "Active Flows for Distributed SQL Queries" admin UI graph. #20503
  • Fixed an issue with stale buffer data when using the binary format for ARRAY values. #20461
  • The cockroach sql shell now better reports the number of rows inserted by a CREATE TABLE ... AS ... statement. Note, however, that the result are still formatted incorrectly if the CREATE TABLE ... AS ... statement creates zero rows in the new table. #20268
  • Self-referencing tables can now reference a non-primary index without manually adding an index on the referencing column. #20325
  • Fixed an issue where spans for descending indexes were displaying incorrectly and updated NOT NULL tokens from # to !NULL. #20318
  • Fixed BACKUP jobs to correctly resume in all conditions. #20185
  • Fix various race conditions with jobs. #20185
  • It is no longer possible to use conflicting AS OF SYSTEM TIME clauses in different parts of a query. #20267
  • Fixed a panic caused by dependency cycles with cockroach dump. #20255
  • Prevented context cancellation during lease acquisition from leaking to coalesced requests. #20424

Performance Improvements

  • Improved handling of IS NULL conditions. #20366
  • Improved p99 latencies for garbage collection of previous versions of a key, when there are many versions. #20373
  • Smoothed out disk usage under very write heavy workloads by syncing to disk more frequently. #20352
  • Improved garbage collection of very large transactions and large volumes of abandoned write intents. #20396
  • Improved table scans and seeks on interleaved parent tables by skipping interleaved children rows at the end of a scan. #20235
  • Replaced the interval tree structure in TimestampCache with arena-backed concurrent skiplist. This reduces global locking and garbage collection pressure, improving average and tail latencies. #20300

Doc Updates

  • Added an introduction to CockroachDB video. #2234
  • Clarified that we have tested the PostgreSQL-compatible drivers and ORMs featured in our documentation enough to claim beta-level support. This means that applications using advanced or obscure features of a driver or ORM may encounter incompatibilities. If you encounter problems, please open an issue with details to help us make progress toward full support. #2235

v1.2-alpha.20171204

Release Date: December 4, 2017

Downloads

General Changes

  • CockroachDB now uses RocksDB version 5.9.0. #20070

Build Changes

  • Restored compatibility with older x86 CPUs that do not support SSE4.2 extensions. #19909

SQL Language Changes

  • The TIME data type is now supported. #19923
  • The IMPORT command now tolerates empty CSV files and supports 201 and 204 return codes from HTTP storage. #19861 #20027
  • nodelocal:// paths in IMPORT now default to relative within the "extern" subdirectory of the first store directory, configurable via the new --external-io-dir flag. #19865
  • Added AWS_ENDPOINT and AWS_REGION parameters in S3 URIs to specify the AWS endpoint or region for IMPORT. The endpoint can be any S3-compatible service. #19860
  • For compatibility with PostgreSQL:
    • The time zone session variable (with a space) has been renamed timezone (without a space), and SET TIMEZONE and SHOW TIMEZONE are now supported alongside the existing SET TIME ZONE and SHOW TIME ZONE syntax. Also, SET TIMEZONE = can now be used as an alternative to SET TIMEZONE TO. #19931
    • The transaction_read_only session variable is now supported. It is always set to off. #19971
    • The transaction isolation level, transaction priority, and transaction status session variables have been renamed transaction_isolation, transaction_priority, and transaction_status. #20264
  • SHOW TRACE FOR SELECT now supports AS OF SYSTEM TIME. #20162
  • Added the system.table_statistics table for maintaining statistics about columns or groups of columns. These statistics will eventually be used by the query optimizer. #20072
  • The UPDATE and DELETE statements now support ORDER BY and LIMIT clauses. #20069
    • For UPDATE, this is a MySQL extension that can help with updating the primary key of a table (ORDER BY) and control the maximum size of write transactions (LIMIT).
    • For DELETE, the ORDER BY clause constrains the deletion order, the output of its LIMIT clause (if any), and the result order of its RETURNING clause (if any).
  • On table creation, DEFAULT expressions no longer get evaluated. #20031

Command-Line Interface Changes

Admin UI Changes

  • Updated time series axis labels to show the correct byte units. #19870
  • Added a cluster overview page showing current capacity usage, node liveness, and replication status. #19657

Bug Fixes

  • Fixed how column modifiers interact with ARRAY values. #19499
  • Enabled an RPC-saving optimization when the --advertise-host is used. #20006
  • It is now possible to drop a column that is referenced as a foreign key when it is the only column in that reference. #19772
  • Fixed a panic involving the use of the IN operator and improperly typed subqueries. #19858
  • Fixed a spurious panic about divergence of on-disk and in-memory state. #19867
  • Fixed a bug allowing duplicate columns in primary indexes. #20238
  • Fixed a bug with NaNs and Infinitys in EXPLAIN outputs. #20233
  • Fixed a possible crash due to statements finishing execution after the client connection has been closed. #20175
  • Fixed a correctness bug when using distributed SQL engine sorted merge joins. #20090
  • Fixed a bug excluding some trace data from SHOW TRACE FOR <statement>. #20081
  • Fixed a case in which ambiguous errors were treated as unambiguous and led to inappropriate retries. #20073
  • Fixed a bug leading to incorrect results for some queries with IN constraints. #20036
  • Fixed the encoding of indexes that use STORING columns. #20001
  • IMPORT checkpoints are now correctly cleaned up. #20211
  • Fixed a bug that could cause system overload during cleanup of large transactions. #19538
  • On macOS, the built-in SQL shell (cockroach sql) once again properly supports window resizing. #20148, #20153
  • PARTITION BY multiple columns with window functions now works properly. #20151
  • Fixed a bug so deleting chains of 2 or more foreign key references is now possible. #20050
  • Prometheus vars are now written outside the metrics lock. #20194

Enterprise Edition Changes

  • Enterprise BACKUPs no longer automatically include the system.users and system.descriptor tables. #19975
  • Added AWS_ENDPOINT and AWS_REGION parameters in S3 URIs to specify the AWS endpoint or region for BACKUP/RESTORE. The endpoint can be any S3-compatible service. #19860
  • RESTORE DATABASE is now allowed only when the backup contains a whole database. #20023
  • Fixed RESTORE being resumed with skip_missing_foreign_keys specified. #20092
  • BACKUP/RESTORE jobs now support 201 and 204 return codes from HTTP storage. #20027
  • BACKUP now checks that all interleaved tables are included (as required by RESTORE). #20206
  • Marked revision_history BACKUP/RESTORE as experimental. #20164
  • nodelocal:// paths in BACKUP/RESTORE now default to relative within the "extern" subdirectory of the first store directory, configurable via the new --external-io-dir flag. #19865

Doc Updates

New RFCs

v1.2-alpha.20171113

Release Date: November 13, 2017

Downloads

Backwards-Incompatible Changes

  • Redefined NaN comparisons to be compatible with PostgreSQL. NaN is now equal to itself and sorts before all other non-NULL values. #19144

  • It is no longer possible to drop a user with grants; the user's grants must first be revoked. #19095

Build Changes

  • Fixed compilation on the 64-bit ARM architecture. #19795

  • NodeJS 6+ and Yarn 1.0+ are now required to build CockroachDB. #18349

SQL Language Changes

  • SHOW GRANTS (no user specified) and SHOW GRANTS FOR <user> are now supported. The former lists all grants for all users on all databases and tables; the latter does so for a specified user. #19095

  • SHOW GRANTS statements now report the database name for tables. #19095

  • CREATE USER statements are no longer included in the results of SHOW QUERIES statements. #19095

  • The new ALTER USER ... WITH PASSWORD ... statement can be used to change a user's password. #19095

  • CREATE USER IF NOT EXISTS is now supported. #19095

  • New foreign key constraints without an action specified for ON DELETE or ON UPDATE now default to NO ACTION, and existing foreign key constraints are now considered to have both ON UPDATE and ON DELETE actions set to NO ACTION even if RESTRICT was specified at the time of creation. To set an existing foreign key constraint's action to RESTRICT, the constraint must be dropped and recreated.

    Note that NO ACTION and RESTRICT are currently equivalent and will remain so until options for deferring constraint checking are added. #19416

  • Added more columns to information_schema.table_constraints. #19466

Command-Line Interface Changes

  • On node startup, the location for temporary files, as defined by the --temp-dir flag, is printed to the standard output. #19272

Admin UI Changes

Bug Fixes

  • Fixed a bug causing redundant log messages when running SHOW TRACE FOR. #19468

  • DROP INDEX IF EXISTS now behaves properly when not using table@idx syntax. #19390

  • Fixed a double close of the merge joiner output. #19794

  • Fixed a panic caused by placeholders in PREPARE statements. #19636

  • Improved error messages about Raft progress in the replicate queue. #19593

  • The cockroach dump command now properly supports ARRAY values. #19498

  • Fixed range splitting to work when the first row of a range is larger than half the configured range size. #19339

  • Reduced unnecessary log messages when a cluster becomes temporarily unbalanced, for example, when a new node joins. #19494

  • Using DELETE without WHERE and RETURNING inside [...] no longer causes a panic. #19822

  • SQL comparisons using the ANY, SOME, or ALL operators with sub-queries and cast expressions work properly again. #19801

  • On macOS, the built-in SQL shell (cockroach sql) once again properly supports window resizing and suspend-to-background. #19429

  • Silenced an overly verbose log message. #19504

  • Fixed a bug preventing large, distributed queries that overflow onto disk from completing. #19689

  • It is not possible to EXECUTE inside of PREPARE statements or alongside other EXECUTE statements; attempting to do so no longer causes a panic. #19809 #19720

  • The admin UI now works when a different --advertise-host is used. #19426

  • An improperly typed subquery used with IN no longer panics. #19858

  • It is now possible to RESTORE using an incremental BACKUP taken after a table was dropped. #19601

  • Fixed an always-disabled crash reporting setting. #19554

  • Prevented occasional crashes when the server is shut down during startup. #19591

  • Prevented a potential Gossip deadlock on cluster startup. #19493

  • Improved error handling during splits. #19448

  • Some I/O errors now cause the server to shut down. #19447

  • Improved resiliency to S3 quota limits by retrying some operations during BACKUP/RESTORE/IMPORT

  • Executing TRUNCATE on a table with self-referential foreign key constraints no longer creates broken foreign key backward references. #19322

Performance Improvements

  • Improved memory usage for certain queries that use limits at multiple levels. #19682

  • Eliminated some redundant Raft messages, improving write performance for some workloads by up to 30%. #19540

  • Trimmed the wire size of various RPCs. #18930

  • Table leases are now acquired in the background when frequently used, removing a jump in latency when they expire. #19005

Enterprise Edition Changes

  • When an enterprise RESTORE fails or is canceled, partially restored data is now properly cleaned up. #19578

  • Added a placeholder during long-running BACKUP and IMPORT jobs to protect against accidentally using it by concurrent operations. #19713

Doc Updates

v1.2-alpha.20171026

Release Date: October 26, 2017

Downloads

Backwards-Incompatible Changes

  • Casts from BYTES to STRING have been changed and now work the same way as in PostgreSQL. New functions encode() and decode() are available to replace the former functionality. #18843

General Changes

  • CockroachDB now requires Go 1.9. #18459
  • Release binaries now link against libtinfo dynamically. Building CockroachDB from source now requires libtinfo (or ncurses) development packages. #18979
  • Building the web UI now requires Node version 6 and Yarn version 0.22.0 or newer. #18830
  • Most dependencies have been updated to their latest versions. #17490
  • Release docker images are now based on Debian 8.9. #18748

SQL Language Changes

  • DROP DATABASE now defaults to CASCADE, restoring the 1.0 (and PostgreSQL-compatible) behavior. #19182
  • The INET column type and related functions are now supported. #18171 #18585
  • The ANY, SOME, and ALL functions now support subquery and tuple operands. #18094 #19266
  • current_schemas(false) behaves more consistently with PostgreSQL. #18108
  • SET CLUSTER SETTING now supports prepared statement placeholders. #18377
  • SHOW CLUSTER SETTINGS is now only available to root. #19031
  • A new cluster setting cloudstorage.gs.default.key can be used to store authentication credentials to be used by BACKUP and RESTORE. #19018
  • The RESTORE DATABASE statement is now supported. #19182
  • IMPORT now reports progress incrementally. #18677
  • IMPORT now supports the into_db option. #18899
  • The date_trunc() function is now available. #19297
  • New function gen_random_uuid() is equivalent to uuid_v4() but returns type UUID instead of BYTES. #19379
  • The extract function now works with TIMESTAMP WITH TIME ZONE in addition to plain TIMESTAMP and DATE. #19045
  • TIMESTAMP WITH TIME ZONE values are now printed in the correct session time zone. #19081
  • PostgreSQL compatibility updates: The pg_namespace.aclitem column has been renamed to nspacl. pg_class now has a relpersistence column. New functions pg_encoding_to_char, pg_get_viewdef, and pg_get_keywords. The pg_tablespace table is now available. The type name "char" (with quotes) is recognized as an alias for CHAR. Session variable server_version_num is now available. #18530 #18618 #19127 #19150 #19405

Command-Line Interface Changes

  • A new flag --temp-dir can be used to set the location of temporary files (defaults to a subdirectory of the first store). #18544
  • Many bugs in the interactive SQL shell have been fixed by switching to libedit for command-line input. The normalize_history option has been removed. #18531 #19125
  • New command cockroach load show displays information about available backups. #18434
  • cockroach node status and cockroach node ls no longer show nodes that are decommissioned and dead. #18270
  • The cockroach node decommission command now has less noisy output. #18458

Bug Fixes

  • Fixed issues when meta2 ranges split, lifting the ~64TB cluster size limitation. #18709 #18970
  • More errors now return the same error codes as PostgreSQL. #19103
  • ROLLBACK can no longer return a "transaction aborted" error. #19167
  • Fixed a panic in SHOW TRACE FOR SELECT COUNT(*). #19006
  • Escaped backslashes are now supported in regexp_replace substitution strings. #19168
  • extract(quarter FROM ts) now works correctly. #19298
  • The node liveness system is now more robust on a heavily-loaded cluster. #19279
  • Added debug logging when attempting to commit a non-existent intent. #17580

Performance Improvements

  • New cluster setting timeseries.resolution_10s.storage_duration can be used to reduce the storage used by built-in monitoring. #18632
  • Foreign key checks are now performed in batches. #18730
  • Raft ready processing is now batched, increasing performance of uncontended single-range write workloads. #19056 #19164
  • The leaseholder cache is now sharded to improve concurrency and uses less memory. #17987 #18443
  • Finding split keys is now more efficient. #18649 #18718
  • STDDEV and VARIANCE aggregations can now be parallelized by the distributed SQL engine. #18520
  • Store statistics are now updated immediately after rebalancing. #18425 #19115
  • Raft truncation is now faster. #18706
  • Replica rebalancing is now prioritized over lease rebalancing. #17595
  • IMPORT and RESTORE are more efficient. #19070
  • Restoring a backup no longer creates an extra empty range. #19052
  • Improved performance of type checking. #19078
  • The replica allocator now avoids adding new replicas that it would immediately try to undo. #18364
  • Improved performance of the SQL parser. #19068
  • Cache strings used for stats reporting in prepared statement. #19240
  • Reduced command queue contention during intent resolution. #19093
  • Transactions that do not use the client-directed retry protocol and experience retry errors are now more likely to detect those errors early instead of at commit time. #18858
  • Commands that have already exceeded their deadline are now dropped before proposal. #19380
  • Reduced the encoded size of some internal protocol buffers, reducing disk write amplification. #18689 #18834 #18835 #18828 #18910 #18950
  • Reduced memory allocations and GC overhead. #18914 #18927 #18928 #19136 #19246

Yes No
On this page

Yes No