What's New in v1.0

On this page Carat arrow pointing down

CockroachDB v1.0 is a required Regular Release.

Refer to Major release types before installing or upgrading for release timing and support details.

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

  • For key feature enhancements in v1.0 and other upgrade considerations, refer to the notes for v1.0 on this page.

  • For details about release types, naming, and licensing, refer to the Releases page.

  • Be sure to also review the Release Support Policy.

  • After downloading a supported CockroachDB binary, learn how to install CockroachDB.

Get future release notes emailed to you:

v1.0.7

Release Date:

Bug Fixes

  • Fixed a leak of table leases that could grow to a point that a cluster becomes unusable. #22563
  • When the log disk fills up, the process now crashes instead of hanging. #22563

v1.0.6

Release Date:

Bug Fixes

  • Fixed a bug in ReverseScan that could cause data to be missing from query results. #17891 #18385
  • Fixed a potential data corruption bug in RocksDB. #18397
  • Fixed a panic in some UNION queries. #17933
  • It is no longer possible to set the kv.raft.command.max_size cluster setting to a very low value (which could make the cluster inoperable). #18016
  • Fixed a range lease bug that could make ranges unavailable. #18218
  • Parallel statement execution is now disabled by default due to issues in handling retryable errors. #18002 #18332
  • Fixed a resource leak in diagnostics reporting #18315
  • Host names are no longer included in diagnostics reports. #18335
  • Increased logging to help diagnose certain issues. #18229 #18272 #18282 #18333

Doc Updates

  • Updated the Contribute to CockroachDB page to provide guidelines on finding a project, determining its complexity, and learning what to expect in your collaboration with the Cockroach Labs team. #1881

v1.0.5

Release Date:

Command-Line Interface Changes

  • Fatal error messages are now printed to both stderr and the logs. #17675

Bug Fixes

  • Foreign keys that point to a prefix of an existing index now work correctly. Previously, rows could be deleted from the referenced table without recognizing the constraint violation if rows in the referring table pointed to them. These foreign keys are also now shown correctly in SHOW CREATE TABLE. #17653
  • The crash reporter will now time out instead of waiting indefinitely trying to reach the server. #17689
  • AS OF SYSTEM TIME 0 is now a normal error instead of a panic. #17681
  • Fixed a panic caused by unclosed planNodes. #17281
  • 3DES has been removed from the list of supported TLS cipher suites (it would never be selected because we require TLS 1.2, but it could be reported as a false positive by security scanners). #17237

Performance Improvements

  • Reduced unhelpful retries of slow commands. #17385

Doc Updates

  • Added an FAQ on why CockroachDB uses the PostgreSQL wire protocol instead of the MySQL protocol. #1845
  • Added a known limitation around dropping an index interleaved into another index on the same table. #1859

v1.0.4

Release Date:

SQL Language Changes

Bug Fixes

Doc Updates

v1.0.3

Release Date:

SQL Language Changes

  • SET client_encoding='unicode' is now recognized as equivalent to UTF-8. #16513
  • The IN operator now works with tuples of OIDs. #16645

Bug Fixes

  • Fixed a consistency problem that could result when a transaction commit races with a lease transfer. #16775
  • Fixed a panic with message indexed var linked to different container. #16444
  • Casting a string to regtype now uses the full type parser. #16480 #16792
  • Fixed formatting of some error messages containing % characters. #16617
  • Fixed a panic in the timestamp cache. #16711
  • Fixed a memory leak when EXPLAIN is used on a query containing UNION. #16775

Performance Improvements

  • The intent resolver now works in smaller batches, reducing memory spikes after large transactions. #16741
  • MVCC garbage collection now works in smaller batches, avoiding problems with refreshing leases. #16735

Doc Updates

v1.0.2

Release Date:

General Changes

  • CockroachDB now uses Go 1.8.3 (fixing a security issue when elliptic curve certificates are used, as well as a panic). #16330

SQL Language Changes

  • The BEGIN statement now accepts the READ WRITE modifier for compatibility with the Go lib/pq driver. #16348

Command-Line Interface Changes

  • More node configuration details get logged on node initialization. #16209

Bug Fixes

  • Fixed several bugs with the OFFSET clause, including incorrect results and a panic when it is used without a LIMIT. #16315
  • Fixed the behavior of LIMIT in index joins. #16340
  • Fixed the behavior of DISTINCT with omitted columns. #16318
  • Fixed decoding of very large DECIMAL values. #16284
  • ALTER TABLE...ADD FOREIGN KEY no longer attempts to create an index on the source table. #16333
  • INT2VECTOR is now zero-indexed. #16326
  • Timestamp parsing is now consistent between prepared and non-prepared statements. #16327
  • If a prepared statement is invalidated by a schema change, it now returns an error instead of an incorrect result. #16335
  • The replica allocator will no longer remove replicas from a down node if there are no live nodes to receive them. #16218
  • ConditionalPut failures during initial migrations are now handled gracefully. #16244
  • EXPLAIN (TRACE) and the sql.trace.txn.enable_threshold cluster setting now work even when the trace.debug.enable cluster setting is false (the default). #16217
  • Improved the ability of a cluster to restart with some nodes missing. #16353
  • Backup URLs are now sanitized before being written to the system jobs table. #16386
  • cockroach zone set with an incomplete config for the special system ranges now merges the given config with the default instead of using zeros. #16212

Performance Improvements

  • Improved performance of MVCC garbage collection. #16219 #16231
  • Adjusted timeouts for snapshot throttling. #16328

Doc Updates

v1.0.1

Release Date:

Bug Fixes

  • The command-line interface no longer prompts for a password twice when password authentication is used. #15919
  • CREATE USER WITH PASSWORD now works correctly in the cockroach sql shell. #15911
  • Fixed bugs in the MIN() and MAX() aggregate functions in the presence of NULL values. #15912
  • Administrator privileges are no longer required on Windows. #15916
  • Favicons now display correctly in the web UI. #15918
  • A clear error message is now printed when running on Windows versions older than 8 (the oldest version we support). #15920
  • The --cache and --max-sql-memory flags of cockroach start now use their default values on OpenBSD. #15914
  • Attempting to create a view involving an array now returns an error instead of crashing the server. #15913
  • cockroach start --insecure now prints a warning about the consequences of insecure mode. #15924
  • The round() function for floats now works on arm64 platforms. In some instances this changes the low bits of the result on other platforms. #15915
  • Collation locales containing capital letters are now parsed correctly. #15917
  • Fixed a panic in node ID allocation. #15937
  • Other errors in node/store ID allocation are now retried automatically. #15973
  • Dropping a database containing views now works correctly. #15983
  • Fully-qualified column names referring to views now work correctly. #15984
  • Fixed a panic when preparing a query with window functions. #16019
  • Fixed a panic when null arguments are given to the generate_series() or unnest() function. #16017

Admin UI Changes

  • Fixed the display of timestamps in logs. #16002

Performance Improvements

  • Disabled RocksDB assertions in release builds. #15943 #15960
  • Index joins for queries with limits no longer fetch unnecessary rows. #15969
  • Fixed an issue causing high CPU usage after data is deleted or overwritten. #16006

Doc Updates

v1.0

Release Date:

General Availability

With this release, CockroachDB graduates from beta to a production-ready database built for the cloud and designed to power business at any scale from startup to enterprise. Years of development have gone into the capabilities included, from distributed SQL workloads with guaranteed ACID semantics, to multi-active availability with consistent consensus-based replication, to simple and flexible deployment and operations, to enterprise-scale distributed, incremental backup and restore.

Read more about these critical product areas in this blog post, and then get started:

  • Install CockroachDB using the download links above
  • Start a local cluster and explore how CockroachDB automatically replicates and distributes data as you scale
  • Build an app on CockroachDB using a PostgreSQL-compatible driver or ORM
  • Learn how to deploy a production cluster manually or in the cloud

You might also be interested in reviewing previous beta release notes for insight into the broad range of development efforts that made CockroachDB 1.0 possible.

Known Limitations

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

v1.0-rc.2

Release Date:

General Changes

SQL Language Changes

  • Restrictions on schema changes in transactions with other statements have been relaxed. It is now possible to insert into a table in the same transaction that created it, provided there are no FOREIGN KEY or INTERLEAVE clauses. #15511
  • The distributed SQL engine supports queries that internally generate rows with no columns. #15420
  • New variables added to the cluster-wide settings: server.declined_reservation_timeout, server.failed_reservation_timeout, and server.time_until_store_dead. #15581

Command-Line Interface Changes

  • If the new flag --listening-url-file is passed to cockroach start, the server will write its SQL connection URL to the specified file on successful startup, in addition to printing it to stdout. This is particularly helpful in identifying the node's port when an unused port is assigned automatically (--port=0).#15468
  • The cockroach sql shell no longer buffers all results in memory before printing them. #15277
  • The log file is now flushed more reliably when a node exits. #15531
  • The new flag --max-offset on the cockroach start command defines the maximum allowed clock offset for the cluster and replaces the environment variable COCKROACH_MAX_OFFSET. Note that the --max-offset value must be the same on all nodes in the cluster. In order to change it, every node in the cluster must be stopped and restarted with the new value. #15568
  • The --raft-tick-interval flag has been removed from the cockroach start command. #15547
  • Certificate and key loading errors during node startup are now reported to the user via stdout as well as being written to the log file. #15655

Admin UI Changes

  • The number of transactions that would be affected by a change in isolation level is now tracked. #15234
  • Improved style of the single node and log pages. #15486
  • The event log now refreshes automatically. #15502
  • Graphs on the overview page now have tooltips. #15624

Bug Fixes

  • Fixed a panic when a query returning a constant NULL uses the new distributed execution engine. #15530
  • Fixed two issues that could cause requests to get stuck indefinitely. #15557 #15573
  • Fixed a rare crash when extending table leases. #15560
  • Fixed a crash when a transaction that uses SAVEPOINT cockroach_restart does something other than ROLLBACK TO SAVEPOINT after an error. #15563
  • Fixed RESTORE for interleaved tables. #15564
  • Return parse error instead of panic when constant typechecking fails. #15636
  • Prevent persistent distsql and schema change errors after a node dies. #15368
  • Previously, ALTER TABLE ADD COLUMN with a DEFAULT unique_rowid() specification could create many duplicate values. This has been corrected. #15628
  • Fixed a consistency error in BACKUP. #15642
  • Fixed incorrect NULL results when using an aggregation with an empty table. #15688

