November 18, 2019
Warning:
A denial-of-service (DoS) vulnerability is present in CockroachDB v20.1.0 - v20.1.10 due to a bug in protobuf. This is resolved in CockroachDB v20.1.11 and later releases. When upgrading is not an option, users should audit their network configuration to verify that the CockroachDB HTTP port is not available to untrusted clients. We recommend blocking the HTTP port behind a firewall.
For more information, including other affected versions, see Technical Advisory 58932.
Get future release notes emailed to you:
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v20.1.0-alpha.20191118
General changes
- Guidance on how to contribute to CockroachDB has been moved to the public wiki at wiki.crdb.io. #41542
- Removed the
kv.bulk_io_write.addsstable_max_rate
cluster setting. #41745 - Improved the consistency checker's log output. #41893
- When the replicas within a range are found to be corrupted, the outliers will be terminated. Previously, the leaseholder replica would terminate, regardless of which replicas disagreed with each other. This is expected to curb the spread of corrupted data better than the previous approach. #41902
Backward-incompatible changes
- The
extract()
built-in function with sub-second arguments (millisecond, microsecond) is now Postgres-compatible, and will return the total number of seconds in addition to sub-seconds. Anyone who was previously relying onextract()
to return only sub-second data will need to adjust their applications. #41069
Enterprise edition changes
IMPORT
statements now support specifying CSV filenames using wildcard characters. This behavior can be disabled with theWITH disabled_glob_matching
option. #40714- When using a
nodelocal
file URL forIMPORT
/BACKUP
/RESTORE
/EXPORT
, you can now specify which node's local file system to use by including the node's ID in the URL:nodelocal://<nodeID>/path/file.csv
. #41990 - Added the new
WITH experimental_save_rejected
option for skipping faulty rows duringIMPORT
, saving the faulty rows in a file called<original_csv_file>.rejected
. After fixing the problems in this file, you can use it withIMPORT INTO
. #41430
SQL language changes
- The
extract()
built-in function now supports millennium, century, decade, isoyear, isodow, and julian forDATE
,TIMESTAMP
, andTIMESTAMPTZ
. Thedate_trunct()
function now supports millennium, century, and decade forDATE
,TIMESTAMP
, andTIMESTAMPTZ
. #41784 extract()
now supports a string constant as element argument. #41429- Added support for the
JOIN LATERAL
syntax. #40945 - Added support for
WITH RECURSIVE
withUNION ALL
. #41368 - Added support for
bit_and()
andbit_or()
aggregate functions. #41334 NULL
values are now allowed to be among tuples when being compared against a tuple. #40298- Added syntax-only support for
ORDER BY ... NULLS FIRST | LAST
. #41544 - Comments can now be associated to indexes with
COMMENT ON INDEX
and can be checked withSHOW INDEXES FROM ... WITH COMMENT
. #41555 SELECT
andHAVING
can now refer to ungrouped columns when the grouped columns contain the primary key of the table containing the ungrouped columns. #41732- Dropping a unique index that was created via
CREATE UNIQUE INDEX
statement no longer requires theCASCADE
option. #42001 - Added the
pg_prepared_statements
table. #42018
Command-line changes
- The new
--storage-engine
flag forcockroach start
, and equivalentCOCKROACH_STORAGE_ENGINE
environment variable, specify the type of storage engine a node should use. Options arerocksdb
(default) andpebble
. #41453 - Enhanced the error message produced by
cockroach init
when it encounters an already-initialized cluster to recommend adding--join
to thecockroach start
commands. #42318
Bug fixes
- The Admin UI no longer mixes unit sizes in timeseries graph tooltips. #40970
- The
pg_collation_for()
function now correctly quotes its output. #41545 - Fixed an internal error when subqueries are used in arguments to commands like
SET
. #41581 - CockroachDB now properly emits the cluster ID, once known, to all secondary log files (SQL audit logging, statement execution logging, and RocksDB events) and properly removes excess secondary log files. #40993
- Other callers to
acquireNodeLease
will not get erroneously cancelled just because the context of the first caller was cancelled. #41785 - Vectorized execution no longer errors when adding an ordinality column to an expression with a limit. For example,
SELECT * FROM (SELECT * FROM foo LIMIT 1) WITH ORDINALITY
no longer throws an index out of range error. #41782 - Fixed a bug causing rare crashes when using built-in functions. #41970
- The
date_trunc()
function now correctly considers timezones forTIMESTAMPTZ
andDATE
types. #42006 - Fixed a bug causing
CREATE TABLE AS
statements to fail with the message "unexpected concurrency for a flow that was forced to be planned locally". #42013 - Fixed a bug where
SHOW ZONE CONFIGURATION
andcrdb_internal.zones
would show results for resources the user does not have permission to view. #42066, #42080 - Fixed a bug during planning for some queries that could cause an infinite loop and prevent the query from being cancelled. #42082
- Fixed a bug that caused jobs for dropping tables to report an inaccurate status. #42121
- Fixed a bug where rapid network disconnections could lead to cluster unavailability. #41533
- Fixed a stack overflow that could occur with certain patterns of queries. #41984
- Fixed some casts from
OID
toTEXT
. #41928 - Fixed a bug where some cluster setting changes were not reflected during currently running
IMPORT
s. #42268 - Fixed bugs where:
<date>:date
would result in the previous day (<date-1>::date>
) when context local timestamp is set and the timezone is less than UTC+00:00;date_trunc()
forTIMESTAMP
would produce incorrect results if a local timezone was set; anddate_trunc()
forDATE
would produce an incorrect negative timezone offset in a local timezone. #42267 - Casting
TIMESTAMPTZ
data to theTIME
type NOW properly respects time zone information. #42269 - Fixed a crash when using
EXPLAIN (VEC)
on some index joins. #40897
Performance improvements
- Improved performance for some join queries due to improved filter inference during query planning. #41250
- Improved statistics estimation during query planning for columns with many
NULL
values. #41520 - The
cockroach debug check-store
command is now faster. #41805 - Improved the low-level performance of short range reverse scans. #42092
- Individual response messages in a response batch no longer each contain information about transaction state changes. #42139
BACKUP
work is now more evenly spread across clusters that have non-uniform leaseholder distributions. #42274
Contributors
This release includes 376 merged PRs by 48 authors. We would like to thank the following contributors from the CockroachDB community:
- Aayush Shah (first-time contributor)
- Andrea Sosso (first-time contributor)
- Arber Avdullahu (first-time contributor)
- Elliot Courant
- George Papadrosou
- Roga Pria Sembada (first-time contributor)
- Salvatore Tomaselli (first-time contributor)
- lzhfromustc (first-time contributor)
- sumeerbhola (first-time contributor)