Warning:
This version of CockroachDB is no longer supported. For more details, see the Release Support Policy.
May 7, 2018
This release includes usability enhancements, PostgreSQL compatibility improvements, and general bug fixes.
Tip:
The EXPORT CSV
feature in this release allows you to quickly get data out of CockroachDB and into a format that can be ingested by downstream systems. Unlike the existing ability to export data via a SELECT
that outputs to a CSV file, EXPORT
uses all nodes in the cluster to parallelize CSV creation for significantly faster processing. Note that this is a prototype feature, so we’d love for you to try it out and create issues if you’d like any enhancements or find any bugs.Get future release notes emailed to you:
Downloads
General Changes
- Added a
/_status/diagnostics/{node_id}
debug endpoint, which returns an anonymized diagnostics report. #24813 #24997 - The header of new log files generated by
cockroach start
now includes the cluster ID once it has been determined. #24926 - The cluster ID is now reported with tag
[config]
in the first log file, not only when log files are rotated. #24993 - Stopped spamming the server logs with "error closing gzip response writer" messages. #25106
- Enforced stricter validation of security certificates. #24687
Enterprise Edition Changes
- Added alpha support for
EXPORT CSV
. #25075
SQL Language Changes
ROLE
andSTORED
are no longer reserved keywords and can again be used as unrestricted names for databases, tables and columns. #24629 #24554- The experimental SQL features
SHOW TESTING_RANGES
andALTER ... TESTING_RELOCATE
have been renamedSHOW EXPERIMENTAL_RANGES
andALTER ... EXPERIMENTAL_RELOCATE
. #24696 - The
current_schema()
andcurrent_schemas()
built-in functions now only consider valid schemas, like PostgreSQL does. #24718 - Clarified the error message produced upon accessing a virtual schema with no database prefix (e.g., when
database
is not set). #24772 - Improved the error message returned on object creation when no current database is set or only invalid schemas are in the
search_path
. #24770 - Added more ways to specify an index name for statements that require one (e.g.,
DROP INDEX
,ALTER INDEX ... RENAME
, etc.), improving PostgreSQL compatibility. #24778 - Errors detected by
SHOW SYNTAX
are now tracked internally like other SQL errors. #24819 - Added support for
lpad()
andrpad()
string functions. #24891 - Computed columns can now be added with
ALTER TABLE ... ADD COLUMN
. #24464 - Added the
TIMETZ
column type and datum. #24343 - The
EXPLAIN
output forUPDATE
statements now also reportCHECK
expressions, for consistency withINSERT
. #23373 - Reduced the amount of RAM used when a query performs further computations on the result of a mutation statement (
INSERT
/DELETE
/UPSERT
/UPSERT
) combined withRETURNING
. #23373 - Added the 'base64' option to the
encode()
anddecode()
built-in functions. #25002 IMPORT
now supports hex-encoded byte literals forBYTES
columns. #24859- Set Returning Functions (SRF) can now be accessed using
(SRF).x
, wherex
is the name of a column returned from the SRF or a*
. For example,SELECT (information_schema._pg_expandarray(ARRAY['c', 'b', 'a'])).x
andSELECT (information_schema._pg_expandarray(ARRAY['c', 'b', 'a'])).*
are now both valid. Also, the naming of the resulting columns from SRFs now provide more information about the resulting tuple. #24832 - Removed the
METADATA
,QUALIFY
, andEXPRS
options forEXPLAIN
. #25101 - CockroachDB now properly reports an error when a query attempts to use
ORDER BY
within a function argument list, which is an unsupported feature. #25146 AS OF SYSTEM TIME
queries now accept a negative interval to produce a relative time from the statement'sstatement_timestamp()
time. #24768
Command-Line Changes
- The
cockroach demo
command now shows the Admin UI URL on startup. #24738 cockroach dump
now supports self and cyclic foreign key references. #24716
Admin UI Changes
- Updated the window title for each page to make browser history more useful. #24634
- Changed the label "bytes" to "used capacity" in the Nodes table. #24843
- The names of dropped schema objects on
DROP DATABASE ... CASCADE
are now displayed. #24852 - The Cluster Overview now adjusts to take the advantage of the size of the screen. #24849
- Fixed a bug where the Node List could get cut off. #24849
- Improve responsiveness of the Prometheus metrics endpoint on very overloaded nodes. #25083
- Time series charts now display data points at more consistent timestamps. #24856
Bug Fixes
- Converted a panic related to an unsupported type to an error. #24688
ALTER INDEX ... RENAME
can now be used on the primary index. #24776- Fixed a scenario in which a node could deadlock while starting up. #24808
- It is once again possible to use a simply qualified table name in qualified stars (e.g.,
SELECT mydb.kv.* FROM kv
) for compatibility with CockroachDB v1.x. #24811 - Ranges in partitioned tables now properly split to respect their configured maximum size. #24896
- Fixed a bug where
SELECT * FROM [DELETE FROM ... RETURNING ...] LIMIT 1
orWITH d AS (DELETE FROM ... RETURNING ...) SELECT * FROM d LIMIT 1
would fail to properly delete some rows. The is fixed forSELECT * FROM [INSERT ... RETURNING ...] LIMIT 1
orWITH d AS (INSERT ... RETURNING ...) SELECT * FROM d LIMIT 1
as well. #23373 - Removed a limitation where
UPDATE
,INSERT
, orUPSERT
would fail if the number of modified rows was too large. #23373 UPSERT
now properly reports the count of modified rows whenRETURNING
is not specified. #23373- When adding a column, CockroachDB now verifies that the column is reference by no more than one foreign key. Existing tables with a column that is used by multiple foreign key constraints should be manually changed to have at most one foreign key per column. #25060
- Corrected the documentation for the
age()
built-in function. #25132 - Fixed a bug cuasing
PREPARE
to hang when run in the same transaction as aCREATE TABLE
statement. #23816
Performance Improvements
- Improved the performance of hash joins. #24577
- Aggregations are now streamed based on the ordering on the
GROUP BY
columns. #24113 - Some
SELECT
s with limits no longer require a second low-level scan, resulting in much faster execution. #24790
Build Changes
- Build metadata, like the commit SHA and build time, is now properly injected into the binary when using Go 1.10 and building from a symlink. #25008
Doc Updates
- Added a performance tuning guide for running CockroachDB in Kubernetes. #2896
- Clarified replication zone levels and added a warning about increasing the default replication factor without increasing the replication factor of system ranges. #2901
- Updated the
cockroach start
documentation to recommend decimal notation for flags that accept percentages. #3056 - Documented how to use the
server.shutdown.drain_wait
cluster setting to prevent a load balancer from sending client traffic to a node about to be shut down. #2903 - Documented the
intervalstyle
session variable. #2904 - Added documentation on the
SHOW EXPERIMENTAL_RANGES
statement. #2930 - Update the Node Map documentation to provide location coordinates for AWS, Azure, and Google Cloud. #2942
- Updated the
SPLIT AT
documentation to show how to split a table with a composite primary key. #2950 - Documented the
--temp-dir
flag forcockroach start
. #2955 - Expanded the Production Checklist to recommend a higher replication factor when using local disks rather than a cloud providers' network-attached disks that are often replicated underneath the covers. #3001
Contributors
This release includes 224 merged PRs by 37 authors. We would like to thank the following contributors from the CockroachDB community, with special thanks to first-time contributors Bob Potter, Karan Vaidya, dchenk, and phelanm.
- Bob Potter
- Brett Snyder
- Jingguo Yao
- Karan Vaidya
- Vijay Karthik
- dchenk
- phelanm