June 6, 2019

In addition to various enhancements and bug fixes, with this first alpha release of the v19.2.0 series, we would like to highlight the following changes:

  • Parallel Commit: The parallel commit feature is a major optimization that halves the latency of distributed transactions, including those caused by secondary indexes. Previously, transactions would involve two synchronous rounds of replication consensus - one for write operations performed in parallel via transaction pipelining and then another for the commit. Now, replication for the commit runs in parallel with other write operations, avoiding an extra synchronous round trip and dramatically increasing overall transaction performance. This is achieved via a new "implicit" commit status that is distributed yet atomic and durable and that resolves to an "explicit" centralized status quickly for the efficiency of conflicting transactions. Detailed documentation is coming soon; in the meantime, see the Parallel Commit RFC.

  • Business Source License (BSL): This release uses the Business Source License instead of the Apache 2.0 License. For more information on why we changed our licensing approach and some practical questions and implications, see our blog post and Licensing FAQs. The full details of the license can be found on Github.

Get future release notes emailed to you:

Downloads

Docker image

copy
icon/buttons/copy
$ docker pull cockroachdb/cockroach-unstable:v19.2.0-alpha.20190606

Backward-incompatible changes

  • Removed the deprecated changefeed.min_high_water metric; use changefeed.max_behind_nanos instead. #36915

General changes

  • Added the kv.range_merge.manual_split_ttl cluster setting. #37728
  • CockroachDB now uses the Business Source License instead of the Apache License. See our blog post for details. #38007

Enterprise edition changes

  • You can now alter the zone configuration for a secondary index partition using the syntax ALTER PARTITION OF INDEX <tablename>@<indexname> CONFIGURE ZONE .... #36868

SQL language changes

  • Zigzag joins will now be planned by the optimizer in certain cases. They were previously available via the experimental_enable_zigzag_join session variable and can still be disabled by setting that value to false. #35911
  • The LATERAL keyword in a FROM clause is now supported. #36613
  • The information_schema.columns table now gives more conformant output for varbit, char, timestamp, and time types. #36598
  • Extended the list of advertised OIDs in pg_type to include additional array-related types, such as _int2vector, _regproc, etc. #36598
  • CockroachDB now displays correct array type oids for oidvector and int2vector types in the pg_type table, for better PG compatibility. #36598
  • CockroachDB now uses the Postgres-compatible name when auto-generating a column alias for a CAST expression. #36598
  • Locale names in COLLATE clauses now have dash characters mapped to underscore when printed as part of SQL syntax. #36598
  • Parallel statement execution has been removed because the performance improvement it provided was absorbed by transactional pipelining, which doesn't require client buy in. The RETURNING NOTHING syntax will still be accepted but becomes a no-op. #35959
  • Only SELECT, INSERT, UPDATE, UPSERT, DELETE, SHOW, EXPLAIN are now supported as data sources using the SELECT ... FROM [ ... ] syntax. #36977
  • The atttypmod column of the pg_attribute catalog table is now supported. #37230
  • Dates are now fully Postgres-compatible, including support for sentinel values (+/- infinity) and the Postgres date range (4714-11-24 BC to 5874897-12-31). Existing dates outside of this range will be converted to the +/- infinity dates. #36938
  • Added an overload for now() that returns a date. #37284
  • Added supported for the empty default_tablespace session variable for Postgres compatibility. #37333
  • Permitted casting empty arrays to any array type. #37356
  • Removed the legacy batch-by-batch index backfiller, as well as the schemachanger.bulk_index_backfill.enabled cluster setting that could be disabled to activate it. #37213
  • Removed the transform option from IMPORT. #37338
  • Added a new locality_value built-in function that returns the value of the locality key given as its argument. #37369
  • CockroachDB now returns NaN instead of an error during invalid decimal operations. #36964
  • Foreign keys that are added to an existing table using ALTER TABLE will now be validated for existing rows, with improved performance compared to running ADD CONSTRAINT followed by VALIDATE CONSTRAINT previously. #37433
  • SHOW COLUMNS ... WITH COMMENTS now supports printing out column comments using the optional phrase WITH COMMENT, e.g SHOW COLUMNS FROM mytable WITH COMMENT. #37174
  • SHOW DATABASES WITH COMMENTS now supports printing out database comments using the optional phrase WITH COMMENT, e.g SHOW DATABASES WITH COMMENT. #37175
  • CREATE TABLE statements now always trigger automatic statistics collection on a newly created table. #37611
  • Added the split_time column to crdb_internal.ranges and crdb_internal.ranges_no_leases. #37610
  • Corrected interval math when multiplying or dividing by floats or ints. #37744
  • Added the ALTER TABLE/INDEX ... UNSPLIT AT ... statement. #37603
  • Added support for the time value 24:00 and variants. #37898
  • CockroachDB now reports a dedicated SQL error code in the particular situation where a multi-statement transaction is committed but one of the schema change (DDL) operations failed. As in previous versions, CockroachDB leaves the transaction partly committed and partly aborted in that case; the new error code aims to facilitate the recognition of this case in client code. #37791
  • Added support for a SHOW INDEXES FROM DATABASE command. #37942