Performance Improvements

  • Reduced thrashing in gossip after a rolling restart. #15533
  • RESTORE performs its pre-splitting less aggressively. #15548
  • Improved memory accounting in distributed SQL. #15595, #15610, #15623, #15627
  • Queries using session-dependent variables (e.g., time conversions using the session's timezone) are now executed through the distributed SQL engine. #15628

Doc Updates

Contributors

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

  • Dmitry Vorobev
  • Richard Artoul

v1.0-rc.1

Release Date:

Backwards-Incompatible Changes

  • It is not possible to upgrade directly to this version of CockroachDB from a version older than beta-20170413. Upgrade any older clusters to that version first. #15228
  • The cockroach start command no longer recognizes the COCKROACH_INSECURE and COCKROACH_CERTS_DIR environment variables which are intended to be client-only. Use the --insecure and --certs-dir command-line flags instead. #15196 #15288
  • Older certificate-related command-line flags have been removed; use --certs-dir instead. #15241
  • Various environment variables have been removed in favor of the new CLUSTER SETTING commands described below.
  • The undocumented SET SYNTAX statement and the "modern" syntax variant have been removed. #15064

General Changes

  • Anonymous diagnostics statistics are now reported by default. To opt out, set COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING=true in the environment when starting the cluster, or use SET CLUSTER SETTING diagnostics.reporting.enabled = false in the SQL shell on clusters already running. #14901

Build Changes

  • CockroachDB now builds on Windows. Windows support is currently experimental and is recommended only for development, not production.
  • Building from source on macOS 10.11 works again. #15168
  • Building from source on older CPUs (without SSE4.2) works again. #15247

Enterprise Features

  • Distributed backup and restore capabilities are now available to enterprise-license customers. Using the new BACKUP SQL statement, a cluster's schema and data can be backed up in full or incrementally as of a given timestamp, and can be stored on the platforms you're already using, including AWS S3, Google Cloud Storage, NFS, or HTTP storage. In the unlikely event of irreparable cluster failure, the new RESTORE SQL statement can be used to restore a cluster from enterprise backups. Importantly, backup and restore operations are distributed across the nodes of a cluster, minimizing the impact on cluster performance.

For details about pricing, contact Cockroach Labs.

SQL Language Changes

  • Table names and other identifiers are now case-insensitive in all cases, even when used in double quotes. These identifiers will be shown in lowercase in many introspection interfaces. This is consistent with PostgreSQL and improves compatibility with the PostgreSQL JDBC driver. #15434
  • New SHOW ALL CLUSTER SETTINGS and SET CLUSTER SETTING statements can be used to view and change certain cluster-wide settings. The following cluster settings are available in this release:
    • diagnostics.reporting.enabled
    • diagnostics.reporting.report_metrics
    • diagnostics.reporting.send_crash_reports
    • kv.allocator.lease_rebalancing_aggressiveness
    • kv.allocator.load_based_lease_rebalancing.enabled
    • kv.raft.command.max_size
    • kv.raft_log.synchronize
    • kv.snapshot_rebalance.max_rate
    • kv.snapshot_recovery.max_rate
    • kv.transaction.max_intents
    • server.remote_debugging.mode
    • sql.defaults.distsql
    • sql.metrics.statement_details.dump_to_logs
    • sql.metrics.statement_details.enabled
    • sql.metrics.statement_details.threshold
    • sql.trace.log_statement_execute
    • sql.trace.session_eventlog.enabled
    • sql.trace.txn.enable_threshold
  • The PREPARE and EXECUTE statements can now be used to use prepared statements in a SQL shell. #15256
  • The regexp_replace() function now handles newlines correctly, both with and without the n flag. #15309
  • Precedence for the binary ~ operator (regex match) has been changed. This could cause DEFAULT or CHECK expressions to have different behavior if ~ was used in combination with other operators. These will need to be fixed manually. #15264
  • Ambiguous results now return the PostgreSQL "statement completion unknown" error code. #15054
  • Time zones can now be specified in more formats in DATE types, including +0700, +07, +7, and +07:00. #15177
  • Set-returning functions (like generate_series()) are now supported in more contexts. #14369

Admin UI Changes

  • Tooltips are now shown on graphs. #15282
  • Fixed elements that overlapped incorrectly. #15387
  • Improved handling of long strings in table cells. #15387
  • The SQL statement latency graphs now include some overhead that was not previously accounted for. #15176

Command-Line Interface Changes

Bug Fixes

  • Table scans over interleaved tables now work correctly. #15043
  • Fixed backslash escaping when used with the Python psycopg2 driver. #15281
  • Improved certificate validation, fixing compatibility with client certs as used by psql. #15286
  • Fixed a race between lease transfers and repair/rebalance operations. #15355
  • Creating a table with a bad DEFAULT expression no longer panics. #15170
  • Improved tracking of memory used by aggregate functions. #14904
  • Rebalancing now only considers ranges for which all replicas are healthy. #15312
  • Writes to the raft log are now fully synced to disk. #15366
  • Fixed a hang during node shutdown. #15465
  • Fixed "requested entry at index" log spam from raft_log_queue.go. #15466

Performance Improvements

  • A new distributed SQL execution engine is now used for a large subset of SELECT statements. Instead of returning all table data involved in the query to the gateway node for final computations, computation is distributed between the gateway node and the nodes where the data resides, with just the relevant results returned to the gateway node. This deeper distribution of work significantly improves performance of queries, especially those using aggregation functions or joins.
  • Smoothed out request stats used by lease rebalancing and reduced thrashing. #15156 #15321
  • Improved retry logic after lease failures. #15199
  • Snapshots that are necessary for recovery are now given higher recovery than those used for rebalancing. #15279
  • Very large transactions and commands that might cause the server to run out of memory are now rejected earlier. #15350
  • Node liveness heartbeats are now retried when they fail due to heavy load. #15362
  • Improved priority adjustments when transactions are pushed. #7380

Doc Updates

Contributors

This release includes 185 merged PRs by 27 authors. We would like to thank the following contributors from the CockroachDB community, including first-time contributors Evgeniy Vasilev and Mahmoud Al-Qudsi.

  • Evgeniy Vasilev
  • Kenji Kaneda
  • Mahmoud Al-Qudsi

beta-20170420

Release Date:

Backwards-Incompatible Changes

  • Security-related command-line arguments have been changed. Instead of using multiple flags, certificates and keys are now loaded from a single --certs-dir flag, which defaults to ~/.cockroach-certs but can be set to a custom location. The individual flags still work in this release but will be removed in the next one. Also note that the --insecure flag is now required for insecure mode. #14703
  • The --alsologtostderr argument has been renamed to --logtostderr, and now takes an optional argument to specify a threshold. #14841
  • The ^ operator now means pow() instead of bitwise xor (bitwise xor uses the # operator; this is consistent with PostgreSQL). Any tables with this operator in a DEFAULT or CHECK expression will need to be updated. #14882

Upgrade Notes

  • This release cannot run at the same time as releases prior to beta-20170413. If you are running an older version, you must either upgrade to that version first or take down all servers in the cluster before starting any server with this version. This release includes new functionality to make future upgrades smoother. #14959

Build Changes

  • CockroachDB's build system has been rewritten to improve portability. It can no longer be installed with go get alone; use of the Makefile is now required. GNU Make, CMake, and XZ Utils must also be installed to build from source. As a result, CockroachDB can now be built on a larger variety of systems. #14840

SQL Language Changes

  • Type errors in CHECK constraints are now detected earlier. #14984
  • Aggregation functions now work correctly above the windowing level. #14729
  • The default precision for inexact decimal operations is now 20 digits (up from 16). #15001
  • Bounds are now checked when converting FLOAT or DECIMAL values to INTEGER. #14967
  • The pg_catalog data for int2vector is now consistent with PostgreSQL. #14989

Command-Line Interface Changes

  • The cockroach cert commands have been updated to reflect the new --certs-dir convention. #14703
  • New flags --log-file-max-size (default 10 MiB) and --log-dir-max-size (default 100 MiB) can be used to control log rotation and deletion. The --log-file-verbosity flag (default INFO) can be used to control the verbosity of the log file. #14841
  • Critical errors are now written to stderr regardless of the logging configuration. #14926 #15025 #15040
  • The server will now reload its certificates and keys on a SIGHUP. #14925
  • Some commands which previously required a node certificate now work with the root client certificate. #14972
  • The undocumented cockroach debug kv commands have been removed. #14857
  • The cockroach quit command now has a hard timeout of 1 minute if the cluster has lost quorum. #14708

Admin UI Changes

Bug Fixes

  • Transactions no longer get stuck forever when a split occurs while they are waiting for a conflicting transaction. #14974
  • The Admin UI can now display tables with non-lowercase names. #14818
  • Fixed a panic with "span and descriptor's range do not overlap". #14952
  • Fixed a data race in the Prometheus exporter. #14943

Performance Improvements

  • The timestamp cache is now much more efficient, leading to a 42% speedup on single-node write-only benchmarks. #14867
  • Transaction deadlocks are now detected faster. #14789
  • Fixed a memory "leak" in Raft. #15041
  • Improved performance of concurrent RPCs on a single GRPC connection. #14939
  • Raft processing now uses more threads. #14897
  • Improved performance of schema changes that add indexes. #14937
  • Reduced the number of cgo calls for RocksDB iterators. #14920

Doc Updates

  • Expanded the TRUNCATE documentation to cover using CASCADE to truncate dependent tables. #1297
  • Minor improvements to the ROLLBACK documentation. #1296

Contributors

This release includes 101 merged PRs by 21 authors. We would like to thank first-time contributor xphoniex from the CockroachDB community.

beta-20170413

Release Date:

Backwards-Incompatible Changes

  • The implementation of indexing for collated string columns has changed. Any secondary indexes containing collated strings must be dropped before upgrading to this version and then re-created after upgrading. Note that this applies only to secondary indexes, not to primary indexes. #14528

  • Any row with a -0 FLOAT or DECIMAL value in a primary key or index must be deleted before upgrading to this version and then re-inserted after upgrading. Otherwise, the row containing -0 will show up during table scans, but it will not be possible to delete it or select it as part of an index scan.

If you suspect -0 values are present but do not know where, an alternative approach is to use cockroach dump to back up tables with FLOAT or DECIMAL columns, drop the tables before upgrading, and then use the backup files to recreate the tables and indexes after upgrading. #14528

  • The experimental_strptime and experimental_strftime functions are deprecated and will be removed in a future release. If you are currently using these functions, please let us know here.

  • Several undocumented environment variables have been removed. #14786 #14797

  • Clusters which have used the COCKROACH_PROPOSER_EVALUATED_KV environment variable require special care when upgrading to this release; contact us for more information. #14773

Build Changes

  • Building CockroachDB from source no longer uses $GOPATH/bin for anything except the final binary produced by make install. #14629
  • Developers should use make generate instead of go generate to ensure the correct tool versions are used. #14672

SQL Language Changes

  • SQL variables can now be reset to their default values with the RESET statement or SET x TO DEFAULT. #14105
  • Schema changes within transactions are now restricted. Certain combinations of schema changes with other statements (which would previously hang) will now return an error. It is recommended that DDL statements be issued outside of transactions, or as the only statement within a transaction. #14368
  • Subqueries are now supported as the source of UPDATE statements. #14611
  • Timestamp parsing now understands the format used by JDBC's setTimestamp. #14712
  • INTERVAL values larger than a month now use the suffix mon instead of m (which is also used for minutes). Intervals can now be parsed from strings containing decimals and negative numbers. #14534
  • INTERVAL values now support multiplication and division by FLOAT values. #14614
  • Arithmetic operations on integers now check for overflow. #14682
  • Comparisons involving tuples with non-identical types are now allowed whenever the comparison of the individual elements would be allowed. #14674
  • The implementation of the experimental_strptime function is now consistent across platforms. #14801
  • BETWEEN now supports any combination of types that would be supported by individual comparison operators. #14754
  • Handling of untyped literals during overload resolution is now more consistent. #14593
  • ROLLBACK TO SAVEPOINT is now allowed at any time, not only after receiving a "retry transaction" error. #14538
  • CREATE TABLE AS SELECT now returns the number of rows affected to the SQL client driver. #13187
  • ALTER TABLE .. ADD CONSTRAINT can now be used to add a self-referential foreign key. #14711
  • The RETURNING NOTHING clause can now be used outside of a transaction, although it does not provide any performance benefit in this case. #14551
  • SQL user names are now required to start with a letter, contain only letters, numbers, and underscores, and be no longer than 63 characters. #14525
  • The BYTES type name is now reported as bytea in pg_catalog.pg_type for compatibility with PostgreSQL. #14495
  • The PostgreSQL type IO functions (like int8in, int8out, int8send, and int8recv) have placeholder implementations for compatibility with some ORMs. #14529

Command-Line Interface Changes

  • The cockroach zone set command now recognizes the special zone names .meta, .timeseries, and .system to set configurations for system metadata. #14740
  • The cockroach start command no longer uses the COCKROACH_PORT environment variable; the port must be set on the server's command line (similar to --host and other flags). #14612
  • The cockroach quit command is now more robust. #14775
  • Command history no longer corrupts previous commands when normalizing them. #14496
  • Commands entered as a single line are now saved together in the history. #14846
  • The config file generated by cockroach gen haproxy now enables health checks for the server. #14624
  • The --store and --log-dir flags now reject arguments starting with ~ that were not expanded by the shell. #14746

Admin UI Changes

  • The Node List page has been improved. #14395
  • A new node-id metric with labels for the node's address is now exported for use in external monitoring systems. #14544
  • The /debug/ pages are now accessible only from localhost by default. Set the environment variable COCKROACH_REMOTE_DEBUG=any when running the server to allow remote access. #14647 #14675

Performance Improvements

  • A new, more efficient format is now used for indexes with the STORING clause. Existing indexes will still work, but will need to be dropped and recreated to get the benefits of the new format. #14758
  • A single TimestampCache is now shared by all replicas on a store, providing better control over memory usage and better support for large transactions. #14489
  • Reduced memory used by the TimestampCache. #14516 #14514
  • Replica garbage collection is now much more efficient. #14391
  • Adding and dropping columns now uses the distributed SQL engine. #14331
  • The health of inter-node connections is now monitored using HTTP/2 ping frames instead of regular RPCs. This ensures that HTTP flow control cannot cause a connection to be considered unhealthy. #14424
  • The limit on the number of concurrent inter-node RPCs has been increased. #14785
  • The bandwidth used by range snapshots is now limited to 2MB/sec by default to reduce impact on live traffic. #14718
  • If a single row grows larger than the configured maximum range size, the split queue will no longer spin trying to split the range repeatedly. #14654
  • Several kinds of tracing and logging have been disabled by default. #14677

Bug Fixes

  • Fixed an issue with UPDATE and DELETE on tables with STORING indexes. Indexes affected by this bug will need to be dropped and recreated. #14643
  • BETWEEN now handles NULL in the same way as other comparison operators. #14686
  • Fixed a bug with comparisons involving division with a constant negative divisor. #14702
  • INSERT ON CONFLICT DO UPDATE no longer uses an error-prone optimization. The UPSERT statement is now faster than the equivalent INSERT ON CONFLICT DO UPDATE statement. #14485
  • Schema changes now abort more reliably when encountering errors. #14025
  • Joining nodes of two different clusters is now detected more reliably. #14475
  • Fixed a panic during prepared UPDATE statements. #14481
  • FLOAT and DECIMAL values in primary keys and indexes now consider 0 and -0 equal (although the sign will correctly be retained). #14528
  • DECIMAL values in primary keys and indexes no longer have zeros truncated. If a secondary index contains a DECIMAL value with trailing zeros, you can drop and re-create the index to have the value returned correctly when the index is used. #14528
  • Fixed a crash when assigning with the DEFAULT keyword in UPDATE statements. #14640

Doc Updates

Contributors

This release includes 215 merged PRs by 27 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributors Amos Bird and Daniel Upton.

  • Amos Bird
  • Christian Meunier
  • Daniel Upton
  • songhao

beta-20170330

Release Date:

SQL Language Changes

  • DEFAULT NULL column modifiers no longer produce type errors. #14371
  • Consecutive write statements using the RETURNING NOTHING clause are now executed in parallel. #14188
  • DECIMAL support for NaN, Inifinity, and negative zero. #14302

Command-Line Interface Changes

  • The separate INFO, WARNING, and ERROR log files have been replaced with a single file. #14347

Admin UI Changes

  • The node list page now includes information about whether nodes are alive or dead. #14258
  • Changed the names of some metrics related to lease transfers. #14319

Bug Fixes

  • Fixed an inconsistency that could occur with one-phase transactions using the SNAPSHOT isolation level. #14401
  • Prevented unexpected write intents on node liveness records, which could cause the cluster to become unavailable. #14346
  • Fixed two "span use after Finish()" errors. #14227
  • Fixed a rare panic in raft.step(). #14344

Performance Improvements

  • Reads with timestamps in the past no longer block writes. #14342
  • Improved node draining to prevent hanging DROP statements after a node restart. #14341
  • Added support for compressing inter-node traffic with snappy. This will be enabled in a future release. #14239

Doc Updates

Contributors

This release includes 56 merged PRs by 18 authors.

beta-20170323

Release Date:

Backwards-Incompatible Changes

  • The ALTER TABLE SPLIT AT syntax has changed to support multiple splits with one command. Existing uses of ALTER TABLE t SPLIT AT (x, y) should be changed to ALTER TABLE t SPLIT AT VALUES (x, y). #14281

Installation Changes

  • The Homebrew formula has moved; to install CockroachDB with brew, use brew install cockroachdb/cockroach/cockroach.

General Changes

  • CockroachDB now uses jemalloc version 4.5.0. #14287

SQL Language Changes

  • Collated strings are now fully supported and may be stored in columns. #13609
  • The new isnan() function and special syntax IS NAN and IS NOT NAN can be used to detect floats that are Not-a-Number. #14248
  • Variance and standard deviation calculations for integers and decimals now use additional precision internally. #14013
  • Decimals with precisions greater than 16 now work correctly. #14304
  • CREATE TABLE AS now works properly with NULL values. #14247
  • The SHOW application_name statement is now supported. #14085
  • CockroachDB now reports its version in two new places so that clients can distinguish CockroachDB from PostgreSQL: in the crdb_version variable in the network handshake, and in a new table crdb_internal.build_info. #14145
  • ALTER TABLE SPLIT AT no longer reports an error if the table is already split at the designated point. #14273
  • Casts involving OID and regclass types now behave more consistently with PostgreSQL. The oid() function is now available. #13965 #14022 #14115 #14260
  • Placeholder syntax may now be used for OID values. #14255
  • Types with modifiers can now be cast to ::regtype. #14030

Command-Line Interface Changes

  • A new command cockroach gen haproxy is now available to generate an haproxy configuration file that can be used to access the cluster. #14205
  • The cockroach start command now supports a --pid-file flag, which names a file to which the process ID will be written when the server is ready to handle requests. #13996
  • If any environment variables used by cockroach are set but cannot be parsed, this is now treated as a fatal error. #14124

Admin UI Changes

  • The log view now shows logs for the requested node. #13947
  • The custom time range selector now uses UTC to match the graphs. #14007
  • The admin UI now uses relative paths for all links and respects cookies, allowing it to be run behind authenticating proxies. #14039
  • The guideline displayed when hovering over a graph is now positioned correctly. #14008

Bug Fixes

  • UPSERT statements no longer incorrectly produce the error "cannot affect row a second time". #10478
  • The replica allocator now explicitly recognizes when a node's health is unknown, and avoids situations in which a range could become critically under-replicated. #14206
  • Fixed a problem with transaction conflicts immediately after a split that could cause 100% CPU usage. #14305
  • The rebalancing system is better able to move replicas to match requested constraints. #13973
  • Fixed a race that could lead to a panic when replicas are being moved frequently. #14306
  • SHOW TABLES no longer fails while a table is being dropped. #14278
  • Fixed a crash in some EXPLAIN statements. #14244
  • Name resolution no longer fails if non-existent databases are present in the search path. #14006
  • Logging of "node joined the cluster" events for the UI is more reliable. #14179
  • Memory accounting on macOS now correctly reports memory allocated by C code. #14287

Performance Improvements

  • Range leases are now transferred to the replica closest to the source of load, when possible. This improves performance in geographically-distributed clusters. #14268
  • The replica allocator will now actively attempt to move replicas away from no-longer-valid placements when the zone configuration changes. #14106
  • Improved the performance of write-heavy workloads. #14138
  • Improved caching of range descriptors. #14217
  • Reduced overhead in the command queue. #13982
  • CockroachDB now enables TCP keepalives on its sockets, improving responsiveness to clients that have disappeared (or load balancers with short timeouts). #14063
  • Index backfill now only reads the columns necessary to perform the backfill. #14271

Doc Updates

Contributors

This release includes 156 merged PRs by 23 authors. We would like to thank first-time contributor Jonas from the CockroachDB community.

beta-20170309

Release Date:

General Changes

  • CockroachDB now uses Go 1.8. #13673
  • CockroachDB now uses RocksDB 5.1.4. #13831

SQL Language Changes

  • Table names are now released as soon as the DROP TABLE statement executes, instead of being held until the asynchronous cleanup finishes. #13908
  • Most write statements now accept a RETURNING NOTHING clause to indicate that the query should not return a result (not even the number of rows affected). This will be used in the future to enable optimizations. #13802
  • PostgreSQL-style duration formats are now parsed case-insensitively. #13748
  • Tables with no columns are now handled correctly in the network protocol. #13765
  • COPY no longer requires the input data to end in a newline. #13858
  • SHOW CONSTRAINTS no longer includes constraints involving hidden columns. #13870
  • It is no longer possible to drop system tables. #13911
  • The DESC modifier can now be applied to columns in a PRIMARY KEY or UNIQUE clause during table creation. #13924

Command-Line Interface Changes

  • The cockroach dump command now takes an --as-of flag, which can be used to make a backup as of a particular time.
  • When starting a node, the details printed to stdout are now written to the node's INFO log as well. Also, these details now include node attributes and locality. #1143, #1144

Bug Fixes

  • Fixed (again) a bug in error handling that could causes ranges to get stuck if an error occurred during a rebalance. #13763
  • Work around a bug that could cause GRPC connections to get stuck in a broken state. #13822
  • Panic stack traces are now written to the INFO log file by default instead of to stderr. #13890

Performance Improvements

  • Improved performance in high-contention scenarios by introducing a queue to wait for conflicting transactions to finish. This also reduces the likelihood of transaction restarts due to write/write conflicts. #13501
  • A new lease implementation is now used for most ranges, reducing the number of writes that must be done just to maintain a lease. #13826
  • Reduced the occurrence of AmbiguousResultError by waiting for pending RPCs to complete before returning. #13800
  • Changed some mutexes to RWMutexes. Removed some instrumentation of mutex timing. #13697
  • cockroach dump now works in larger batches. #13812
  • Failed snapshots no longer disrupt regular raft messages. #13816
  • Increased flow control parameters for GRPC connections, improving performance on high-latency links. #13840
  • Increased limits on in-flight raft messages. #13862
  • Range leases are now proactively transferred away from draining nodes. #13792
  • Avoid sending redundant PushTxn calls in intent resolution. #13955

Doc Updates

Contributors

This release includes 124 merged PRs by 21 authors. We would like to thank first-time contributor Dmitry Vorobev from the CockroachDB community.

beta-20170223

Release Date:

SQL Language Changes

  • Fixed parsing of interval constants with precision modifiers such as INTERVAL '5' YEARS. #13702
  • String literals containing true, false, or their synonyms (but not placeholders or other expressions of type string) can now be used where a BOOL is required. #13685
  • The underlying implementation of the DECIMAL type has been replaced. This may change the results of some calculations. The default rounding behavior for DECIMAL values is now "half away from zero", which is consistent with PostgreSQL. #13551
  • The column headers in the results of SHOW commands are now lower-case to match PostgreSQL. #13484
  • The pg_index.indkey column is now an int2vector, improving compatibility with Sequelize. #13484
  • Improved support for arrays (still limited to the pg_catalog tables). #13636 #13535
  • The output of SHOW USERS is now sorted. #13661

Admin UI Changes

  • A new graph displays the execution latency for SQL statements. #12790
  • A new "All Events" page displays cluster history. #13093
  • New metrics for round-trip time between nodes are now recorded. #13533
  • Fixed-width fonts now correctly use Inconsolata. #13631

Bug Fixes

  • Fixed a bug in error handling that could causes ranges to get stuck if an error occurred during a rebalance. #13605
  • Retry table lease errors during schema changes, preventing them from getting stuck. #13606
  • Inter-node connections are now closed on heartbeat timeouts, improving the handling of network partitions. #13654

Performance Improvements

  • Metadata for queries using unqualified table names is now cached, speeding up these queries by 130%. #13635
  • Eliminated an unnecessary sort phase in table scans, making cockroach dump usable on larger tables. #13703
  • Leases and replicas will no longer be transferred to nodes that are draining. #11724 #13601
  • Reduced unnecessary copying and allocations. #13660 #13649

Contributors

This release includes 57 merged PRs by 19 authors.

beta-20170216

Release Date:

SQL Language Changes

  • The search path for table names can now be set with SET SEARCH_PATH. #13313
  • All built-in functions are now in the global namespace (instead of pg_catalog). #13404
  • The pg_extension table and the current_database function are now supported. The pg_type and pg_namespace tables have had some changes to improve compatibility with ActiveRecord. #13429
  • The columns used in foreign keys are now tracked more accurately. #13439

Admin UI Changes

  • The correct fonts are now used. #13539

Bug Fixes

  • Replicas that fall too far behind no longer get stuck in a state in which they can no longer catch up. #13515
  • The cockroach.LEVEL symlinks created in the log directory now work. #13585

Performance Improvements

Doc Updates

Contributors

This release includes 60 merged PRs by 18 authors. We would like to thank first-time contributor Jason Chu from the CockroachDB community.

beta-20170209

Release Date:

Build Changes

  • Official binaries for Linux now support older Linux distributions, including RHEL 6. #13102
  • CockroachDB now uses RocksDB 5.0.2. #12913

SQL Language Changes

  • The unnest() function is now supported. #13154
  • It is now possible to join a set-returning function like generate_series() with itself. #13140
  • The timestamp parser now accepts an additional format. #13159
  • The output of EXPLAIN has been improved. #13216 #13221
  • Hex string literals (X'') can now contain byte sequences that are not valid UTF-8. #13287
  • COPY now works outside transactions. #13400
  • Fixed some edge cases with the IN operator. #13444
  • The pg_type table now contains entries with the same names as PostgreSQL, such as int2, int4, and int8 instead of just integer. #13355
  • The pg_backend_pid, obj_description, and shobj_description functions and the pg_inherits, pg_foreign_table, and pg_foreign_server tables now have placeholder implementations for compatibility with some clients. #13097 #13181

Command-Line Interface Changes

  • The --pretty flag of cockroach sql has been removed, and replaced with a --format flag that supports multiple output formats. The command set display_format can be used to change the format during a session. #13171
  • The current database name is now shown in the prompt. #12747 #13379
  • Non-interactive usage of cockroach sql is much faster when the input file contains very long lines. #13174

Admin UI Changes

  • Introduced a new overview dashboard. #13348
  • Improved accuracy of histogram data. #13106

Performance Improvements

  • All columns in newly-created tables are placed in the same column family by default. #13198
  • Scans with a LIMIT no longer interfere with writes to rows that match the WHERE clause but were not returned due to the LIMIT. #13349
  • Performance is more stable during splits. #13208
  • Reduced unnecessary disk access in read-only transactions. #13367
  • Reduced log spam. #13388

Bug Fixes

  • Nodes now retry at startup if they are unable to allocate a node ID. #13148
  • Improved gossiping of system configuration data. #13167

Doc Updates

Contributors

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

  • Panos Mamatsis

beta-20170126

Release Date:

License Change

  • CockroachDB is now covered by the CockroachDB Community License. A pure open-source (APL2) version can be obtained by building from source with the make buildoss build target. See our blog post for more details.

Backwards-Incompatible Changes

  • TLS 1.2 is now required to communicate with a CockroachDB server in secure mode. #12898
  • The hex string syntax X'0d0a' now produces byte values instead of string values, so it can accept non-UTF-8 input. #13094

Build Changes

  • Cockroachdb now uses Go 1.7.4. #12881

New Features

SQL Language Changes

  • The information_schema.statistics table and the output of SHOW INDEXES now include columns that are added to the index implicitly (the primary key is an implicit part of secondary indexes). These columns are marked by a new Implicit column. #12801
  • The COPY statement is now more compatible with PostgreSQL. #12723
  • CockroachDB now advertises the integer_datetimes parameter, improving compatibility with JDBC. #12842
  • The sum() function now works with INTEGER values. #12938
  • The format_type() nd col_description() functions are now supported. #12967 #12978
  • The pg_catalog.pg_enum table now exists (although it is always empty because we do not yet support enum types). #12972
  • The pg_catalog.pg_collation table is now supported, along with the pg_attribute.attcollation and pg_type.typcollation columns. #12983
  • The OID and NAME types are now supported (and used in pg_catalog) for compatibility with PostgreSQL. #12641
  • SHOW COLUMNS now includes a summary of indices that the column is a part of. #12907

Command-Line Interface Changes

  • The cockroach dump command can now dump multiple tables at the same time. #12759
  • The cockroach dump has a new flag, --dump-mode, which can be used to dump the schema or the data for a table separately. #12759
  • Timestamps are now displayed in a format which is accepted by the SQL parser. #12886
  • The --pretty flag has been removed from commands that never used it. #12900
  • An error is raised when too many positional command-line arguments are provided. #12901

Admin UI Changes

  • When the cursor is over a graph, a vertical line is shown to mark the same time on all graphs. #12645

Performance Improvements

  • Table leases are now released when a node shuts down cleanly. #12501
  • Miscellaneous query optimizations. #12617
  • The gossip network reaches equilibrium faster in larger clusters. #12880 #12920 #12974
  • When a node is shutting down, SQL connections are closed when they become idle. #12952
  • Nodes now refuse to accept new ranges if they are falling behind on the ranges they already have. #13043

Bug Fixes

  • UPDATE statements using a secondary index no longer cause server crashes during schema changes. #12794
  • Improved accuracy and performance of node liveness heartbeats. #12864
  • Reduced the occurrence of "ambiguous result" errors. #12557
  • The server no longer ignores signals during initialization. #12743
  • It is now possible to drop a table with a self-referential foreign key without the CASCADE modifier. #12958
  • Additional data consistency checks have been temporarily enabled. #12994
  • Fixed a crash when retryable errors are returned inside subqueries. #13028
  • Node ID allocation is now retried if it fails when a node first starts. #13107

Doc Updates

Contributors

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

  • DiSiqueira
  • Jason E. Aten

beta-20170112

Release Date:

Upgrade Notes

  • This release cannot be run concurrently with older beta releases. Please stop all nodes running older releases before restarting any node with this version.

SQL Language Changes

  • The ALTER TABLE VALIDATE CONSTRAINT statement can now be used to validate foreign keys in the UNVALIDATED state. #12682
  • ALTER TABLE DROP COLUMN can now drop columns that are involved in indexes. If the index includes columns other than the one being dropped, the CASCADE modifier is required. #12782
  • Leading zeros in numeric literals are now ignored instead of causing the number to be parsed as octal. #12803
  • Collated strings can now be cast to the non-collated string type. #12820
  • Arithmetic with aggregated functions no longer crashes when the input table is empty. #12733
  • The SHOW COLUMNS statement now works for non-root users with the appropriate permissions. #12776
  • The information_schema.statistics.NON_UNIQUE field is now set correctly. #12793
  • It is now possible to use EXPLAIN statements as an input to other queries using a new square bracket syntax: SELECT MAX(level) FROM [EXPLAIN SELECT * FROM kv ORDER BY v]. #12637
  • The format of SQL error messages has been standardized. #12401

Command-Line Interface Changes

  • The prototype cockroach backup and cockroach restore commands have been removed (backup and restore functionality will be provided through SQL statements instead). #12788

Admin UI Changes

  • The set of graphs displayed in the UI has been changed. #12797
  • The node list and cluster pages has been updated. #12643 #12719
  • A new metric raftlog.behind is now reported to track how far behind raft processing is on a node. #12800

Bug Fixes

  • Ranges can no longer be rebalanced away from their current lease holder. #12598
  • Eliminated a source of incorrect "not lease holder" errors. #12542
  • Reduced spammy "purgatory" log messages. #12528

Performance Improvements

  • The maximum allowable clock offset has been increased from 250ms to 500ms. #12821
  • Replica destruction is now much faster. #12745
  • Raft snapshots and replica destruction no longer run concurrently. #12737
  • Raft snapshots are now managed by a new internal queue. #12686
  • Raft logs are now garbage collected more aggressively. #12686
  • Replicas that are behind are no longer considered targets for lease rebalancing. #12736
  • Tuned some RocksDB parameters. #12677

Doc Updates

Contributors

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

  • songhao

beta-20170105

Release Date:

General Changes

  • CockroachDB now uses a more recent version of GRPC. #9697

SQL Language Changes

  • FILTER clauses for aggregate functions are now supported. See the SELECT documentation for examples. #10146
  • Columns can now be created with collated string types, although these columns cannot yet be indexed or part of the primary key. #12294
  • INTERVAL values can now be added to DATE values. #12428
  • TIMESTAMP values can now be compared to DATE values. #12431
  • DATE literals in views now work correctly. #12450
  • Parsing of INTERVAL values is now more consistent with PostgreSQL. #12559 #12566
  • ORDER BY now works correctly when sorting by the result of an aggregate function. #12185
  • ORDER BY now returns an error in more cases when its arguments are ambiguous. #12255
  • The experimental_unique_bytes() function has been removed. #12228
  • The extract() function now supports DATE values. As a consequence, extract() no longer supports STRING values, which must now be explicitly cast to TIMESTAMP or DATE. #12479
  • The pg_indexes.pg_indexes now includes the oid column. #12359
  • The pg_catalog.pg_get_indexdef function is now supported. #12359
  • The array_agg() function now handles NULL values correctly. #12534

Admin UI Changes

  • Metrics for the number of live nodes and the number of Raft commands are now reported. #12296
  • Improved the time selector. #12360
  • Added new summary statistics. #12486
  • Graph axes have been improved. #12427
  • The event list has been updated. #12638

Performance Improvements

  • When a node stops responding to heartbeats, non-heartbeat Raft traffic to that node is suspended until it becomes responsive again. #12631
  • Improved logic for transferring Raft leadership to coincide with the lease holder. #12323
  • Fixed a thundering herd problem after a node goes down. #12352
  • Prevented unnecessary retries of Raft commands. #12487
  • Improved lease rebalancing in deployments with multiple stores per node. #12565
  • Reduced the number of cgo calls made to RocksDB. #12343

Bug Fixes

  • Commands are now canceled correctly if the replica tracking them is removed while they are pending. #12313
  • Raft groups are always initialized when handling messages. #12465
  • Improved error handling for invalid UTF-8 strings. #12194
  • Fixed several bugs in FULL and RIGHT OUTER JOIN. #12364
  • Fixed a regression in OUTER JOIN operations with predicates. #12350
  • Fixed type checking in window definitions. #12483
  • Fixed a bug when adding columns with families to tables created by certain older beta versions of CockroachDB. #12475
  • It is now possible to disable logging output to files with --log-dir=. #12662
  • When logging to both stderr and files, all desired logging output is now properly emitted to files, not only to stderr. #12662

Internal Changes

  • A framework has been introduced for migrating existing clusters to new definitions for internal tables. #11658

Doc Updates

Contributors

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

  • Haines Chan

beta-20161215

Release Date:

General Changes

  • CockroachDB now uses RocksDB version 4.11.2. #9616

SQL Language Changes

  • Additional support for standard database introspection required by popular ORMs. These features apply to built-in tables only; eventually, they will be made available for user-generated tables as well.
    • The array_agg aggregate function is now supported for ints and strings. #12186
    • The ANY, SOME and ALL array operators are now supported. #12102
    • GROUP BY can now be used with columns of type ARRAY. #12198
  • The SET command now recognizes the search_path, client_encoding, standard_conforming_strings, and client_min_messages variables for compatibility with PostgreSQL. Setting these variables currently has no effect. #12149
  • The SHOW server_version command now returns the version of PostgreSQL that CockroachDB most closely resembles. #12149

Admin UI Changes

  • Aggregated rates are now computed correctly. #12200
  • Various stylistic improvements. #12118 #12152
  • Metrics have been added for lease-related operations. #12205

Performance Improvements

  • Raft snapshots are now applied one at a time. #12192

Bug Fixes

  • The repair system now detects unresponsive nodes more accurately in the event of asymmetric partitions. #12178
  • String arrays are now quoted correctly on the wire. #12268

Doc Updates

  • Each SQL constraint now has a dedicated page of documentation. #901
  • The cockroach zone documentation now offers minimum and maximum recommendations for the ttlseconds setting, which defines the number of seconds overwritten values are retained before garbage collection. #912

Contributors

This release includes 62 merged PRs by 18 authors.

beta-20161208

Release Date:

SQL Language Changes

Command-Line Interface Changes

  • Log file names have changed. The new format is cockroach.kenabook.kena.2016-11-28T20_00_35Z.009524.ERROR.log. #11666

Admin UI Changes

  • On the Cluster Overview page, added a Summary section showing total nodes and capacity used, and updated the overall navigation and style. #11696 #11754
  • Several "allocator" metrics have been replaced with a new "underreplicated range" metric. #11733 #11983
  • The "ranges available" metric has been replaced with a "ranges unavailable" metric, which is computed differently. #11760
  • New metrics have been added for the replication queue and replica GC queue. #11753 #11785
  • New metrics have been added for RPCs. #11711
  • New metrics have been added to track commands that have been stuck for a long time. #12106

Performance Improvements

  • Range leases are now balanced across the nodes in a cluster. #11757
  • Raft heartbeats are once again coalesced into one message per pair of nodes instead of per range. #11757
  • Persisting the applied index is now faster. #9993
  • The replication queue no longer tries to reprocess the same range repeatedly. #11982
  • Limited frequent reprocessing of ranges for time series maintenance and consistency checks. #10665
  • The time series maintenance queue no longer sends commands when it has nothing to do. #11762
  • The pow() function is now faster when small numbers are raised to very large powers. #11738
  • JOIN queries now only scan the columns they need. #11736
  • Micro-optimized logging and removed some noisy log events. #11778

Bug Fixes

  • Fixed a panic when sending a raft message fails. #11985
  • Fixed a memory spike that could occur during asymmetric partitions. #12100
  • DROP DATABASE now works when foreign key constraints are present. #12036
  • DROP DATABASE no longer hangs when subqueries have been used. #11730
  • Requests no longer get stuck forever after a timeout. #12000
  • Comparisons of SQL tuples now work for all types. #10475

Contributors

This release includes 101 merged PRs by 19 authors. We would like to thank the following contributors from the CockroachDB community.

  • songhao
  • yznming

beta-20161201

Release Date:

Upgrade Notes

Due to changes in the on-disk format of internal range leases, this release cannot be run concurrently with any prior release. All servers running older versions must be stopped before starting any node with this version. #10420

We realize that "stop the world" upgrades are overly interruptive and are actively working on infrastructure improvements to drastically reduce the need for such upgrades in the future.

Build Changes

  • CockroachDB now vendors its dependencies, so building from source no longer interferes with other project in the $GOPATH. #9900

SQL Language Changes

  • Adding a FOREIGN KEY constraint now automatically creates necessary indexes. #9572
  • The pg_catalog.pg_roles, pg_catalog.pg_description, pg_catalog.pg_settings, and pg_catalog.pg_index tables are now supported. #10377 #10381 #10293 #10548 #10592
  • The pg_catalog.pg_depend table is now partially supported (just enough to support pgjdbc). #10696
  • pg_catalog tables now report databases as belonging to PostgreSQL-compatible namespaces. This is for compatibility only; CockroachDB does not have a notion of namespaces. #11603
  • The pg_catalog.pg_get_expr and pg_catalog.pg_generate_series functions are now supported. #10952 #11214
  • The conkey and confkey columns of the pg_catalog.pg_constraint table now return real integer arrays. #10584
  • New functions from_ip() and to_ip() convert between binary and textual IP address formats. #10349
  • Tuple types can now be returned by queries. #10380
  • The SQL standard interval format Y-M-D is now supported. #10499
  • The array_length, array_upper, and array_lower functions are now available. #10565
  • The to_uuid and from_uuid functions are now available. #10541
  • The pow() and div() functions now work when both arguments are integers. #10538
  • The ARRAY[] constructor syntax is now supported. #10585
  • The COLLATE operator is now supported. Collation support is still incomplete and will be improved in upcoming releases. #10605
  • The current_schema function is now supported. #10707
  • The SET APPLICATION_NAME statement is now supported. This is a write-only variable which is used by some frameworks but has no effect. #10725
  • The CREATE DATABASE statement now accepts the options TEMPLATE, LC_COLLATE, and LC_CTYPE for compatibility with PostgreSQL, although the values available for these options are limited. #10775
  • The SELECT statement now supports the WITH ORDINALITY modifier to generate row numbers. #10558

Command-Line Interface Changes

  • Temporary directories are no longer created automatically for logging. Commands other than cockroach start log to stderr if no --log-dir flag is given, and cockroach start writes to the directory of the first store. Various combinations of --log-dir, --logtostderr, and --alsologtostderr now work in more sensible ways. #10675 #10926 #10962
  • The cockroach sql prompt now indicates the status of the current transaction (if any). #10866
  • The --password flag for the cockroach user set command no longer accepts the new password as a command-line argument; instead this flag is a boolean to determine whether a password should be created for the user. The password is always read from stdin. #10680
  • The cockroach user set command no longer prompts for passwords in insecure mode unless --password is given. #10547
  • The cockroach debug compact command now always rewrites all data, allowing it to pick up configuration changes. #10532

Admin UI Changes

  • The design of the navigation elements has been updated. #10611
  • The design of the Database tab has been updated. #10552
  • Syntax highlighting is now used when displaying CREATE TABLE statements. #10579
  • The UI no longer attempts to display information about the virtual databases information_schema and pg_catalog. #10920
  • Metrics for the fraction of available and fully-replicated ranges are now computed more accurately. #11213

Performance Improvements

  • Increased the speed of some mathematical operations (Log, Pow) on DECIMAL values. #11669
  • Reduced rebalancer thrashing by dynamically adjusting how often store capacities are gossiped. #11662
  • Adding new replicas is now prioritized over removing dead ones. #10492 #10683
  • Replicating ranges to a new node is now more reliably performed back-to-back. #10440 #10749
  • The rebalancing system is now less prone to thrashing. #10761
  • Raft log truncation is now aware of pending snapshots. #10482
  • Raft snapshots are now applied more efficiently. #10931
  • Raft now sends log entries in smaller batches. #10929
  • Replica garbage collection is now triggered more reliably by replication changes. #10500
  • Old replicas that are blocking other operations are now prioritized for garbage collection. #10426
  • Small clusters now run their replica scanners more frequently by default. #10433
  • Reduced contention in the command queue for multi-range operations. #10470
  • Operations that have already expired are no longer added to the command queue. #10487
  • Reduced allocations for SQL row data. #10534
  • Reduced memory allocations when encoding dates and times. #10531
  • Parsing hexadecimal literals using the x'' syntax is now more efficient. #10660
  • Time series pruning is now more efficient. #10682
  • Commands that have been canceled by clients no longer accumulate in the internal command queue. #10772
  • When a command that has been retried on multiple replicas succeeds on any of them, any in-flight attempts on the other replicas is canceled. #10970
  • The fast-path for local "RPCs" now uses goroutines to avoid blocking the caller. #11196

Bug Fixes

  • Fixed a bug that caused over-aggressive Raft log truncation, which in turn led to an excessive number of Raft initiated snapshots. #11720
  • Fixed a bug that caused data corruption when upgrading from beta-20161103 to beta-20161110. #10681 #10724
  • A node that is stopped and restarted quickly can no longer produce inconsistent results. #10420
  • Fixed bugs that prevented communication with a node that was previously down. #10642 #10652
  • It is now possible for a new node to start up using the same network address as a node that had previously existed. #10544 #10699
  • Replication snapshots now release their resources earlier, preventing deadlocks. #10491
  • Fixed a bug with time series garbage collection when the time series data spans multiple ranges. #10400
  • Fixed several bugs with very large DECIMAL values or very small fractions. #10446 #10559 #10570 #10934
  • The pow() function now returns an error when its arguments are too large. #10525
  • Fixed a crash when the number of placeholders in a query doesn't match the number of arguments. #10474
  • Improved error handling when a SQL transaction exceeds an internal deadline. #9906
  • Fixed a panic in raft leadership transfers. #10530
  • Fixed a leak in CREATE TABLE AS and CREATE VIEW. #10527
  • Fixed a panic "range lookup of meta key found only non-matching ranges". #10583
  • The consistency checker now runs to completion instead of canceling itself before finishing. #10625
  • Internal retries no longer cause transaction replay errors. #10639
  • The cockroach sql command no longer crashes when given a URL without a username. #10862
  • Fixed a deadlock in RemoveReplica. #10875
  • result is ambiguous errors are now returned in more situations. #10703 #11211
  • The ALTER TABLE SPLIT AT command will now retry internally instead of returning errors about conflicting updates. #10728
  • Fixed a panic that could occur when a node is restarted after an unclean shutdown. #10690
  • Fixed a panic when replicas are removed and re-added rapidly. #11699
  • The sign() function with a DECIMAL argument now returns a decimal rather than a float. #10954
  • Fixed a panic in the raft tick loop. #11622
  • The LIMIT operator now works correctly in INSERT ... SELECT. #11632

Doc Updates

Contributors

This release includes 292 merged PRs by 30 authors. We would like to thank the following contributors from the CockroachDB community, including first-time contributors Christian Gati, Dustin Hiatt, kiran, and Nathan Johnson.

  • Christian Gati
  • Dustin Hiatt
  • Haines Chan
  • kiran
  • Nathan Johnson
  • songhao
  • yznming

beta-20161103

Release Date:

Backwards-Incompatible Changes

  • Users (other than root) must now be created with the CREATE USER statement or cockroach user set command before they can be used for TLS certificate- or password-based authentication. #9794
  • The ambiguous result error message introduced in beta-20161027 is now simply result is ambiguous since it may be returned outside of transactions. #10279

SQL Language Changes

  • Password-based authentication is now supported. Clients can authenticate with either a TLS certificate or a password. Documentation coming soon.#9794
  • The SHOW USERS statement is now supported. #10088
  • The pg_catalog.pg_type, pg_catalog.pg_database, pg_catalog.pg_views, pg_catalog.pg_proc, and pg_catalog.pg_am tables are now supported. #10209, #10284, #10276, #10217, #10363
  • The information_schema.statistics and information_schema.views tables are now supported. #10220, #10288
  • SHOW TABLES now adds a (dropped) suffix to tables that are being dropped. #10063
  • SHOW CREATE VIEW now only requires permissions on the view, not the underlying tables. #10270

Command-Line Interface Changes

  • When entering a transaction in the built-in sql shell, the statements are not sent to the server until there is either a COMMIT, ROLLBACK, or two blank lines. This minimizes the lifetime of the transaction and therefore the risk of conflicts. #10187

Performance Improvements

  • Queries that span multiple ranges are now executed across those ranges in parallel. #9197
  • Time series data (used in the admin UI) is now loaded in parallel. #10250
  • Rebalancing now reaches an equilibrium faster. #10330

Bug Fixes

  • Memory usage of SQL queries is now monitored, and queries that use too much will fail rather than exhaust the server's memory. #9259
  • Fixed a problem with snapshot error handling that could cause the cluster to be unable to make progress after node failure.
  • Computing the log() of a very large number no longer causes the server to hang. #10221
  • Decimal numbers are now parsed correctly in AS OF SYSTEM TIME queries. #10242
  • concat_ws() with no arguments no longer crashes the server. #10309
  • Fixed a bug when a command was executed after its client had disconnected. #10279

Doc Updates

Contributors

This release includes 68 merged PRs by 24 authors. We would like to thank the following contributors from the CockroachDB community, including first-time contributors Johan Brandhorst and MaBo.

  • Johan Brandhorst
  • MaBo
  • Yan Long
  • songhao

beta-20161027

Release Date:

Backwards-Incompatible Changes

  • Functions that return the current time - including now() - now return values of type TIMESTAMP WITH TIME ZONE instead of TIMESTAMP, unless called from a context that expects the latter type. #9618

SQL Language Changes

  • Views are now supported. Views are stored queries, represented as virtual tables, that produce a result set when requested. They can be used to hide query complexity, limit access to underlying data, or simplify the process of supporting legacy code.
  • Tables in the pg_catalog database can now be accessed with unqualified names if no table of the same name exists in the current database. #9927
  • AS OF SYSTEM TIME queries now support the decimal format returned by cluster_logical_timestamp() for maximum precision. #9934
  • The CASCADE option of DROP TABLE and ALTER TABLE DROP COLUMN now drops views that depend on the table or column; it is now an error to attempt to drop a table or column with dependent views without either using this option or dropping the views first. #9724, #10124
  • SET DEFAULT_TRANSACTION_ISOLATION is now supported, improving compatibility with psycopg2. #10087
  • The pg_catalog.pg_indexes and pg_catalog.pg_constraint tables are now supported. #9869, #9991
  • EXPLAIN can now be used with SHOW, HELP, and ALTER TABLE ... SPLIT. #10013
  • The current_schemas() function is now supported, improving compatibility with ActiveRecord. #9604
  • The SHOW ALL statement is now supported. #10195
  • The DROP INDEX and ALTER INDEX statements can now use unqualified index names. #10091

Command-Line Interface Changes

  • The --host flag in client commands such as cockroach sql now defaults to localhost in both secure and insecure modes. #10134
  • Improved error messages when a server is down or certificates are not configured correctly. #9917
  • The --key flag can now be passed via the environment variable COCKROACH_KEY, matching other similar flags. #10092

Performance Improvements

  • RocksDB bloom filters now use 10x less memory, with a negligible reduction in speed. #10085
  • Old time-series data is now garbage collected. #9959
  • Reduced overhead of the internal time-series metric system. #9889
  • Reduced impact of schema changes on regular queries. #9798
  • In the event of a node failure, schema changes now save their progress and can resume from their last checkpoint instead of restarting from the beginning. #10036
  • Ranges are now split more eagerly when tables are created or data is growing rapidly. #10232

Bug Fixes

  • Certain network- and timeout-related errors will now return the error "transaction commit result is ambiguous" when it cannot be determined whether a transaction committed or not. This fixes bugs in which statements outside of transactions could be applied twice, and other transactions may incorrectly report unique constraint violations. #10207
  • SET TIME ZONE 0 now sets the session time zone to UTC (other numbers already worked). #9992
  • SHOW statements for session variables now work correctly when prepared and executed separately. #10013
  • Columns that are a part of the primary key can now be renamed. #10018
  • Fixed a panic during transaction rollback. #9961
  • Float comparisons involving NaN are now correct in all cases. #10112
  • Clock offset monitoring is now more sensitive. #10185
  • The rebalancer is now better able to avoid placing a replica on a store that has previously had a corrupted replica of the same range. #10141
  • More complex expressions involving window functions are now supported. #10186
  • Fixed a deadlock that could occur when using the Prometheus metrics endpoint. #10228

Contributors

This release includes 182 merged PRs by 24 authors. We would like to thank the following contributors from the CockroachDB, including first-time contributor Haines Chan.

  • Haines Chan
  • songhao

beta-20161013

Release Date:

This week's release includes many user-visible changes and features that have been in development since our stability-focused "code yellow" started back in August. When we entered "code yellow", all work unrelated to stability was done in a secondary development environment. Since then, we've made great progress, and so have moved many of these new features back into our main development environment.

Backwards-Incompatible Changes

  • TIMESTAMP values are now stored with microsecond precision instead of nanoseconds. All nanosecond-related functions have been removed. An existing table t with nanosecond timestamps in column s can round them to microseconds with UPDATE t SET s = s + '0s'. However, note that this could potentially cause uniqueness problems if the timestamp is a primary key. #8864
  • TIMESTAMP values (without TIME ZONE) are now parsed in UTC, not in the session time zone. #9444
  • The deprecated --http-addr flag has been removed. When starting a node, use the --http-host flag instead to specify the address to listen on for Admin UI HTTP requests. #9725

SQL Language Changes

  • Tables can now be interleaved into other tables. Interleaving tables improves query performance by optimizing the key-value structure of closely related tables, attempting to keep data on the same key-value range if it’s likely to be read and written together. #7985
  • The CREATE TABLE AS statement can now be used to create a table based on the results of a SELECT statement. #8802, #9278
  • The ALTER TABLE ... SPLIT AT command can now be used to force a range split at a specified key. #8938
  • Added new information_schema metatables as well as initial support for the pg_catalog database. This work is part of our ongoing effort to provide standard database introspection required by popular ORMs. #8433, #8498, #9565, #9114, #9104
  • CHECK constraints can now be added with the ALTER TABLE ADD CHECK and ALTER TABLE VALIDATE statements. #9127 #9152
  • The ALTER TABLE DROP CONSTRAINT statement can now drop CHECK and FOREIGN KEY constraints. #8747
  • The SHOW CONSTRAINTS statement now requires the user to have privileges for the requested table. #8658
  • The EXPLAIN statement now works correctly for VALUES statements containing subqueries. #8970
  • The TRUNCATE statement now implements the CASCADE modifier. #9240
  • TIMESTAMP values that include a time zone can now omit the minutes field of the time zone offset, for compatibility with PostgreSQL. #8666
  • INTERVAL values can now be input in a colon-delimited format (H:M or H:M_S), for compatibility with PostgreSQL. #8603
  • The INT8 type is now supported as an alias for INT. #8858
  • INTERVAL, TIMESTAMP, TIMESTAMPTZ, and DATE values can now be casted to/from more types. #9731
  • The window functions row_number(), rank(), dense_rank(), percent_rank(), cume_dist(), ntile(), lead(), lag(), first_value(), last_value(), nth_value() are now supported. #8928, #9321, #9335
  • The exp() function returns an error if its argument is greater than 1024 instead of performing excessively expensive computation. #8822
  • The round() function now breaks ties by rounding to the nearest even value (also known as bankers' rounding). It is now faster, and returns an error when given an excessively large number of digits. #8822
  • The concat_agg aggregate function is now supported. #9690
  • New date/time functions, extract_duration(), experimental_strptime() and experimental_strftime(), are now supported. #9734, #9762

Protocol Changes

  • The COPY protocol is now supported on the server side with the COPY FROM statement. The cockroach sql command-line tool does not yet recognize this command but it can be used with other client interfaces. #8756
  • DECIMAL values are now encoded correctly for drivers that use the binary format. #8319
  • TIMESTAMP, TIMESTAMPTZ and DATE values can now use the binary protocol format for clients that support it. #8590, #8762
  • NULL values are now sent with the correct type OID, which is required by some PostgreSQL drivers. #9331
  • The CREATE TABLE and CREATE DATABASE statements now return the standard PostgreSQL error code when the table or database already exists. #9235

Command-line Interface Changes

  • The cockroach start command now prints additional fields to stdout: clusterID, nodeID, and status, which indicates whether the node started a new cluster, joined an existing cluster for the first time, or rejoined an existing cluster. #9066
  • The cockroach start command now terminates with a non-zero exit status if it was interrupted with Ctrl+C or a signal. #9051
  • The cockroach zone set command now supports the --disable-replication flag, which sets the desired replication factor to 1. #9253
  • The cockroach gen example-data command can now be used to generate SQL for example databases. #9231, #9475
  • The cockroach sql shell now presents a new prompt when Ctrl+C is pressed after the user starts entering a statement. #9704
  • When using Ctrl+R in the cockroach sql shell to recall a previous statement from the shell history, the search is now case-insensitive. #9704
  • The cockroach sql shell now reports unterminated final statements as errors instead of ignoring them. #8838
  • The cockroach sql shell now reports when the connection to the server is lost and a new connection is opened. #9613
  • The cockroach sql shell now ignores lines that contain only whitespace (e.g., comments). #9243
  • The cockroach sql shell now prints expressions in EXPLAIN and the shell history such as E::T or E:::T in the same format entered instead of using the longer CAST or TYPE_ANNOTATE syntax. #9739
  • The cockroach sql shell now stops processing statements at the first error encountered when reading from a file (non-interactively). This behavior is customizable with the new unset errexit shell command. #9610
  • The cockroach sql shell now checks if a statement or query is syntactically valid on the client side before it is sent to the server. This ensures that a typo or mistake during user entry does not inconveniently abort an ongoing transaction previously started interactively. This behavior is customizable with the new unset check_syntax shell command. #9610
  • The cockroach sql shell now works better with multi-line statements. In particular, users will find it easier to recall and edit previously entered multi-line statements. This behavior is customizable with a new command unset normalize_history. #9610
  • The cockroach sql shell now works correctly under kubectl and other environments that hide the size of the terminal. #9097

UI Changes

  • The time scale selector in the UI now works more reliably. #8573
  • Additional database and table-level details are now available. #9621
  • Displaying graphs for a longer timescales is now much faster. #8805
  • The default graph time scale is now chosen based on the age of the cluster. #9340
  • Node logs are now accessible in the UI. #8572
  • The UI can now be built with live reload support. #8679
  • Exposed idiomatic bucketed histograms on prometheus endpoint. #9810
  • Exposed Mutex timing metrics. #9769

Bug Fixes

  • Fixed some panics in handling invalid SQL statements. #9049, #9050
  • Fixed an issue that sometimes caused transactions to restart twice in a row. #8596
  • STRING literals containing non-UTF-8 data are now rejected. #9094
  • The UPSERT statement now works correctly during online schema changes.#9481
  • Aggregate and window functions in GROUP BY ordinal expressions are now rejected without crashing. #9629
  • The unsupported ALTER TABLE ... ALTER COLUMN ... SET TYPE ... statement now reports an error to the client instead of crashing the server. #8747
  • Slightly improved support for 32-bit systems. Note that 32-bit architectures remain officially unsupported. #9491
  • The admin UI now propagates timeouts to the server to avoid dangling requests. #8546
  • Fixed issues with duplicate column qualifications in CREATE TABLE statements #9868
  • Empty statements are now handled correctly in prepared statements. #9811
  • Fixed a Raft assertion caused by insufficient locking. #9814

Performance Improvements

  • Tuned RocksDB settings to reduce write stalls. #9663
  • Minor performance optimization to avoid reading an internal metadata key that will be immediately overwritten. #9263
  • Improved concurrency to prevent certain slow operations from dramatically impacting overall performance. #9622
  • DROP INDEX and DROP TABLE are now performed in chunks instead of one big transaction. #8870, #8885
  • The SQL query processor now tracks its memory usage. Soon it will return errors for queries that use too much memory. #8691
  • Aggregate functions like sum() are now faster. #8680
  • For production deployments, at least 10000 file descriptors are now recommended per store, with a minimum of 2000 required. #9679
  • Improved scheduling of Raft work. #9831
  • Replaced per-request checks with a per-batch check. #9848
  • Micro-optimizations for writing time series data. #9862
  • Narrowed the use of a lock during Raft log truncation. #9840
  • Refactored a common locking pattern for better performance. #9771

Doc Updates

Contributors

This release includes 338 merged PRs by 28 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributors Francis Bergin and Yan Long:

  • Francis Bergin
  • Daniel Theophanes
  • Yan Long
  • songhao

beta-20161006

Release Date:

There aren't many user-visible changes in this week's release - an artifact of our recent stability efforts, which funneled user-visible changes to a secondary development branch. Our concerted stability effort is nearing its end, and we are preparing to include these features in next week's release.

Internal Changes

  • Nodes now periodically compare their configured maximum clock offset and exit fatally if they find another node operating with a different configuration. #9612
  • Internal low-level instrumentation has been added for debugging performance bottlenecks. #9638
  • General improvements have been made to the tracing infrastructure. #9641

Doc Updates

beta-20160929

Release Date:

New Features

  • The --advertise-host flag can now be used to override the address to advertise to other CockroachDB nodes. #9503
  • The --http-host flag sets the address to bind to for HTTP requests. Together with --http-port, it will replace --http-addr in a future release. #9573
  • More metrics are now exported about the internal garbage collection of deleted values. #9571
  • More metrics are now exported about file descriptor usage. #9582
  • The system now uses OpenTracing's new key-value style logging APIs. #9578

Bug Fixes

  • Fixed an inconsistency that could occur when transactions race with garbage collection. #9377
  • Retried BeginTransaction operations no longer leak internal errors to the client. #9305
  • Brief service interruptions are now avoided after shard splits. #9550

UI Changes

  • The UI no longer crashes when a tab is reopened after being in the background for a long time. #9042

Performance Improvements

  • Ranges which are not receiving traffic now stop sending raft heartbeats. #9383
  • Raft snapshots are now sent as a stream instead of one large message. #9292
  • The rebalancer is now better about noticing under-full stores. #9415
  • Raft messages are now sent in batches. #9485
  • Nodes are now quicker to fail over to other replicas when one is unresponsive. #9239
  • Dropping a table or index is now faster. #9419
  • Re-enabled consensus-level optimizations for network i/o. #9606

Doc Updates

Contributors

This release includes 78 merged PRs by 19 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Haines Chan:

  • Haines Chan
  • Jingguo Yao

beta-20160915

Release Date:

General Changes

  • CockroachDB is now built with Go 1.7.1. #9288
  • CockroachDB no longer requires Git 2.5; the minimum supported version is now 1.8. #9325

Bug Fixes

  • Fixed an inconsistency that could occur when two conflicting transactions were assigned the same timestamp. #9100
  • Nodes with multiple stores now export metrics in a format that works with Prometheus. #9322

Performance Improvements

  • Improved concurrency of Raft processing so snapshots and replica garbage collection do not block other ranges. #9176 #9299
  • The rebalancing system is now more tolerant of small imbalances, making the range distribution more likely to reach a steady state. #9230
  • Reduced memory used by debugging traces. #9258
  • Ranges now become responsive sooner after startup. #9276
  • Removed an internal timeout that caused unnecessary retry loops. #9234
  • Try harder to ensure that the range lease and raft leadership are co-located. #8834
  • Reduced memory used by Raft. #9193
  • The consistency checker now uses less memory when an inconsistency is found. #9159
  • The internal replica queues can now time out and recover from a replica that gets stuck. #9312
  • Removed a redundant verification process that periodically scanned over all data. #9333

Doc Updates

Contributors

This release includes 66 merged PRs by 17 authors.

beta-20160908

Release Date:

General Changes

  • CockroachDB has reverted to RocksDB 4.8. #9118
  • The logging format has changed to include a goroutine ID. #8977
  • CockroachDB now builds correctly when Git worktrees are used; as a consequence Git version 2.5 or newer is now required when building from source. #9072

Command-Line Interface Changes

  • The --from and --to arguments of debugging commands now support backslash-escaped keys. #8903
  • If any environment variables are used to configure the server, the names of those variables are printed to the logs. #9069

Bug fixes

  • Fixed a bug that would result in the server locking up after a few hours on a machine or VM with only one CPU. #8908
  • Fixed another cause of persistently broken connections on node restarts. #8947
  • CREATE TABLE now reports errors correctly instead of failing silently. #9011
  • The replica garbage collection process is no longer confused by uninitialized replicas. #9021
  • Fixed various data races. #8865, #8933
  • Fixed a panic in the time-series query system. #9038

Performance Improvements

  • Internal locking mechanisms have been refactored to improve parallelism. #8941
  • GRPC request tracing has been disabled due to its memory cost. #9113
  • Raft leadership is more reliably transferred to coincide with the range lease. #8932
  • Raft snapshots are now limited to one at a time on both the receiving and sending nodes. #8974
  • Node startup time has been improved. #9020
  • Reduced memory usage of the timestamp cache. #9102
  • Old replicas are now garbage-collected with higher priority. #9019
  • Transaction records for splits and replica changes are now garbage-collected sooner. #9036

Doc Updates

Contributors

This release includes 180 merged PRs by 17 authors. We would like to thank first-time contributor Henry Escobar from the CockroachDB community.

beta-20160829

Release Date:

General Changes

  • CockroachDB now uses Go 1.7. #8579
  • CockroachDB now uses RocksDB 4.9. #8815

Command-Line Interface Changes

  • The cockroach zone set command no longer takes its input directly on the command line. Instead, it accepts a --file flag to read from a file, or --file=- to read from standard input. #7953

New Features

  • AS OF SYSTEM TIME can now be used with JOIN queries. #8198
  • The type BIT now works correctly (as a shorthand for BIT(1)). The length limit is now enforced. #8326
  • The SHOW commands now only show tables that the current user has permission to access. #8070
  • Foreign keys can now use a prefix of an index. #8059
  • The standard information_schema database is now partially supported. New tables will be added to this database in future beta releases. #7965, #8119

Bug Fixes

  • Clusters with a large number of ranges no longer experience persistently broken connections on node restarts. #8828
  • The RENAME command now requires the DROP privilege on the table or database. It is no longer possible to rename the system database. #7998
  • The repeat() and substr() functions with very large numeric arguments will no longer crash the server as easily. #8073, #8078
  • Certain errors now cause a replica to be marked as corrupt so the corruption will not be replicated to other nodes. #7684
  • A CloseComplete packet is now sent in response to a Close command, improving compatibility with come PostgreSQL client drivers (including the Elixir driver). #8309
  • SQL name parsing has been improved to fix several panics and allow foreign key constraints that span databases. #8152
  • Fixed some panics. #8283, #8282
  • Fixed a deadlock if a range grew too large. #8387
  • Fixed a race in which multiple conflicting snapshots could be accepted at the same time. #8365
  • Decimal values are now represented correctly in the binary protocol. #8319

Performance Improvements

  • Snapshots are now sent synchronously during replica changes. This controls the rate of the replication process and prevents spikes in memory usage that often caused servers to crash. #8613
  • Raft logs are now truncated less aggressively, reducing the chance that replication will need to send a snapshot instead of the log. #8343, #8629, #8656
  • Snapshots and the raft log are now written more efficiently. #8644
  • Raft log entries are now cached. #8494
  • Raft groups are now created lazily at startup. #8592
  • Raft heartbeats are now sent less often by default. #8695
  • Improved performance and reliability of clusters with large numbers of ranges. #8125, #8162, #8495
  • The heuristics used by the rebalancing system have been improved. #8124
  • Some noisy log messages have been removed or reduced. #8071, #8021, #8240, #8292, #8529, #8687, #8689
  • The gossip network reconnects more reliably after a failure. #8128
  • RPC connections to failed nodes are now detected sooner. #8163
  • The cache of the first range descriptor is now properly invalidated. #8163
  • Removed replicas are now garbage-collected sooner in many cases. #8172
  • The resolution of the block profiler has been reduced, saving CPU. #8384
  • Range lease extensions no longer block concurrent reads. #8352

UI Changes

  • The "capacity used" is now computed correctly. #8048
  • The CPU and garbage-collection graphs now display averages. #8048
  • The Databases section now includes more details. #8364

Doc Updates

Contributors

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

  • Christian Koep
  • Dolf Schimmel
  • songhao

beta-20160728

Release Date:

New Features

  • Foreign keys can now reference multiple columns. #8033
  • The dump command can now be run by any user with SELECT privilege on the table. #7974
  • INTEGER and DECIMAL types can now be mixed in arithmetic expressions without casts. #7756
  • The --join flag can now be specified multiple times, as an alternative to specifying a comma-separated list. #7876

Bug Fixes

  • Range leases are now preserved across splits, fixing a source of inconsistent reads. #7955
  • Fixed a panic when single-statement transactions were aborted after an automatic retry. #8010
  • Parsing of time zone offsets is now more lenient, improving compatibility with JDBC drivers. #7929
  • Unbounded columns are now allowed in empty column families. #7969
  • The target columns of INSERT and UPDATE statements are now required to be given in unqualified form. #7911
  • Fixed a potential deadlock in the gossip subsystem and SQL leases. #8011, #8019

Performance Improvements

  • Snapshots are now sent prior to the Raft configuration change, minimizing the window of reduced availability. #7833

Doc Updates

Contributors

This release includes 63 merged PRs by 17 authors. We would like to thank first-time contributor Rushi Agrawal from the CockroachDB community.

beta-20160721

Release Date:

New Features

  • Metrics are now exported on /_status/vars in a format suitable for aggregation by Prometheus. #7895

Build Changes

  • Go 1.6.3 and 1.7rc2 are now supported. #7811
  • The versions of Docker built for Mac and Windows are now supported. Users of a docker-machine VM may need to set environment variables by hand as this case is no longer detected automatically. #7820

UI Changes

  • The Admin UI now displays a warning when there are fewer than three nodes. #7783

Performance Improvements

  • Writes to different ranges are now performed in parallel. #7860
  • The first range descriptor is kept more up-to-date. #7766
  • Ranges are now considered for splits after any replication or rebalancing change. #7800
  • An existing table lease can now be reused without writing to the lease table as long as it has enough time left before expiration. #7781
  • The rebalancing system now avoids moving the current leader of a range. #7918
  • Transaction records related to splits are now garbage-collected promptly. #7903

Bug Fixes

Doc Updates

Contributors

This release includes 76 merged PRs by 21 authors. We would especially like to thank first-time contributors Christian Meunier and Dharmesh Kakadia from the CockroachDB community.

beta-20160714

Release Date:

Upgrade Notes

  • This release cannot be run concurrently with older beta releases. Please stop all nodes running older releases before restarting any node with this version.
  • After running this release, it is impossible to downgrade to any release older than beta-20160629.
  • This release uses more open file descriptors than older releases. It is recommended to set the process's file descriptor limit to at least 10000. See Recommended Production Settings for more details.

New Features

  • The cockroach dump command can now be used to back up the contents of a table. The output of dump is a series of SQL statements that can be used to recreate the table. #7511
  • The ILIKE operator for case-insensitive matching is now supported. #7635
  • Four new operators for regular expression matches are now supported: ~ (regex match), !~ (negated regex match), ~* (case-insensitive regex match), !~* (negated case-insensitive regex matcH). #7686
  • The new SHOW CONSTRAINTS statement can be used to show the constraints on a table. #7584
  • FOREIGN KEY constraints can now have names. #7627
  • The --http-addr flag can be used to control the network interface used for the web UI. #7475
  • ALTER TABLE ADD COLUMN can now be used to create column families. #7711
  • CockroachDB can now be built on FreeBSD. See this blog post for details. #7545
  • The uidebug Makefile target, used for development of the web UI, has been replaced with the environment variable COCKROACH_DEBUG_UI=1. #7601

Performance Improvements

  • Column families are now used by default, improving performance of all tables created in this release and beyond. #7623
  • Removed replicas are now garbage collected more quickly. #7533
  • RocksDB is now configured to use more, smaller files. This improves performance by reducing the amount of data rewritten during compactions, but increases the number of open file descriptors used by the process. #7532
  • The server now increases its soft file descriptor limit if it is too low and this is allowed by the hard limit. #7747
  • The raft log can now be truncated even if a replica is behind, reducing the size of snapshots that must be transmitted over the network (but somewhat increasing the likelihood that a snapshot will be needed instead of replaying the log). #7438
  • Raft-related messages are now sent in separate streams for each range. #7534
  • Raft commands for queries that have been abandoned by the client are no longer retried internally. #7605
  • Table leases are now released when connections are closed, allowing schema changes to proceed without waiting for leases to expire. #7661

Bug Fixes

  • The command-line SQL client is now smarter about semicolons and `` commands inside string literals. #7510
  • LIMIT is now applied correctly on queries that use JOIN. #7546
  • The "CGo Calls" graph in the web UI is now displayed as a rate instead of a cumulative total. #7597
  • The cockroach quit command now waits for the server to stop before returning. #7603
  • Building CockroachDB in a Docker container on Linux with build/builder.sh no longer requires the container and host toolchains to be the same. #7626
  • Fixed a deadlock in table lease acquisition. #7504
  • The TIMESTAMP WITH TIME ZONE type is now reported correctly in the network protocol. #7642
  • Constraint names are now required to be unique. #7629
  • The "Events" tab in the web UI now includes events for schema changes. #7571
  • Fixed several server panics in expression normalization. #7512
  • Fixed a data race when a transaction is abandoned by the client. #7738
  • Fixed a scenario in which intents could not be resolved. #7744
  • RocksDB is no longer allowed to use all available file descriptors. #7747
  • Using * as an argument to functions other than COUNT(*) no longer causes the server to panic. #7751
  • Fixed a deadlock during shutdown. #7770

Doc Updates

  • Docs on installing CockroachDB in Docker now recommend using the new Docker applications for Mac and Windows.
  • The new Start a Cluster in Docker page demonstrates how to run a multi-node cluster across multiple Docker containers on a single host, using Docker volumes to persist node data.
  • Docs on the DELETE statement are now available.

Contributors

This release includes 131 merged PRs by 25 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor songhao:

  • Jason E. Aten
  • Jingguo Yao
  • Kenji Kaneda
  • Sean Loiselle
  • songhao

beta-20160629

Release Date:

New Features

  • A prototype implementation of JOIN (non-optimized) is now available. #7202
  • Column Families are a new, more efficient representation of SQL tables. Each column family is a group of columns in a table that are stored as a single underlying key-value pair. New tables created with multi-column families will not be compatible with versions of CockroachDB earlier than beta-20160629. However, no migration of existing tables is necessary; the previous format corresponds to a separate column family for each column in the table. #7466, #7408, RFC
  • EXPLAIN can now be used with CREATE, DROP, and ALTER statements. #7269
  • The built-in SQL client now prints tab-separated values instead of ASCII-art tables when stdout is not a TTY (unless --pretty is used). #7268
  • In interactive mode, the built-in SQL client now prints the number of rows at the end of a result set. #7266
  • Prepared statements can now be deallocated with the DEALLOCATE command. #7367
  • Added support for interval types in placeholders. #7382
  • Added support for hexadecimal-encoded STRING literals. #7138

Performance Improvements

  • The load balancing system now operates at a steadier pace, reducing spikes in memory usage and reaching equilibrium more quickly. #7147
  • The block cache is now shared across stores on the same node. #7496
  • Initial replication in a new cluster is now significantly faster. #7355
  • The Raft log is now more aggressively truncated. #7125
  • The RocksDB block-size is now set to a more reasonable value. #7276
  • A new reservation system now ensures that there is enough free space and not too many existing reservations before trying to replicate a range to a new store. This stops the thundering herd that can occur when adding a new node to a cluster. #7147
  • Miscellaneous performance improvements in the underlying data distribution and replication protocol.

Bug Fixes

  • Fixed a bug that could cause a server crash on startup. #7447
  • Improved the handling of NULL values in arithmetic and comparison operations. #7341
  • Fixed a crash when session arguments could not be parsed. #7231
  • Improved error messages for parts of the PostgreSQL protocol we do not support. #7233
  • AS OF SYSTEM TIME can now be used in prepared statements. #7251
  • Raft messages are no longer canceled due to unrelated errors. #7252
  • Constraint names that are specified at the column level are now preserved. #7271
  • When COMMIT returns an error, the transaction is considered closed and a separate ROLLBACK is no longer necessary. #7282
  • The built-in SQL client now escapes strings in a format that the SQL parser will accept. #7294
  • Fixed issues when two snapshots were being sent simultaneously. #7299
  • When a column is renamed, any CHECK constraints referring to that column are now updated. #7311
  • When piping commands into the built-in SQL client, the last line was previously ignored. Now it will be executed if it ends with a semicolon, or report an error if it is non-empty but not a complete statement. #7328
  • When cockroach quit fails to drain a node, it is now forced to quit. #7483
  • Fixed a case in which a removed replica could prevent the rebalance queue from making progress. #7507
  • Fixed a bug that slowed down population of new replicas. #7252

Internal Changes

  • The Admin UI has been rewritten in a new framework. #7242
  • The Admin UI now uses serialized protocol buffers when communicating with CockroachDB servers. #7178, #7242

Contributors

This release includes 160 merged PRs by 22 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor phynalle:

  • Jingguo Yao
  • Kenji Kaneda
  • phynalle

beta-20160616

Release Date:

Deprecation Notice

  • Integers with a leading zero (e.g., 0755) are currently treated as octal. In a future release, leading zeros will be ignored and the numbers will be treated as decimal. #7205

New Features

  • SELECT statements now accept an AS OF SYSTEM TIME clause to read values from the recent past (up to the GC policy set in the zone configuration). #7139
  • Hexadecimal byte string literals of the form x'f00d' can now be used to create byte strings containing arbitrary characters. #7138
  • BIGSERIAL and SMALLSERIAL are now supported as aliases for SERIAL. All three types use the same 64-bit value size. #7187

Bug Fixes

  • Fixed a panic in some uses of subqueries. #6994, #7146
  • ALTER TABLE ADD COLUMN now allows the addition of columns with a uniqueness constraint only when the table is empty. #7094
  • Improved availability when --raft-tick-interval is increased from its default value. #7086
  • Improved reporting of errors from single statements run outside transactions. #7080
  • Invalid octal literals (e.g., 09) no longer crash the server. #7134
  • When ALTER TABLE fails, it now rolls back dependent items in the correct order. #6789
  • Aggregate functions like SUM() are no longer allowed in CHECK or DEFAULT expressions. #7221

Performance Improvements

  • Improved rate limiting of snapshots during rebalancing, reducing memory usage and improving availability. #6878
  • Splitting a range that has grown beyond the target size is now faster. #7118
  • Raft elections are now initiated lazily instead of shortly after server startup. #7085
  • The raft log is now garbage-collected more eagerly. #7125
  • Increased RocksDB block size, which reduces memory usage. #7219

Doc Updates

  • Docs on the Built-in SQL client now cover pretty-printing to the standard output when executing SQL from the command line. The examples have been improved as well. #373
  • Docs on the STRING and INT data types now cover hexadecimal-encoded literal format. Also, the STRING docs now cover escape string format. #392
  • On Functions and Operators, functions are now identified as "built-in" or "aggregate". Also, function categorization has been improved. #379, #387
  • On CREATE INDEX, the syntax diagram has been clarified and expanded. #382

Contributors

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

  • Kenji Kaneda
  • Paul Steffensen

beta-20160609

Release Date:

New Features

  • The SERIAL column type is now supported as an alias for INT DEFAULT unique_rowid(). In CockroachDB, this type defaults to a unique 64-bit signed integer that is the combination of the insert timestamp and the ID of the node executing the insert. It therefore differs from similar types in PostgreSQL and MySQL, which auto-increment integers in an approximate sequence. #7032
  • For client-side transaction retries, reissuing the original SAVEPOINT cockroach_restart now has the same effect as ROLLBACK TO SAVEPOINT cockroach_restart. This improves compatibility with some client drivers. #6955
  • FAMILY is now a reserved word in the SQL dialect in preparation for a future feature. #7069

Bug Fixes

  • The command-line SQL shell is now able to print non-ASCII characters. #7045, #7048
  • Commands issued with a timestamp outside the garbage collection window will now always fail. #6992
  • All aggregate functions now return NULL when run on a table with no rows. #7043

Performance Improvements

  • jemalloc is now used as the memory allocator for the C++ portions of the server. The build tag stdmalloc can be used to switch back to the standard malloc. #7006
  • Raft logs are now garbage collected more aggressively. This should generally make snapshots smaller, reducing memory pressure, but sometimes it may cause more snapshots to be sent. #7040
  • Reduced allocations in INSERT and UPDATE statements involving secondary indexes. #7011
  • Improved performance of conditional puts with no existing value. #7016
  • Improved performance of small transactions. #7015

Doc Updates

Contributors

This release includes 56 merged PRs by 17 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Alex Robinson:

  • Alex Robinson
  • Kenji Kaneda
  • Paul Steffensen

beta-20160602

Release Date:

New Features

Bug Fixes

  • Fixed a missing error check that could result in inconsistencies when transactions conflict. #6899

Performance Improvements

  • Improved performance of one-phase transactions. #6857, #6861
  • Improved the ability of MIN() and MAX() functions to detect the ordering of the data and read only a single row. #6891

Doc Updates

Contributors

This release includes 55 merged PRs by 18 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributors, Sean Loiselle and Thonakom Sangnetra:

  • Sean Loiselle
  • Thanakom Sangnetra
  • Paul Steffensen

beta-20160526

Release Date:

Backwards-Incompatible Changes

  • Numeric literals containing a decimal point are now treated as type DECIMAL instead of type FLOAT, unless type inference determines that FLOAT should be used. In some cases, an explicit CAST(x AS FLOAT) may be needed. #6752
  • The custom error codes CR000 (indicating a transaction needs to be retried) and CR001 (indicating a transaction is in an invalid state) have been replaced with the PostgreSQL standard error codes 40001 (serialization failure) and 25000 (invalid transaction state), respectively. #6797

Bug Fixes

  • Fixed problems when tables are renamed or dropped and recreated in rapid succession. #6595
  • DROP DATABASE now works correctly with quoted names. #6851
  • Gracefully shutting down a node now completes faster. #6777
  • INSERT ... ON CONFLICT DO NOTHING no longer crashes the server when no conflicting index is given. #6795
  • INSERT ... ON CONFLICT DO NOTHING now requires only the INSERT permission instead of both INSERT and UPDATE. #6827
  • Numeric literals in scientific notation are now case-insensitive. #6864
  • TIMESTAMP WITHOUT TIME ZONE is now recognized as a synonym for TIMESTAMP. #6888
  • Attempting to access a database that does not exist now returns PostgreSQL error code 3D000 ("invalid catalog name") instead of a generic error. #6680

Internal Changes

  • Most of the /_status/ HTTP endpoints now use GRPC internally. #6702 #6788
  • The cockroach exterminate command (which did not work) has been removed. #6780
  • Garbage collection now retains the first value outside the configured interval, since it was the current value at the start of the interval. #6778

Doc Updates

  • Docs on the INSERT statement are now available. #308
  • Docs on the UPSERT statement are now available. #308

Contributors

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

  • Kenji Kaneda

beta-20160519

Release Date:

Backwards-Incompatible Changes

  • TIMESTAMP values are now truncated to microsecond resolution when sent over the network for compatibility with the PostgreSQL protocol. The format_timestamp_ns(ts) or extract(nanosecond from ts) functions can be used to access the full nanosecond precision of a timestamp. The now(), current_timestamp(), and statement_timestamp() functions are truncated to microsecond resolution to avoid confusion when timestamp values are used in unique indexes; the new current_timestamp_ns() function can be used to get a non-truncated timestamp. #6604

New Features

  • DO NOTHING is now supported in INSERT ... ON CONFLICT statements. #6633
  • CHECK constraints can now be specified at the table level. #6625
  • Binary encoding is now supported in the network protocol for BOOL, FLOAT, DECIMAL, and STRING types, improving compatiblity with some PostgreSQL drivers. #6661
  • The new cockroach freeze-cluster command has been added to the command-line interface; it will be used in the upgrade process for a future beta release. #6675

Bug Fixes

  • EXPLAIN DELETE no longer executes the DELETE statement. #6622
  • CHECK constraints are now enforced during UPDATE statements. #6753
  • CHECK constraints now work correctly when columns have been dropped. #6730
  • Tuples and the DEFAULT keyword now work in INSERT ... ON CONFLICT DO UPDATE statements. #6636
  • Errors are now reported with standard PostgreSQL error codes in more places. #6652, #6554
  • Fixed a panic while a node is attempting a clean shutdown. #6677
  • Internal retry logic has been improved so requests are no longer stuck retrying endlessly on the wrong replica. #6688

Performance Improvements

  • Snapshot generation is now throttled to reduce peak memory consumption. #6632
  • Improved performance for transactions with low contention. #6413
  • Improved performance for UPSERT statements (and the equivalent INSERT ... ON CONFLICT DO UPDATE statements) when the table has no secondary indexes and values are supplied for all columns in the table. #6673

Doc Updates

Contributors

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

  • Kenji Kaneda
  • Paul Steffensen

beta-20160512

Release Date:

Upgrade Procedure

  • This release cannot be run concurrently with older beta releases. Please stop all nodes running older releases before restarting any node with this version.

New Features

  • The INSERT statement now accepts an ON CONFLICT clause, for a more flexible alternative to UPSERT. #6591
  • The new EXPLAIN (TYPES) subcommand prints information about the types of expressions in a statement. #6482
  • Added the aggregate functions BOOL_AND() and BOOL_OR(). #6535
  • The aggregate functions SUM(INT) and AVG(INT) now return DECIMAL instead of INT and FLOAT respectively. #6532
  • The new command-line flag --raft-tick-interval allows the raft heartbeat frequency to be changed in high-latency deployments. #6615
  • TIMESTAMP values can now be cast to type STRING. #6605
  • The CREATE DATABASE statement now accepts an ENCODING option for compatibility with PostgreSQL, although UTF8 is the only supported encoding. #6614

Bug Fixes

  • Fixed a bug when a single INSERT statement inserts multiple values for the same primary key. #6564
  • Fixed an inconsistency that could occur when a transaction in SNAPSHOT isolation used the internal DeleteRange operation. #6548
  • Fixed an integer underflow that could result in log messages like transport: http2Server received 4294965918-bytes. #6567
  • Long-running transactions are no longer allowed to exceed their table descriptor lease. #6418
  • Subtracting an INTERVAL from a TIMESTAMP WITH TIME ZONE returns a TIMESTAMP WITH TIME ZONE instead of one without a time zone. #6540
  • Improved type checking of comparisons involving tuples. #6517
  • CREATE TABLE, ALTER TABLE, and DROP INDEX now do more validation of their arguments. #6492

Performance improvments

  • Improved tracking of keys modified during a transaction, improving performance of bulk inserts. #6611
  • Schema changes can now continue past transient errors. #6552

Doc Updates

  • The new Tech Talks page links to recordings and slides from talks by CockroachDB founders and engineers.
  • Docs for the built-in SQL client now demonstrate various ways to execute SQL statements from the command line and run external commands from the interactive shell.
  • Data type docs now provide details about storage size.
  • Although it's not possible to access CockroachDB's key-value store directly, the FAQ now suggests a SQL alternative.
  • Replication recommendations now address cross-datacenter scenarios.

Contributors

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

  • Kenji Kaneda

beta-20160505

Release Date:

New Features

  • New SQL command UPSERT is available. This is syntactically similar to INSERT but will update the row with the supplied columns if there is a conflicting row for the primary key. #6456
  • The SQL type system has been overhauled, reducing the number of explicit casts required. RFC
  • Tuples are now considered for index selection, so SELECT * FROM t WHERE (a, b) > ($1, $2) can use an index defined on (a, b). #6332

Performance improvements

  • Bulk inserts to previously-empty table spans are now faster. #6375, #6414
  • Ranges that have grown above the target size are now split before being rebalanced, reducing memory usage. #6447
  • Reduced rapid memory growth during partitions. #6448
  • ALTER TABLE now performs backfill operations in chunks. #6056
  • DROP TABLE now uses the schema change mechanism intead of synchronously deleting all data. #6336
  • Scanning over records that have only one MVCC version is faster. #6351
  • The command queue now uses coarse-grained spans until a conflict has occurred. #6412
  • When a replica is rebalanced from one node to another, the old node no longer triggers unnecessary Raft elections. #6423

Production

  • Servers now attempt to drain more gracefully when restarted. #6313
  • Metrics on lease requests are now available internally. #5596
  • The RocksDB cache will no longer use all available memory if cgroups reports a limit higher than physical memory. #6379

Bug Fixes

  • The range descriptor cache is now invalidated correctly, fixing a bug in which requests could be retried repeatedly on the wrong node. #6425
  • Fixed a bug with some queries using aggregate functions like MIN() and MAX(). #6380
  • Tuple comparisons now work correctly when one tuple contains NULL. #6370

Doc Updates

Contributors

This release includes 66 merged PRs by 18 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Paul Steffensen.

  • Bogdan Batog
  • il9ue
  • Kenji Kaneda
  • Paul Steffensen

beta-20160428

Release Date:

Backwards-Incompatible Changes

  • Time zone offsets are no longer shown when querying columns of type TIMESTAMP; the new type TIMESTAMP WITH TIME ZONE should be used instead. This is more consistent with other databases. #6165

New Features

  • INTERVAL values accept two new formats: ISO8601 (P2H30M) and the PostgreSQL format (2 hours 30 minutes) in addition to the existing Go style (2h30m). #6216
  • Tuples can now be compared in SQL expressions. #6217
  • The server now implements the systemd NOTIFY_SOCKET protocol. #6268
  • The new flag cockroach start --background can be used to start a server in the background. This is better than appending & because the process doesn't return until it is ready to receive traffic. #6268

Bug fixes

  • The SQL shell can once again be suspended with ctrl-z. #6171
  • Fixed an error in the SQL shell when the history file contains empty lines. #6192
  • The --store and --key-size command-line flags are no longer marked as required. #6229
  • The command line interface is better about printing errors to stderr, not just the log file. #6258
  • The INFO log file is now created in the correct default location (cockroach-data/logs) instead of $TMPDIR. #6265
  • Fixed errors that could be introduced by updating tables while a schema change is in progress. #6160
  • Fixed several potential panics. #6187, #6235, #6242

Performance Improvements

  • Raft processing is no longer blocked while generating a snapshot for a new replica. #6253

Contributors

This release includes 89 merged PRs by 19 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Karl Southern.

  • Karl Southern
  • Kenjiro Nakayama

beta-20160421

Release Date:

Upgrade Procedure

  • This release cannot be run concurrently with older beta releases. Please stop all nodes running older releases before restarting any node with this version.

New Features

  • UPDATE statements may now set columns which are part of the primary key. #6043
  • CHECK constraints can now be defined when creating tables and will be enforced for INSERT statements (but not yet for UPDATE statements). #6044
  • The pow() and exp() functions on DECIMAL values no longer lose precision. #6170
  • In the cockroach sql shell, the special command ! can now be used to execute a system command and display its output. | executes a system command and runs its output as a SQL statement. #5961
  • Added SHOW CREATE TABLE. #6158
  • The RETURNING clause of INSERT statements can now refer to tables by aliases defined with AS. #5903
  • The SQL parser now accepts the CASCADE and RESTRICT keywords in the DROP INDEX, TRUNCATE TABLE, ALTER TABLE DROP COLUMN, and ALTER TABLE DROP CONSTRAINT statements. These keywords relate to features we have not yet implemented, so they do nothing, but this change improves compatibility with frameworks that like to send these keywords. #5957

Admin UI

  • The time scale used for graphs can now be changed. #6145
  • Some UI elements now include tooltips with additional explanations. #6006
  • A warning is displayed when the cluster is unreachable. #6042
  • There are now fewer unnecessary scrollbars. #6018

Bug fixes

  • The rebalancer is now better at distributing ranges across the nodes in a cluster. #6133
  • Fixed a major cause of "timestamp in future" errors. #5845
  • Fixed several potential panics. #6111 #6143

Performance Improvements

  • Improved the performance of schema changes while data is being modified. #5996
  • The RPC subsystem is now bypassed for requests to the local node. #6021
  • Information about completed transactions is now cleaned up more efficiently. #5882
  • Fixed a leak of goroutines. #6010
  • Reduced memory allocations on the critical path. #6117 #6119 #6140 #6141 #6142

Doc Improvements

Contributors

This release includes 74 merged PRs by 21 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Andrew NS Yeow.

  • Andrew NS Yeow
  • Kenji Kaneda
  • Kenjiro Nakayama
  • Lu Guanqun
  • Seif Lotfy

beta-20160414

Release Date:

Backwards-incompatible Changes

  • Any databases using the DECIMAL type will need to be deleted and created from scratch. Columns of this type were encoded incorrectly in older beta releases. (Again! We apologize for the inconvenience.) #5994
  • The SQL function transaction_timestamp_unique has been removed in favor of the new cluster_logical_timestamp function described below.

New Features

  • ALTER TABLE supports several new operations: ADD COLUMN with a default value (#5759), ALTER COLUMN SET DEFAULT, ALTER COLUMN DROP DEFAULT, and ALTER COLUMN DROP NOT NULL (#5947)
  • The TIMESTAMPTZ type is now accepted as an alias for TIMESTAMP for compatibility with PostgreSQL; our TIMESTAMP type already supports time zones in the same way as PostgreSQL's TIMESTAMPTZ. #5893
  • The STRING type now accepts a length parameter (e.g., STRING(50)), similar to CHAR and VARCHAR. #5918
  • The LIMIT clause now accepts placeholders. #5977
  • The RETURNING clause of INSERT, DELETE, and UPDATE statements now accepts placeholders. #5934
  • When sending queries to the cockroach sql tool via stdin, a terminating semicolon is not required and instructions for interactive mode are no longer printed (similar to the existing behavior of -e). #5988
  • The experimental_uuid_v4() SQL function has been renamed to uuid_v4(). The old name remains as a deprecated alias. #5886

Performance Improvements

  • Reduced the number of files created in the data directory, and fixed issues in which the process could run out of file descriptors. #5888
  • Introduced a special fast path for transactions that are contained entirely within one range. #5966
  • Reduced the number of unnecessary network round trips by ensuring that the range lease holder and the raft leader coincide. #5973

Bug Fixes

  • The gossip system no longer recommends redundant forwarding addresses, which could prevent the cluster from fully connecting. #5901
  • Timestamps are now correctly reported in the network protocol as having time zone offsets. #5909
  • Buffered data is now flushed to the network immediately on error. #5909
  • Timeseries data no longer diverges across replicas. #5905

Internal Changes

  • SQL functions related to the current time (now, current_timestamp, statement_timestamp, statement_timestamp) now use the clock of the node that executed them instead of a timestamp derived from the internal hybrid logical clock. This means that these functions are less likely to produce duplicate values, but it is more likely for one transaction to see a timestamp that is less than a timestamp already seen in another transaction. Applications that require a globally monotonic timestamp-like value can use the new function cluster_logical_timestamp instead. #5805
  • New HTTP endpoint /debug/metrics exposes internal metric data in JSON format. #5894
  • Logs are no longer written to stderr by default, only to the logs subdirectory of the data directory. #5979

Contributors

This release includes 58 merged PRs by 18 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Andrey Shinkevich.

  • Andrey Shinkevich
  • Kenji Kaneda
  • Seif Lotfy
  • es-chow

beta-20160407

Release Date:

Backwards-incompatible Changes

  • Any databases using the DECIMAL type will need to be deleted and created from scratch. Columns of this type were encoded incorrectly by beta-20160330. #5820
  • SELECT statements must now specify one or more columns or expressions. Previously, statements such as SELECT FROM t were allowed but the results would confuse many clients. #5859
  • It is now an error to insert a value that is too large into a column with a type of limited length such as VARCHAR(n). #5750

Compatibility

  • Added support for the "flush" message in the PostgreSQL network protocol, which improves compatibility with the node.js driver. #5740
  • Fixed a panic when handling certain queries sent by the PHP PDO library. #5783
  • Improved parsing of timestamps for compatibility with the Go lib/pq client library. #5877

New Features

  • Index hints: SELECT FROM tbl@idx or SELECT FROM tbl@{FORCE_INDEX=idx} instructs the query planner to use the given index. #5785 and #5806
  • The cockroach command-line client now accepts environment variables as default values for many command-line flags. See --help for details. #5430
  • Added SQL version() function. #5763
  • Added compiler and platform information to cockroach version output. #5766
  • Debugging tools show fractional seconds in timestamps. #5736
  • In secure mode, plain HTTP requests to the http-port used by the admin UI are now redirected to HTTPS. #5746
  • Links to debugging pages are available on the HTTP port at /debug/. #5795
  • The cockroach zone set command now echos the new configuration. #5829

Bug Fixes

  • Improved flow control for raft snapshots, fixing an issue that could lead to nodes running out of memory. #5721
  • Fixed a deadlock scenario in which two conflicting transactions would both be unable to make progress. #5710
  • Fixed a panic while executing certain DELETE statements. #5840

Internal Changes

  • Clock offsets are now measured continuously. #5512
  • Improved caching to avoid redundant range descriptor lookups. #5627
  • Reduced log spam when nodes are down. #5883

Contributors

This release includes 77 merged PRs by 18 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Seif Lotfy.

  • Kenji Kaneda
  • Seif Lotfy

Yes No
On this page

Yes No