Happy Monday!
Highlights
This feature 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 syntax, EXPORT uses all nodes in the cluster to parallelize the 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.
The Cockroach Labs Team
------------General Changes
- Added a debug endpoint that returns an anonymized diagnostics report. #24813
- 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 also 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
- Prototype support for EXPORT CSV. #25075
SQL Language Changes
- The word "ROLE" is not a reserved keyword any more, which (re-)enables database and apps using that name for databases, tables and columns. #24629
- The experimental SQL features to access KV
range locations and move leaseholders now use the syntax
SHOW EXPERIMENTAL_RANGES
andALTER ... EXPERIMENTAL_RELOCATE
. #24696 - The built-in functions
current_schema
andcurrent_schemas
now only consider valid schemas, like PostgreSQL does. #24718 - The error message produced upon accessing a
virtual schema with no database prefix (e.g. when
database
is not set) is now clarified. #24772 - The error message produced upon object
creation when there is no current database selected or only invalid
schemas in
search_path
is now improved. #24770 - CockroachDB now supports more ways to
specify an index name for statements that require one (e.g.,
DROP INDEX
,ALTER INDEX ... RENAME
, etc.), in a way more compatible with PostgreSQL. #24778 - The word
stored
can again be used to name databases, tables or columns without requiring clients to quote the identifier. #24554 - Errors detected by
SHOW SYNTAX
are now tracked internally like other SQL errors. #24819 - Added support for lpad and rpad string functions. #24891
- Allow computed columns to be added with ALTER TABLE ... ADD COLUMN. #24464
- Added TIMETZ column type and datum. #24343
- The EXPLAIN output for UPDATE statements now also report the check expressions, for consistency with INSERT. #23373
- A minor optimization is introduced that reduces the amount of RAM used when a query performs further computations on the result of a mutation statement (INSERT/DELETE/UPSERT/UPSERT) combined with RETURNING. #23373
- Add 'base64' option to the encode/decode builtins. #25002
- IMPORT now supports hex-encoded byte literals for BYTES columns. #24859
- Set Returning Functions (SRF) can now be accessed
using
(SRF).x
wherex
is the name of a column returned form 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 both now valid syntax. Also, the naming of the resulting columns from SRFs has been updated to provide more information about the resulting tuple. #24832 - Removed the METADATA, QUALIFY and EXPRS flags for EXPLAIN. #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's statement_timestamp() time. #24768
Command-Line Changes
- Show admin UI URL in demo message. #24738
- Fully support self and cyclic foreign key references in dump. #24716
Admin UI Changes
- Update the window title for each page to make browser history more useful. #24634
- Change label "bytes" to "used capacity" in nodes table #24843
- Display the names of dropped schema
objects on
DROP DATABASE ... CASCADE
#24852 - The cluster overview now adjusts to take the advantage of the size of the screen. #24849
- Fixes a bug where the node list could get cut off. #24849
- The endpoint for diagnostic reports has been
moved from
/_admin/v1/diagnostics
to/_status/diagnostics/{node_id}
and you can now request the report from any node. #24997 - Require web login if the environment variable COCKROACH_REQUIRE_WEB_LOGIN is set to true. #25057
- Improve responsiveness of 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
- CockroachDB now again allows 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. #23373 - Removed a limitation where
UPDATE
would fail if the number of modified rows was too large. #23373 - Fixed a bug where
SELECT * FROM [UPDATE ... RETURNING ...] LIMIT 1
orWITH d AS (UPDATE ... RETURNING ...) SELECT * FROM d LIMIT 1
would fail to properly update some rows. #23373 - Removed a limitation where
INSERT
would fail if the number of inserted rows was too large. #23373 - Fixed a bug where
SELECT * FROM [INSERT ... RETURNING ...] LIMIT 1
orWITH d AS (INSERT ... RETURNING ...) SELECT * FROM d LIMIT 1
would fail to properly update some rows. #23373 - Removed a limitation where
UPSERT
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 - Correctly verify columns can only by referencing by a single 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
- The function documentation for the age() builtin was incorrect. This is now fixed. #25132
- Fix PREPARE hanging when run in the same transaction as a CREATE TABLE. #23816
Performance Improvements
- Improve performance of hash join #24577
- Stream aggregations 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 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