Command-line changes

Admin UI changes

  • CockroachDB now includes only successfully executed statements in the statement counters. #37264

Bug fixes

  • Fixed a roundtrip typecasting issue where an INET casted to a STRING and back to an INET would fail. #37938
  • Fixed a panic when json_build_object is called with BIT/VARBIT values. #37057
  • Fixed a panic when planning zigzag joins against unique indexes. #36139
  • RESTORE now balances the work of ingesting data more evenly between nodes. #36665
  • IMPORT now balances the work of ingesting data more evenly between nodes. #36665
  • CockroachDB now computes the result of shifting bit arrays to the right properly and avoids generating invalid bit arrays. #36715
  • SHOW ZONE CONFIGURATION no longer emits invalid ALTER syntax in its output when displaying the zone configuration for a table or index partition that is inheriting from the database or the default configuration. #36868
  • SHOW ZONE CONFIGURATION FOR TABLE t PARTITION p no longer ignores the clause PARTITION p and now properly displays the zone configuration for that partition instead. #36868
  • When a node is restarted with another node's address, CockroachDB now performs fewer attempts to communicate with the wrong node. #34197
  • It is now possible to write to columns of type name[]. #37170
  • Permitted planning of window functions within mutation statements (and others that can't be distributed). #37171
  • Avoided a source of internal connectivity problems that would resolve after restarting the affected node. #37204
  • Permitted arrays and other sequences to be type-checkable in certain contexts when all of their elements are null. #36673
  • CockroachDB now correctly escapes non-finite JSON number values when marshaling to text. #37331
  • The cockroach init command will now always properly report when a cluster is already initialized, even after the node that it's connecting to is restarted. #37399
  • Automated table statistics no longer encounter "batch timestamp must be after replica GC threshold" errors on configurations with low TTL. #36500
  • Fixed type inference of columns in subqueries for some expressions of the form scalar IN (subquery). #37578
  • Fixed a crash in apply join. #37597
  • The age() function is now correctly marked as impure, causing it to be unavailable in certain contexts. #37609
  • Fixed a panic when constructing the error message for an invalid partitioning. #37689
  • Fixed incorrect multiplication of float and interval types. #37582
  • Fixed a case in which cockroach quit would return success even though the server process was still running in a severely degraded state. #37668
  • Fixed a potential source of (faux) replica inconsistencies that can be reported while running a mixed v19.1 / v2.1 cluster. This error (in that situation only) is benign and can be resolved by upgrading to the latest v19.1 patch release. Every time this error occurs a "checkpoint" is created which will occupy a large amount of disk space and which needs to be removed manually (see <store directory>/auxiliary/checkpoints). #37668
  • Prevented unlimited memory usage during SQL range deletions #36728
  • Dividing floats by zero now returns an error instead of -Inf. #37774
  • Fixed incorrect results or "incorrectly ordered stream" error in some cases of queries with aggregations. #37713
  • A null right operand now causes the sub-operator expression to return null. #37775
  • Certain binary encodings of numeric/decimal values no longer result in values that are an order of magnitude off. #35115
  • Fixed GROUP BY for empty arrays. #37901
  • Fixed a race condition that could cause a panic during query planning. #37972
  • The cockroach command line utilities that internally use a RPC connection (e.g. cockroach quit, cockroach init, etc.) once again properly support passing an IPv6 address literal via the --host argument. #37977

Performance improvements

  • Improved memory efficiency of bulk ingestion and index backfills buffering. #36743
  • Fixed a significant performance regression when building CockroachDB with go1.12. #37967

Security improvement

  • Stack memory used by CockroachDB is now marked as non-executable, improving security and compatibility with SELinux. #37939

Contributors

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

  • George Papadrosou
  • Jaewan Park
  • Simo Kinnunen (first-time contributor)
  • Txiaozhe
  • Vijay Karthik
  • joowon (first-time contributor)
  • lanzao


Yes No