title | toc | summary |
---|---|---|
What's New in v2.0-alpha.20180122 |
false |
Additions and changes in CockroachDB version v2.0-alpha.20180122 |
Get future release notes emailed to you:
<script>
hbspt.forms.create({
css: '',
cssClass: 'install-form',
portalId: '1753393',
formId: '39686297-81d2-45e7-a73f-55a596a8d5ff',
formInstanceId: 1,
target: '.install-form-1'
});
</script>
{{site.data.alerts.callout_danger}}A bug that could trigger range splits in a tight loop was discovered in this release, so this release has been withdrawn.{{site.data.alerts.end}}
- Removed the obsolete
kv.gc.batch_size
cluster setting. #21070 - Removed the
COCKROACH_METRICS_SAMPLE_INTERVAL
environment variable. Users that relied on it should reduce the value for thetimeseries.resolution_10s.storage_duration
cluster setting instead. #20810
- CockroachDB now proactively rebalances data when the diversity of the localities that a given range is located on can be improved. #19489
- Clusters are now initialized with default
.meta
and.liveness
replication zones with lower GC TTL configurations. #17628 - CockroachDB now uses gRPC version 1.9.1 #21398
- The build system now enforces a minimum version of Go, rather than enforcing a specific version of Go. Since the Go 1.x series has strict backward-compatibility guarantees, the old rule was unnecessarily restrictive. #21426
- The new
SHOW CREATE SEQUENCE
statement shows theCREATE SEQUENCE
statement that would create a carbon copy of the specified sequence. #21208 - The
DROP COLUMN
statement now dropsCHECK
constraints. #21203 - The
pg_sequence_parameters()
built-in function is now supported. #21069 ON DELETE CASCADE
foreign key constraints are now fully supported and memory bounded. #20064 #20706ON UPDATE CASCADE
foreign key constraints are now fully supported #21329- For improved troubleshooting, more complete and useful details are now reported to clients when SQL errors are encountered. #19793
- The new
SHOW SYNTAX
statement allows clients to analyze arbitrary SQL syntax server-side and retrieve either the (pretty-printed) syntax decomposition of the string or the details of the syntax error, if any. This statement is intended for use in the CockroachDB interactive SQL shell. #19793 - Enhanced type checking of subqueries in order to generalize subquery support. As a side-effect, fixed a crash with subquery edge cases such as
SELECT (SELECT (1, 2)) IN (SELECT (1, 2))
. #21076 - Single-use common table expressions are now supported. #20359
- Statement sources with no output columns are now disallowed. #20998
WHERE
predicates that simplify toNULL
no longer performs table scans. #21067- The experimental
CREATE ROLE
,DROP ROLE
,SHOW ROLES
,GRANT <role>
, andREVOKE <role>
statements are now supported as part of role-based access control. #21020 #20980 #21341 - Improved the output of
EXPLAIN
to show the plan tree structure. #20697 OUTER
interleaved joins are now supported. #20963- Added the
rolreplication
androlbypassrls
columns to thepg_catalog.pg_roles
table. #20397 ARRAY
values can now be cast to their own type. #19816- The
||
operator is now supported forJSONB
. #20689 - The
CASCADE
option is now required to drop an index that is used by Unique constraint. #20837 - The
BOOL
type now matches PostgreSQL's list of accepted formats. #20833 - The
sql_safe_updates
session variable now defaults tofalse
unless the shell is truly interactive (usingcockroach sql
,-e
not specified, standard input not redirected) and--unsafe-updates
is not specified. Previously,sql_safe_updates
would always default totrue
unless--unsafe-updates
was specified. #20805 - The
errexit
client-side option now defaults tofalse
only if the shell is truly interactive, not only when the input is not redirected as previously. #20805 - The
display_format
client-side option now defaults topretty
in every case where the output goes to a terminal, not only when the input is not redirected as previously. #20805 - The
check_syntax
andsmart_prompt
client-side options, together with the interactive line editor, are only enabled if the session is interactive and output goes to a terminal. #20805 - Table aliases are now permitted in
RETURNING
clauses. #20808 - Added the
SERIAL2
,SERIAL4
, andSERIAL8
aliases for theSERIAL
type. #20776 NULL
values are now supported inCOLLATE
expressions. #20795- The new
crdb_internal.node_executable_version()
built-in function simplifies rolling upgrades. #20292 - The
json_pretty()
,json_extract_path()
,jsonb_extract_path()
,json_object()
,asJSON()
,jsonb_set()
,json_build_object()
,json_strip_nulls()
, andjson_each{_text}()
built-in functions are now supported. #20702 #20520 #21015 #20234 #21010 #21019 #21335 #21044 - The
DISTINCT ON
clause is now supported forSELECT
statements. #20463 - The output of
EXPLAIN
is now enhanced when applied to statements containing scalar sub-queries. #21305 - The
array_agg()
built-in function is now supported in distributed queries. #21475 - Removed the limit on transaction keys. There was formerly a limit of 100,000 keys. #21078
- Improved the error message when a column reference is ambiguous. #21361
- The new
SHOW EXPERIMENTAL_REPLICA TRACE
statement executes a query and returns which nodes served reads and writes. #21349 - Multiplication between
INTERVAL
andFLOAT
values, and betweenINTERVAL
andDECIMAL
values, is now fully supported. #21292 - Reduced the size of entries stored in the
system.rangelog
table by not storing empty JSON fields. #21318 - The
ALTER TABLE SCATTER
statement now randomizes the locations of the leases for all ranges in the referenced table or index. #21431 - When using HTTPS storage for
IMPORT
, a custom CA for HTTPS storage providers can now be specified via thecloudstorage.http.custom_ca
cluster setting. This is also used when accessing custom s3 export storage endpoints. #21358 #21404 - Storage of timeseries data within the cluster can be disabled by setting the new
timeseries.storage.enabled
cluster setting to false. This is recommended only if you exclusively use a third-party tool such as Prometheus for timeseries monitoring. See this FAQ for more details. #21314 - For compatibility with PostgreSQL and related tools:
- Parsing of the
COMMENT ON
syntax is now allowed. #21063 - The following built-in functions are now supported:
pg_catalog.pg_trigger()
,pg_catalog.pg_rewrite()
,pg_catalog.pg_operator()
,pg_catalog.pg_user_mapping()
,pg_catalog.foreign_data_wrapper()
,pg_get_constraintdef()
,inet_client_addr()
,inet_client_port()
,inet_server_addr()
,inet_server_port()
. #21065 #20788 - Missing columns have been added to
information_schema.columns
, and thepg_catalog.pg_user()
virtual table has been added. #20788 - A string cast to
regclass
is interpreted as a possibly qualified name likedb.name
. #20788 - Rendered columns for built-in functions are now titled by the name of the built-in function. #20820
- Parsing of the
- Client
cockroach
commands that use SQL (cockroach sql
,cockroach node ls
, etc.) now print a warning if the server is running an older version of CockroachDB than the client. Also, this and other warning messages are now clearly indicated with the "warning:" prefix. #20935 - Client-side syntax checking performed by
cockroach sql
when thecheck_syntax
option is enabled has been enhanced for forward-compatibility with later CockroachDB versions. #21119 - The
\?
client-side command ofcockroach sql
now prints out a description of each option. #21119 - The
--unsafe-updates
ofcockroach sql
was renamed to--safe-updates
. The default behavior is unchanged: The previous flag defaulted tofalse
; the new flag defaults totrue
. #20935 - The
cockroach sql
command no longer fails when the server is running a version of CockroachDB that does not support the sql_safe_updates session variable. #20935
- Added graphs of node liveness heartbeat latency, an important internal signal of health, to the Distributed dashboard. #21002
- Capacity Used is now shown as "-" instead of 100% when the UI can't load the real data from the server. #20824
- Removed a redundant rendering of the GC pause time from the CPU Time graph. #20802
- The Databases page now reports table sizes that are better approximations to actual disk space usage. #20627
- Added a system table to allow operators to designate geographic coordinates for any locality. This is for use with upcoming cluster visualization functionality in the Admin UI. #19652
- When a new version of CockroachDB is available, the Admin UI now links you to the documentation explaining how to upgrade your cluster. #19718
- Job descriptions are now expandable. #21333
- Fixed the
debug compact
command to compact all sstables. #21293 - Fixed tuple equality to evaluate correctly in the presence of
NULL
elements. #21230 - Fixed a bug where the temporary directory was being wiped on failed CockroachDB restart, causing importing and DistSQL queries to fail. #20854
- The "JSON" column in the output of
EXPLAIN(DISTSQL)
is now properly hidden by default. It can be shown usingSELECT *, JSON FROM [EXPLAIN(DISTSQL) ...]
. #21154 EXPLAIN
queries with placeholders no longer panic. #21168- The
--safe-updates
flag ofcockroach sql
can now be used effectively in non-interactive sessions. #20935 - Fixed a bug where non-matching interleaved rows were being inner-joined with their parent rows. #20938
- Fixed an issue where seemingly irrelevant error messages were being returned for certain
INSERT
statements. #20841 - Crash details are now properly copied to the log file even when a node was started with
--logtostderr
as well as in other circumstances when crash details could be lost previously. #20839 - It is no longer possible to log in as a non-existent user in insecure mode. #20800
- The
BIGINT
type alias is now correctly shown when usingSHOW CREATE TABLE
. #20798 - Fixed a scenario where a range that is too big to snapshot can lose availability even with a majority of nodes alive. #20589
- Fixed
BETWEEN SYMMETRIC
, which was incorrectly considered an alias forBETWEEN
. Per the SQL99 specification,BETWEEN SYMMETRIC
is likeBETWEEN
, except that its arguments are automatically swapped if they would specify an empty range. #20747 - Fixed a replica corruption that could occur if a process crashed in the middle of a range split. #20704
- Fixed an issue with the formatting of unicode values in string arrays. #20657
- Fixed detection and proper handling of certain variations of network partitions using server-side RPC keepalive in addition to client-side RPC keepalive. #20707
- Prevented RPC connections between nodes with incompatible versions. #20587
- Dangling intents are now eagerly cleaned up when
AmbiguousResultErrors
are seen. #20628 - Fixed the return type signature of the JSON
#>>
operator andarray_positions()
built-in function. #20524 - Fixed an issue where escaped characters like
\A
and\\
inLIKE
/ILIKE
patterns were not handled properly. #20600 - Fixed an issue with
(NOT) (I)LIKE
pattern matching on_...%
and%..._
returning incorrect results. #20600 - Fixed a small spelling bug that made it such that a
DOUBLE PRECISION
specified type would erroneously display as a float. #20727 - Fixed a crash caused by null collated strings. #20637
- Fixed a problem that could cause spurious garbage collection activity, in particular after dropping a table. #21407
- Fixed incorrect logic in lease rebalancing that prevented leases from being transferred #21430
INSERT
/UPDATE
/DELETE ... RETURNING
statements used with the "statement data source" syntax (e.g.,SELECT * FROM [INSERT INTO ... RETURNING ...]
) no longer ever commit the transaction, causing errors for the higher-level query. #20847- Fixed a crash caused by a column being backfilled in an index constraint. #21308
- Fixed a bug in which ranges could get stuck if the uncommitted raft log grew too large #21356
- The
setval()
built-in function no longer lets you set a value outside theMAXVALUE
/MINVALUE
of aSEQUENCE
. #20973
- Improved the efficiency of scans with joins and certain complex
WHERE
clauses containing tuple equality. #21288 - Improved the efficiency scans for certain
WHERE
clauses. #21217 - Reduced per-row overhead in distsql query execution. #21251
- Added support for distributed execution of
UNION
queries. #21175 - Improved performance for aggregation and distinct operations by arena allocating "bucket" storage. #21160
- Distributed execution of
UNION ALL
queries is now supported. #20742 - Reduced the fixed overhead of commands sent through Raft by 40% by only sending lease sequence numbers instead of sending the entire lease structure. #20953
- When tables are dropped, the space is now reclaimed in a more timely fashion. #20607
- Increased speed of except and merge joins by avoiding an unnecessary allocation. #20759
- Improved rebalancing to make thrashing back and forth between nodes much less likely, including when localities have very different numbers of nodes. #20709
- Improved performance of
DISTINCT
queries by avoiding an unnecessary allocation. #20755 #20750 - Significantly improved the efficiency of
DROP TABLE
andTRUNCATE
. #20601 - Improved performance of low-level row manipulation routines. #20688
- Raft followers now write to their disks in parallel with the leader. #19229
- Significantly reduced the overhead of SQL memory accounting. #20590
- Equality joins on the entire interleave prefix between parent and (not necessarily direct) child interleaved tables are now faster. #19853
- Improved the performance of scans that need to look at non-indexed columns. #21459
- Improved the performance of all scans that encounter a large number of versions per key, and the low-level reverse scan throughput by up almost 4x when there are a few versions per key.. #21438
- Queries on tables with many columns are now more efficient. #21450
- Queries that only need to read part of a table with many columns are now more efficient. #21450
- Improved low-level scan performance by 15-20% by disabling redundant checksums. #21395
- Re-implemented low-level scan operations in C++, doubling performance for scans of contiguous keys/rows. #21395
- Reduced the occurrence of ambiguous errors when a node is down. #21376
- Sped up distsql query execution by "fusing" processors executing on the same node together. #21254
- Incremental backups of a database after a table or index was added is now supported.#21170
- When using HTTPS storage for
BACKUP
orRESTORE
, a custom CA for HTTPS storage providers can now be specified via thecloudstorage.http.custom_ca
cluster setting. This is also used when accessing custom s3 export storage endpoints. #21358 #21404 - Bulk writes are now synced to disk periodically to ensure more predictable performance. #20449
- Added best practices for optimizing SQL performance in CockroachDB. #2243
- Added more detailed clock synchronization guidance per cloud provider. #2295
- Added a tutorial on using our Kubernetes-orchestrated AWS CloudFormation template for easy deployment and testing of CockroachDB. #2356
- Added docs on the
TIME
data type. #2336 - Added guidance on reducing or disabling the storage of timeseries data. #2361
- Added docs on the
CREATE SEQUENCE
,ALTER SEQUENCE
, andDROP SEQUENCE
statements. #2292 - Various improvements to the docs on the
IMPORT
,BACKUP
, andRESTORE
statements. #2340 - Improved the styling of code samples and page tocs. #2323 #2371
This release includes 111 merged PRs by 33 authors. We would like to thank the following contributors from the CockroachDB community:
- Yang Yuting
- Dmitry Saveliev
- Jincheng Li
- Mohamed Elqdusy
- 何羿宏
- louishust