On this page, you can read about changes and find downloads for all production and testing releases of CockroachDB v19.1.
- For key feature enhancements in v19.1 and other upgrade considerations, refer to the notes for v19.1.0
- For details about release types, naming, and licensing, refer to the Releases page.
- Be sure to also review the Release Support Policy.
- After downloading a supported CockroachDB binary, learn how to install CockroachDB or upgrade your cluster.
Get future release notes emailed to you:
To upgrade to v19.1, see Upgrade to CockroachDB v19.1.
v19.1.11
Release Date: July 7, 2020
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.11
Bug fixes
Contributors
This release includes 1 merged PR by 1 author.
v19.1.10
Release Date: June 29, 2020
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.10
Security updates
Bug fixes
- Previously, HTTP requests would start to fail with error 503 "
transport: authentication handshake failed: io: read/write on closed pipe
" and never become possible again until restarting the node. This has been fixed. This bug has existed since v2.1 or earlier. #48483 - Previously, when the value passed to
--drain-wait
was very small, but non-zero,cockroach quit
in certain cases would not proceed to perform a hard shutdown. This has been corrected. This bug was present in v19.1.9, v19.2.7, and v20.1.1. #49365 - Fixed a RocksDB bug that could result in inconsistencies in rare circumstances. #50510
Build changes
- Release Docker images are now built on Debian 9.12. #50480
Doc updates
- Updated guidance on node decommissioning. #7304
- Renamed "whitelist/blacklist" terminology to "allowlist/blocklist". #7535
- Updated the Releases navigation in the sidebar to expose the latest Production and Testing releases. #7550
- Fixed scrollbar visibility on Chrome. #7487
Contributors
This release includes 10 merged PRs by 6 authors. We would like to thank the following contributors from the CockroachDB community:
- Drew Kimball (first-time contributor, CockroachDB team member)
- Jackson Owens (first-time contributor, CockroachDB team member)
- James H. Linder (first-time contributor, CockroachDB team member)
v19.1.9
Release Date: May 12, 2020
This page lists additions and changes in v19.1.9 since v19.1.8.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.9
Backward-incompatible changes
- Previously, the phase of server shutdown responsible for range lease transfers to other nodes would give up after 10,000 attempts of transferring replica leases away, regardless of the value of
server.shutdown.lease_transfer_wait
. The limit of 10,000 attempts has been removed, so that now only the maximum durationserver.shutdown.lease_transfer_wait
applies. #47698 - The textual error and warning messages displayed by
cockroach quit
under various circumstances have been updated. Meanwhile, the message "ok
" remains as indicator that the operation has likely succeeded. #47698 cockroach quit
now prints out progress details on its standard error stream, even when--logtostderr
is not specified. Previously, nothing was printed on standard error. Scripts that wish to ignore this output can redirect thestderr
stream. #47698
Security updates
- Non-licensed users are now able to add more principals to the special superuser role/group
admin
. Note: Creation of additional roles is still a licensed feature. #45396
General changes
- Previously, the phase of server shutdown responsible for range lease transfers to other nodes had a hard timeout of 5 seconds. This patch makes this timeout configurable via the new cluster setting
server.shutdown.lease_transfer_wait
. #47698
SQL language changes
- It is now possible to use
GRANT
andREVOKE
to add users to theadmin
role without a valid license. This change aims to enable use of the Admin UI and other privileged features without a license. #45396 - The type checking code now prefers aggregate overloads with string inputs if there are multiple possible candidates due to arguments of unknown type. #46902
- Added a new "unimplemented" error when attempting to
ADD CONSTRAINT
with theEXCLUDE USING
syntax. #46912 - Added support for using
CREATE INDEX ... INCLUDE (col1, col2, ...)
, which is an alias that PostgreSQL uses that is analogous to ourSTORING (col1, col2, ...)
syntax. #46912 - Added support for parsing the
REINDEX
syntax, which results in an "unimplemented" error that explains thatREINDEX
ing is not required in CockroachDB. #46912 - CockroachDB now parses the
CREATE INDEX CONCURRENTLY
andDROP INDEX CONCURRENTLY
syntaxes, which return errors when used. #46808
Command-line changes
cockroach debug zip
now avoids creating invalid zip files if some of its requests encounter an error. #46637- The time that
cockroach quit
waits client-side for the node to drain (remove existing clients and push range leases away) is now configurable via the command-line flag--drain-wait
. Note that separate server-side timeouts also apply separately; check theserver.shutdown.*
cluster settings for details. #47698 - It is now possible to drain a node without shutting down the process, using
cockroach node drain
. This makes it easier to integrate with service managers and orchestration: it now becomes safe to issuecockroach node drain
and then separately stop the service via a process manager or orchestrator. Without this new mode, there is a risk to misconfigure the service manager to auto-restart the node after it shuts down viaquit
, in a way that's surprising or unwanted. The new commandnode drain
also recognizes the new--drain-wait
flag. #47698 - The default value of the parameter
--drain-wait
forcockroach quit
has been increased from 1 minute to 10 minutes, to give more time for nodes with thousands of ranges to migrate their leases away. #47698 - The commands
cockroach quit
andcockroach node drain
now report a "work remaining" metric on their standard error stream. The value reduces until it reaches0
, to indicate that the graceful shutdown has completed server-side. An operator can now rely oncockroach node drain
to obtain confidence of a graceful shutdown prior to terminating the server process. #47698
Admin UI changes
- Metrics relating to SQL transaction restarts and rollbacks are now properly captured and exported. #46273
Bug fixes
- Fixed a "cannot map variable" error in some rare cases involving joins. #44860
- Fixed incorrect de-duplication of impure expressions (like
gen_random_uuid
) in projections and default values. #44916 - Fixed an internal error that could occur when
NULLIF
was called with one null argument. #45391 - It is now possible to create inverted indexes on columns whose names are mixed-case. #45678
- Previously, drivers that did not truncate trailing zeroes for decimals in the binary format ended up having inaccuracies of up to 10^4 during the decode step. Fixed this error by truncating the trailing zeroes as appropriate. This fixes known incorrect decoding cases with Postgrex in Elixir. #45671
- Fixed a name resolution error that could occur when a common table expression (CTE) was referenced in the
SELECT
list of a query using the syntax<cte-name>.<col-name>
. #45782 - Previously, CockroachDB could crash when computing window functions with
RANGE
mode of framing when one of the bounds was either ofoffset PRECEDING
oroffset FOLLOWING
type when there wereNULL
values in the single column fromORDER BY
clause. Additionally, inRANGE
mode bounds0 PRECEDING
and0 FOLLOWING
could be handled incorrectly. Now this has been fixed. #45806 - Fixed an internal error that could occur in the optimizer when a
WHERE
filter contained at least one correlated subquery and one non-correlated subquery. #46168 - CockroachDB now properly supports using
--url
with query options (e.g.,application_name
) without specifyingsslmode
. The default ofsslmode=disable
is assumed in that case. #46480 - Fixed a bug where operations on an index that contained a collated string in descending order would fail. #46579
- Fixed an incorrect query result that could occur when a scalar aggregate was called with a null input. #46902
- Fixed a data race on AST nodes for
SELECT
statements that include aWINDOW
clause. It is unclear whether this could have resulted in incorrect results being returned for these queries. #47177 - Fixed incorrect results that could occur when casting negative intervals or timestamps to type decimal. #47524
- Previously, CockroachDB was incorrectly releasing memory used by hash aggregation. This could lead to a crash (which was more likely when hash aggregation had store on the order of 100k of groups) and is now fixed. #47520
- Fixed a bug that could lead to data corruption or data loss if a replica was both the source of a snapshot and was being concurrently removed from the range. This scenario is rare, but possible. #48317
Contributors
This release includes 27 merged PRs by 10 authors.
v19.1.8
Release Date: February 11, 2020
This page lists additions and changes in v19.1.8 since v19.1.7.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.8
Security updates
- Previous versions of CockroachDB were incorrectly enabling non-admin SQL users to use the statements details in the Admin UI and the HTTP endpoint
/_status/statements
. This information is sensitive because the endpoint does not hide data that the requester does not have privilege over. This has been corrected by requiring a SQLadmin
user to access the statements details page and the HTTP endpoint. #44355
Admin UI changes
- We previously introduced a fix on the admin UI to prevent non-admin SQL users from executing queries - however, this accidentally made certain pages requiring table details not to display. This error has now been fixed. #44193
Bug fixes
- Fixed a bug where repeated use of
COPY FROM PARENT
on an index or partition could cause an unexpected validation error. #44266 - Fixed a planning bug related to
FULL
joins between single-row relations. #44242 - Fixed incorrect plans in very rare cases involving filters that aren't constant folded in the optimizer but that can be evaluated statically when running a given query. #44602
- Fixed "no output column equivalent to.." and "column not in input" errors in some cases involving
DISTINCT ON
andORDER BY
. [#44598][#44598] - Fixed "expected constant FD to be strict" internal error. #44599
- Fixed a bug where running a query with the
LIKE
operator using the customESCAPE
symbol when the pattern contained Unicode characters could result in an internal error in CockroachDB. #44649 - Fixed possibly incorrect query results in various cornercases, especially when
SELECT DISTINCT
is used. #44606 - Fixed an internal error that could happen in the planner when table statistics were collected manually using
CREATE STATISTICS
for different columns at different times. #44443 - CockroachDB no longer repeatedly looks for non-existing jobs, which may cause high memory usage, when cleaning up schema changes. #44824
Contributors
This release includes 12 merged PRs by 9 authors. We would like to thank the following contributors from the CockroachDB community:
- Oliver Tan (first-time contributor, CockroachDB team member)
v19.1.7
Release Date: January 27, 2020
This page lists additions and changes in v19.1.7 since v19.1.6.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.7
Bug fixes
- Some incorrect issue links referenced to by error hints have been corrected. #43234
- Prevented rare cases of infinite looping on database files written with a CockroachDB version earlier than v2.1.9. #43253
- Changefeeds now emit backfill row updates for a dropped column when the table descriptor drops that column. #43037
EXPLAIN
can now be used with statements that useAS OF SYSTEM TIME
. #43305- Fixed a bug that caused some jobs to be left indefinitely in a pending state and never run. #43416
- Migrating the privileges on the
system.lease
table no longer creates a deadlock during a cluster upgrade. #43508 - Fixed a bug in the parsing logic for
server.host_based_authentication.configuration
, where both single-character strings and quoted strings containing spaces and separated by commas were not properly parsed. This would cause rules for usernames consisting of a single character or usernames containing spaces to apply improperly. #43812 - A SQL row write that is re-issued after already succeeding no longer throws a duplicate key error when the previous write in its transaction deleted the row. #43942
- Fixed a changefeed bug where a resolved timestamp might be published before all events that precede it have been published in the presence of a range merge. #44082
- Converted a panic when using collated strings to an error. #44119
Performance improvements
- A transaction running into multiple intents from an abandoned conflicting transaction now cleans them up more efficiently. #43589
Contributors
This release includes 11 merged PRs by 7 authors.
v19.1.6
Release Date: December 16, 2019
This page lists additions and changes in v19.1.6 since v19.1.5.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.6
Security updates
CockroachDB previously allowed non-authenticated access to privileged HTTP endpoints like
/_admin/v1/events
, which operate usingroot
user permissions and can thus access (and sometimes modify) any and all data in the cluster. This security vulnerability has been patched by disallowing non-authenticated access to these endpoints and restricting access to admin users only.Note:Users who have built monitoring automation using these HTTP endpoints must modify their automation to work using an HTTP session token for an admin user.
Some Admin UI screens (e.g., Jobs) were previously incorrectly displayed using
root
user permissions, regardless of the logged-in user's credentials. This enabled insufficiently privileged users to access privileged information. This security vulnerability has been patched by using the credentials of the logged-in user to display all Admin UI screens.Privileged HTTP endpoints and certain Admin UI screens require an admin user. However,
root
is disallowed from logging in via HTTP and it is not possible to create additional admin accounts without an Enterprise license. This is further discussed here and will be addressed in an upcoming patch revision.Note:Users without an Enterprise license can create an additional admin user using a temporary evaluation license, until an alternative is available. A user created this way will persist beyond the license expiry.
Some Admin UI screens currently display an error or a blank page when viewed by a non-admin user (e.g., Table Details). This is a known limitation mistakenly introduced by the changes described above. This situation is discussed further here and will be addressed in an upcoming patch revision. The list of UI pages affected includes but is not limited to:
- Job details
- Database details
- Table details
- Zone configurations
Note:Users can access these Admin UI screens using an admin user until a fix is available.
The list of HTTP endpoints affected by the first change above includes:
HTTP Endpoint | Description | Sensitive information revealed | Special (see below) |
---|---|---|---|
/_admin/v1/data_distribution |
Database-table-node mapping | Database and table names | |
/_admin/v1/databases/{database}/tables/{table}/stats |
Table stats histograms | Stored table data via PK values | |
/_admin/v1/drain |
API to shut down a node | Can cause DoS on cluster | |
/_admin/v1/enqueue_range |
Force range rebalancing | Can cause DoS on cluster | |
/_admin/v1/events |
Event log | Usernames, stored object names, privilege mappings | |
/_admin/v1/nontablestats |
Non-table statistics | Stored table data via PK values | |
/_admin/v1/rangelog |
Range log | Stored table data via PK values | |
/_admin/v1/settings |
Cluster settings | Organization name | |
/_status/allocator/node/{node_id} |
Rebalance simulator | Can cause DoS on cluster | yes |
/_status/allocator/range/{range_id} |
Rebalance simulatoor | Can cause DoS on cluster | yes |
/_status/certificates/{node_id} |
Node and user certificates | Credentials | |
/_status/details/{node_id} |
Node details | Internal IP addresses | |
/_status/enginestats/{node_id} |
Storage statistics | Operational details | |
/_status/files/{node_id} |
Retrieve heap and goroutine dumps | Operational details | yes |
/_status/gossip/{node_id} |
Gossip details | Internal IP addresses | yes |
/_status/hotranges |
Ranges with active requests | Stored table data via PK values | |
/_status/local_sessions |
SQL sessions | Cleartext SQL queries | yes |
/_status/logfiles/{node_id} |
List of log files | Operational details | yes |
/_status/logfiles/{node_id}/{file} |
Server logs + entries | Many: names, application data, credentials, etc. | yes |
/_status/logs/{node_id} |
Log entries | Many: names, application data, credentials, etc. | yes |
/_status/profile/{node_id} |
Profiling data | Operational details | |
/_status/raft |
Raft details | Stored table data via PK values | |
/_status/range/{range_id} |
Range details | Stored table data via PK values | |
/_status/ranges/{node_id} |
Range details | Stored table data via PK values | |
/_status/sessions |
SQL sessions | Cleartext SQL queries | yes |
/_status/span |
Statistics per key span | Whether certain table rows exist | |
/_status/stacks/{node_id} |
Stack traces | Application data, stored table data | |
/_status/stores/{node_id} |
Store details | Operational details |
"Special" endpoints are subject to the cluster setting server.remote_debugging.mode
. Unless the setting was customized, clients are only able to connect from the same machine as the node.
SQL language changes
EXPLAIN (OPT,ENV)
now returns a URL with the data encoded in the fragment portion. Opening the URL shows a page with the decoded data. Note that the data is processed in the local browser session and is never sent out. #41092EXPLAIN ANALYSE
can now be used as an alias toEXPLAIN ANALYZE
. #41093- Mutations under
UNION
orUNION ALL
are now disallowed. This restriction is temporary and will be lifted in a future release. #41496
Admin UI changes
- Certain web UI pages (like the list of databases or tables) now restrict their content to match the privileges of the logged-in user. #42727
- The event log now presents all cluster settings changes, unredacted, when an admin user uses the page. #42727
- Customization of the UI by users is now only properly saved if the user has write privilege to
system.ui
(i.e., is an admin user). Also, all authenticated users share the same customizations. This is a known limitation and should be lifted in a future version. #42727 - Access to table statistics are temporarily blocked from access by non-admin users until further notice, for security reasons. #42727
- Certain debug pages have been blocked from non-admin users for security reasons. #42727
Bug fixes
- The experimental cloud storage changefeed sink previously violated some of the changefeed invariants under rare conditions. A number of these have been fixed, but some fixes require changes to the format of the filenames output by the cloud storage changefeed. This is unsuitable for inclusion in a patch release, so users of cloud storage changefeed sinks are highly encouraged to upgrade to CockroachDB 19.2 or later. #42907
- Fixed a crash that occurs when a suboperator with a
LIKE
comparison has a NULL left-hand side. #41073 - Reduced write amplification by avoiding forcing files through compactions unnecessarily. #41301
- Fixed a rare data corruption bug in RocksDB caused by newer Linux kernel's handling of i_generation on certain file systems. #41393
- Fixed a bug causing the
cluster_logical_timestamp()
function to sometimes return incorrect results. #41441 - Fixed internal errors generated during the execution of some complicated cases of correlated subqueries. #41667
- Fixed a bug causing zone configuration changes on tables with existing index zone configurations to not take effect unless the
num_replicas
field was also set. #41682 - Fixed bug causing zone configuration application on indexes to leak into configurations on partitions. #41679
- Fixed multiple bugs relating to zone configurations and
COPY FROM PARENT
. Previously,COPY FROM PARENT
was ignored when using it on partitions and indexes, and when using it on a zone that had an existing value for the field that was being changed. #41699 - Fixed a bug causing rapid network disconnections to lead to cluster unavailability because goroutines waited for a connection which will never be initialized to send its first heartbeat. #42165
- Fixed an internal error in a rare case involving
UNION
and tuples insideVALUES
clauses. #42266 - CockroachDB now permits planning of window functions within mutation statements, and other statements that cannot be distributed. #42617
- Fixed a bug that would produce a spurious failure with the error message "incompatible COALESCE expressions" when adding or validating
MATCH FULL
foreign key constraints involving composite keys with columns of differing types. #42652 - Fixed a case where we incorrectly determine that a query (or part of a query) which contains an
IS NULL
constraint on a unique index column returns at most one row, possibly ignoring aLIMIT 1
clause. #42792 - It is now possible to transfer range leases to lagging replicas. #42764
ALTER INDEX IF EXISTS
no longer fails when using an unqualified index name that does not match any existing index. Now it is a no-op. #42839- CockroachDB now prevents a number of panics from the SQL layer caused by an invalid range split. These would usually manifest with messages mentioning encoding errors ("found null on not null column" but also possibly various others). #42860
- Other callers to
acquireNodeLease
will not get erroneously cancelled just because the context of the first caller was cancelled. #43028 - Fixed a bug in poller causing it to emit row updates at a timestamp less than or equal to an already forwarded resolved timestamp. #43027
- Fixed a bug in cloud storage sink file naming that violates ordering in presence of a schema changes. #43027
- Fixed a bug causing disk stalls to allow a node to continue heartbeating its liveness record and prevent other nodes from taking over its leases, despite being completely unresponsive. #41765
- CockroachDB now properly removes excess secondary log files (SQL audit logging, statement execution logging, and RocksDB events). #41034
cockroach debug zip
,cockroach node
andcockroach user
now work properly if thedefaultdb
database has been manually dropped and the connection URL does not specify a database. #41131
Contributors
This release includes 34 merged PRs by 19 authors.
v19.1.5
Release Date: September 30, 2019
This page lists additions and changes in v19.1.5 since v19.1.4.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.5
SQL language changes
- Add
check_constraints
table to theinformation_schema
. #39688
Bug fixes
- Unary negatives in constant arithmetic expressions are no longer ignored. #39367
- Propagate zone configuration to non-gossiped system tables. #39691
- Prevent unlimited memory usage during SQL range deletions. #39733
- A crash caused by the presence of window functions in the source of the
CREATE TABLE AS
statement is fixed. #40430 - Fix a planning error that could occur when a common table expression with an
ORDER BY
was used inside of a subquery. #40490 - Fixed an optimizer panic when building array access expressions. #40513
- Fix bug where an MVCC value at a future timestamp is returned after a transaction restart. #40611
- Consider intents in a read's uncertainty interval to be uncertain just as if they were committed values. This removes the potential for stale reads when a causally dependent transaction runs into the not-yet resolved intents from a causal ancestor. #40611
- Prevent problems on mixed-version 19.1 clusters that are also performing a lookup join on a table that has an ongoing index backfill. #40739
- The
cockroach
CLI client commands are now able to connect to a server via the environment variableCOCKROACH_URL
. #40848 - Fix a crash in apply joins. #40829
- Detailed crash reports ("panic messages") could previously be reported in the wrong file, if SQL audit reporting or statement logging had been activated. This has been corrected and crash reports will now properly always appear in the main log file. #40942
Contributors
This release includes 14 merged PRs by 10 authors.
v19.1.4
Release Date: August 13, 2019
This page lists additions and changes in v19.1.4 since v19.1.3.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.4
Enterprise edition changes
- The new
skip_missing_views
option forRESTORE
skips restoring views that cannot be restored because their dependencies are not being restored at the same time. #38773
SQL language changes
- CockroachDB now ignores non-fatal errors updating jobs during
DROP TABLE
. #38821 - The first statement of a transaction no longer returns a transaction retry error if it is an
UPDATE
orDELETE
(this was already true forINSERT
). #39087
Bug fixes
- Fixed a bug that prevented inverted indexes from being created on
JSONB
columns containingNULL
values. #38747 - Ranges consisting of only one row (and historical versions of that row) are now correctly up-replicated. #38588
- Fixed a planning error that caused valid queries to fail with the error "rowCount passed in was too small". #38793
- Fixed incorrect results, or "unordered span" errors, in some cases involving exclusive inequalities with non-numeric types. #38896
- Fixed a bug in the cost-based optimizer causing a bad index for lookup joins in some cases. #39028
- Fixed a potential infinite loop in queries involving reverse scans. #39101
UPSERT
s planned by the cost-based optimizer that use lookup joins run during column mutations on the table being updated no longer cause crashes or other issues. #38917crdb_internal.ranges
can now be used inside views. Note that such views can become invalid in future releases ifcrdb_internal.ranges
changes. #39213
Contributors
This release includes 15 merged PRs by 11 authors.
v19.1.3
Release Date: July 15, 2019
This page lists additions and changes in v19.1.3 since v19.1.2.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.3
Bug fixes
- Fixed help text that erroneously labeled Encryption at Rest as experimental. #38237
- Fixed an incorrect type mismatch error when empty
ARRAY
values are used asDEFAULT
values (and potentially in other contexts). #38300 - Fixed a panic that could occur when decoding decimals as query parameters. #38330
NULL
s are now correctly handled byMIN
,SUM
, andAVG
when used as window functions. #38356- Fixed an issue that prevented restoring some backups if they included tables that were partitioned by columns of a certain types while also interleaved by child tables. #38494
- Fixed possible deadlock when storage engine write fails. #38478
- Fixed potential reappearance of deleted timeseries data, which could trip the consistency checker. #38478
- Removed dependency on
sync_file_range
on Linux platforms on which it returns ENOSYS, such as WSL (Windows Subsystem for Linux). #38478 - Nodes that have been down now recover quicker when they rejoin, assuming they weren't down for much more than the value of the
server.time_until_store_dead
cluster setting (which defaults to 5 minutes). #38642 - Checking the "skip should queue" checkbox in the Manual Enqueue Range advanced debuggging page now works for the GC Queue. #38296
- The YCSB workload no longer ignores the
--db
option. #38238 - Fixed the auto-retry counter in stats and now logs it in the statement/audit logs. #38035
Security improvements
- Only check
CommonName
on first certificate in file. #38165
Doc updates
- Added the Build a Python app with Kubernetes on CockroachCloud tutorial for running a Python app on a CockroachCloud cluster using a local Kubernetes cluster. #4918
- Expanded the recommended Topology Patterns for running CockroachDB in a cloud environment, each with required configurations and latency and resiliency characteristics. #4820
- Made the Java code samples in Build a Java App with CockroachDB simpler and more idiomatic. #4855
- Documented what happens when a node runs out of disk space and how to create a ballast file to prepare for this case. #5000
Contributors
This release includes 17 merged PRs by 14 authors.
v19.1.2
Release Date: June 17, 2019
This page lists additions and changes in v19.1.2 since v19.1.1.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.2
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 ...
. #36883
Bug fixes
- CockroachDB now computes the result of shifting bit arrays to the right properly and avoids generating invalid bit arrays. #36751
SHOW ZONE CONFIGURATION
no longer emits invalidALTER
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. #36883SHOW ZONE CONFIGURATION FOR TABLE t PARTITION p
no longer ignores the clausePARTITION p
and now properly displays the zone configuration for that partition instead. #36883- Automated table statistics no longer encounter "batch timestamp must be after replica GC threshold" errors on configurations with low TTL. #37588
- Fixed type inference of columns in subqueries for some expressions of the form
scalar IN (subquery)
. #37598 - Fixed a panic when constructing the error message for an invalid partitioning. #37703
- 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
). #37722 - Fixed a case in which
cockroach quit
would return successfully even though the server process was still running in a severely degraded state. #37722 - Fixed incorrect results or "incorrectly ordered stream" errors in response to some queries with aggregations, and improved the
EXPLAIN
output for aggregations. #37792 - A
NULL
right operand now causes the sub-operator expression to returnNULL
. #37886 - The
age()
function is now correctly marked as impure, causing it to be unavailable in certain contexts. #37922 - Certain binary encodings of numeric/decimal values no longer result in values that are an order of magnitude off. #37921
- Fixed a race condition that could cause a panic during query planning. #37974
- Fixed
GROUP BY
for empty arrays. #37940 - Fixed a bug when estimating result set sizes in the optimizer that caused queries involving very large integer ranges to have poor plans. #38038
- The
cockroach
commands 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. #37982 - 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. #37593
Security improvements
- Stack memory used by CockroachDB is now marked as non-executable, improving security and compatibility with SELinux. #38011
Contributors
This release includes 25 merged PRs by 18 authors. We would like to thank the following contributors from the CockroachDB community:
- Simo Kinnunen (first-time contributor)
v19.1.1
Release Date: May 20, 2019
This page lists additions and changes in v19.1.1 since v19.1.0.
- For a comprehensive summary of features in v19.1, see the v19.1 GA release notes.
- To upgrade to v19.1, see Upgrade to CockroachDB v19.1
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.1
Enterprise edition changes
CHANGEFEED
s now accept akey_in_value
option; this is automatically used for cloud storage sinks, making the primary key of deleted rows recoverable. #37328
SQL language changes
EXPLAIN (DISTSQL) CREATE STATISTICS
now shows the DistSQL plan used by theCREATE STATISTICS
job. #37237- Added missing columns to
information_schema.columns
. #37283
Bug fixes
- Prevented panics when adding comments to database objects at high verbosity. #37325
- Fixed panics when trying to run certain
SHOW
commands via the pgwire prepare path. #37325 - Fixed a regression in 19.1 that prevented empty arrays from being accepted over pgwire. #37398
- While a cluster is unavailable (e.g., during a network partition), memory and goroutines used for authenticating connections no longer leak when the client closes said connections. #36177
- Fixed a possible panic while recovering from a WAL on which a sync operation failed. #37109
- Fixed an error which could occur when a zigzag join was performed against a table with dropped columns. #37245
- Fixed incorrect query plans/results when non-validated FK constraints are not satisfied by the data. #37253
CHANGEFEED
s now retry instead of causing errors in more situations. #37092- Fixed a bug where
CHANGEFEED
job progress would regress when the job was restarted. #37091 - The
changefeed.max_behind_nanos
metric now has fewer false positives of changefeeds falling behind. #37048 - Corrected the names of some columns for tables created with
CREATE TABLE <name> AS <query>
. #37238 - Fixed a bug causing unvalidated check constraints to disappear from the output of
SHOW CONSTRAINTS
and to not be referenced inALTER TABLE
after upgrading to 19.1. #37462
Performance improvements
- Improved the performance of some queries containing predicates with constant functions, since these functions are now evaluated earlier during query optimization. #37234
- Improved the performance of some queries by teaching the optimizer to always prefer constrained scans over unconstrained scans. #37235
Doc updates
- Updated the Kubernetes tutorials for running CockroachDB on GKE to specify a reasonable machine type. Also updated the Helm-specific instructions for maintenance tasks (adding/removing nodes, upgrading a cluster).#4813 #4805
- Fixed the code sample in Build a PHP App with CockroachDB to not create new connections for each query. #4804.
Contributors
This release includes 28 merged PRs by 14 authors.
v19.1.0
Release Date: April 30, 2019
With the release of CockroachDB v19.1, we’ve made a variety of security, performance, and usability improvements. A few highlights:
Enhanced security: CockroachDB now supports transparent data encryption at rest and integrates with existing LDAP directory services within an organization to simplify user account management.
Native Change Data Capture: CockroachDB extends its streaming data capabilities by enabling data to flow more easily to backend warehouses, with support for publishing distributed, row-level change feeds directly into cloud storage for downstream processing.
High-performance multi-region deployments: Our cost-based optimizer can now use data locality to optimize queries so you can get low-latency queries even when your data may be spread across regions. We’ve also added follower reads to improve read performance for certain geo-distributed workloads.
Check out a comprehensive summary of the most significant user-facing changes and then upgrade to CockroachDB v19.1. You can also read more about these changes in the v19.1 blog post.
Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.1.0 - v19.1.11. If a backup coincides with an in-progress index creation (backfill), RESTORE
, or IMPORT
, it is possible that a subsequent incremental backup will not include all of the indexed, restored or imported data.
For more information, including other affected versions, see Technical Advisory 63162.
Downloads
Docker image
$ docker pull cockroachdb/cockroach:v19.1.0
Summary
This section summarizes the most significant user-facing changes in v19.1.0. For a complete list of features and changes, including bug fixes and performance improvements, see the release notes for previous testing releases.
- Managed service offering
- Enterprise features
- Core features
- Backward-incompatible changes
- Known limitations
- Documentation
Managed service offering
Feature | Description |
---|---|
Managed CockroachDB Console | Paid managed CockroachDB customers can now sign into their organization's account, view the connection string details, add and edit their list of allowed IPs on the management console. |
Enterprise features
These features require an enterprise license. Register for a 30-day trial license here.
Feature | Description |
---|---|
Encryption at Rest | Encryption at rest provides transparent encryption of a node's data on the local disk. This feature was introduced as experimental in v2.1 and is now ready for production use. |
GSSAPI with Kerberos Authentication | CockroachDB now supports the Generic Security Services API (GSSAPI) with Kerberos authentication, which lets you use an external enterprise directory system that supports Kerberos, such as Active Directory. |
Follower Reads | This feature reduces read latencies by allowing queries to perform historical reads of the closest replica of a given piece of data rather than reading from the more distant "leaseholder" replica. To enable follower reads on a query, use the experimental_follower_read_timestamp() built-in function in conjunction with the AS OF SYSTEM TIME clause. |
Prefer Closest Secondary Index | Given multiple identical indexes that have different locality constraints using replication zones, the cost-based optimizer will now prefer the index that is closest to the gateway node that is planning the query. In a properly configured geo-distributed cluster, this can lead to performance improvements due to improved data locality and reduced network traffic. This feature enables scenarios where reference data such as a table of postal codes can be replicated to different regions, and queries will use the copy in the same region. |
Change Data Capture | CDC in v19.1 includes many improvements to production-readiness. CHANGEFEED s delivering data to Apache Kafka/Confluent Platform are now fully supported, and a new cloud storage sink allows CHANGEFEED s to deliver table updates as JSON files to endpoints like Google Storage or AWS S3. A new push-based internal data delivery mechanism called rangefeeds helps deliver data with increased reliability and lower latency. |
Core features
These features are freely available in the core version and do not require an enterprise license.
Feature | Description |
---|---|
Load-Based Splitting | CockroachDB now automatically splits frequently accessed keys into smaller ranges to optimize your cluster’s performance. |
Query Optimizer Hints | The cost-based optimizer now supports hint syntax to force the use of merge, hash, or lookup joins. This let you override the cost-based optimizer's join algorithm selection in cases where you have information about your data that the cost-based optimizer does not yet have. |
Correlated Subqueries | Most correlated subqueries are now decorrelated and processed by the cost-based-optimizer. For those that cannot be decorrelated, CockroachDB now emits an "apply" operator that executes a sub-plan for every row in its input. This allows CockroachDB to execute a large number of additional correlated subqueries that were not able to be executed in v2.1. |
Core Changefeeds | CockroachDB now offers a non-enterprise version of change data capture, via the EXPERIMENTAL CHANGEFEED FOR statement, to consume table updates over a streaming Postgres connection. |
Cost-Based Optimizer | The cost-based optimizer now supports almost all read-only queries (except window functions) and almost all mutations (e.g., CREATE TABLE AS , INSERT , UPDATE , UPSERT , DELETE ). In addition, the cost-based optimizer now reorders up to 4 joins in a query to attempt to find the most performant ordering (via the new reorder_joins_limit session variable) and takes advantage of automatically generated table statistics without impacting foreground traffic. Note that statistics are created by default on all indexed columns when a user upgrades to this version. Finally, a query plan cache now saves a portion of the planning time for frequent queries used in the cost-based optimizer. |
Logical Plans in the Admin UI | The Statement Details page in the Admin UI now shows the ordered steps CockroachDB will take to execute a query (i.e., the EXPLAIN output). This helps you identify bottlenecks caused by how queries are planned by our heuristic and cost-based optimizers. |
Cascading Replication Zones | Newly created replication zones will now inherit empty values from their parent. For example, if the replication zone for a table is not explicitly set with num_replicas , it will inherit that value from its direct parent, whether that's the .default replication zone from the entire cluster or the replication zone for the database containing the table. |
Custom Savepoints | CockroachDB now supports custom naming of SAVEPOINT s for compatibility with ORMs and other third-party tools. |
Backward-incompatible changes
Before upgrading to CockroachDB v19.1.0, be sure to review the following backward-incompatible changes and adjust your application as necessary.
CockroachDB no longer supports the
B'abcde'
notation to express byte array literals. This notation now expresses bit array literals like in PostgreSQL. Theb'...'
notation remains for byte array literals.The normalized results of certain timestamp + duration operations involving year or month durations have been adjusted to agree with the values returned by PostgreSQL.
The
CHANGEFEED
experimental-avro
option has been renamedexperimental_avro
.Timezone abbreviations, such as
EST
, are no longer allowed when parsing or converting to a date/time type. Previously, an abbreviation would be accepted if it were an alias for the session's timezone.The way composite foreign key matches are evaluated has changed to match the Postgres behavior. If your schema currently uses composite keys, it may require updates, since this change may affect your foreign key constraints and cascading behavior. For more details and guidance, see this note.
Mutation statements like
UPDATE
,INSERT
, andDELETE
no longer attempt to guarantee mutation or output ordering when anORDER BY
clause is present. It is now an error to useORDER BY
withoutLIMIT
with theUPDATE
statement.
Known limitations
For information about limitations we've identified in CockroachDB v19.1, with suggested workarounds where applicable, see Known Limitations.
Documentation
Topic | Description |
---|---|
Geo-Partitioning | Added a video and tutorial on using geo-partitioning to get very fast reads and writes in a broadly distributed cluster. |
Security | Added an overview of CockroachDB security, with a dedicated page on authentication, encryption, authorization, and SQL audit logging. |
Troubleshooting | Added much more guidance on troubleshooting cluster setup and troubleshooting SQL behavior. |
Architecture | Added the Life of a Distributed Transaction, which details the path that a query takes through CockroachDB's architecture, starting with a SQL client and progressing all the way to RocksDB (and then back out again). Also added Reads and Writes in CockroachDB, which explains how reads and writes are affected by the replicated and distributed nature of data in CockroachDB. |
Production Guidance | Expanded the Production Checklist with more current hardware recommendations and additional guidance on storage, file systems, and clock synchronization. Also added a library of common Cluster Topology Patterns. |
ORMs | Expanded the SQLAlchemy tutorial to provide code for transaction retries and best practices for using SQLAlchemy with CockroachDB. |
v19.1.0-rc.4
Release Date: April 25, 2019
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.0-rc.4
Bug fixes
- Fixed a crash caused by running
COMMENT ON
with verbose logging turned on. #36825 - Fixed a panic that can happen while RangeFeeds are active. #36870
- The default value of the
kv.bulk_io_write.max_rate
cluster setting is now 1 TB/s, to help prevent incorrect rate limiting behavior due to rounding. #36912 - Fixed a rare inconsistency that could occur on badly overloaded clusters. #36959
- Fixed a bug in write batch decoding that could cause "invalid batch" errors while using
cockroach debug
commands to analyze data. #36965 - Fixed an issue that could cause low-traffic clusters to get stuck after a network outage. #37064
Contributors
This release includes 11 merged PRs by 9 authors.
v19.1.0-rc.3
Release Date: April 15, 2019
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.0-rc.3
Bug fixes
- Fixed a potential crash when constructing certain types of aggregations with post projections. #36514
- CockroachDB now correctly validates computed columns during
ALTER TABLE ... ADD COLUMN
. #36575 - Fixed a bug when parsing dates with large years. #36555
- Fixed a bug when decoding single column family
JSONB
columns. #36626 - Fixed a potential crash in a mixed-version cluster with some nodes running
v19.1-beta-x
and others running19.1-rc.x
. #36719 - Made
CHANGEFEED
s more resilient to a class of bugs that manifest as stalls. #36768
Performance improvements
- CockroachDB now applies back-pressure to bulk operations before other traffic. #36738
Contributors
This release includes 19 merged PRs by 12 authors.
v19.1.0-rc.2
Release Date: April 8, 2019
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.0-rc.2
SQL language changes
- Added the
kv.bulk_io_write.concurrent_addsstable_requests
cluster setting, which limits the number of SSTables that can be added concurrently during bulk operations. #36444 - Added the
schemachanger.backfiller.buffer_size
,schemachanger.backfiller.max_sst_size
, andschemachanger.bulk_index_backfill.batch_size
cluster settings, which control buffering in index backfills. #36377 - Added the
sql.defaults.reorder_joins_limit
cluster setting, which defines the default value of thereorder_joins_limit
session variable. #36382
Bug fixes
- Fixed a panic that could occur with certain patterns of using
UPDATE
and column families. #36375 - Prevented production server crashes on certain assertion errors. #36434
- Data that was previously omitted from
debug zip
is now included. #36480 - Fixed a planning error that occurred with some
GROUP BY
queries due to errors in null count estimation. #36528 - Fixed inappropriate column renaming in some cases involving single-column SRFs. #36535
- Prevented a panic when running a render expression that produces an error at the very end of a
count_rows
aggregate. #36538 - Prevented a deadlock related to store queue processing. #36542
Performance improvements
- CockroachDB now allows oversized ranges to split sooner. #36368
- Reduced memory usage during bulk data ingestion (during
IMPORT
,RESTORE
, and index creation). #36420 - Prevented rocksdb from slowing down write traffic during bulk data ingestion. #36512
- Sped up bulk data ingestion during index backfills and
IMPORT
. #36525
Doc updates
- Emphasized the experimental status of CockroachDB's Windows binary. #4628
- Clarified the use of the
ApplicationName
connection string parameter for JDBC clients. #4623 - Documented the
COMMENT ON
statement, for adding comments to databases, tables, and columns. #4617 - Documented the
RENAME CONSTRAINT
subcommand ofALTER TABLE
, and identified theALTER TABLE
subcommands that can be used in combination in a singleALTER TABLE
statement. #4615 - Documented per-statement credential parameters for Google Cloud Storage. #4606
- Clarified the accepted values for the
--duration
flag ofcockroach workload
. #4610
Contributors
This release includes 36 merged PRs by 16 authors.
v19.1.0-rc.1
Release Date: April 2, 2019
In addition to bug fixes and various enterprise, SQL, and Admin UI enhancements, with this release, we also want to highlight the following feature:
- Prefer the nearest secondary index: Given multiple identical indexes that have different locality constraints using replication zones, the cost-based optimizer will now prefer the index that is closest to the gateway node that is planning the query. In a properly configured geo-distributed cluster, this can lead to performance improvements due to improved data locality and reduced network traffic. This feature enables scenarios where reference data such as a table of postal codes can be replicated to different regions, and queries will use the copy in the same region.
- Encryption at Rest: This feature, which provides transparent encryption of a node's data on the local disk, was introduced as an experimental in CockroachDB v2.1. With this release, it is no longer considered experimental and is ready for production use.
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.0-rc.1
Enterprise edition changes
CHANGEFEED
s now support TLS connections to Kafka. #35510CHANGEFEED
s now support SASL/PLAIN authentication when connecting to a Kafka sink. #35800CHANGEFEED
s using Kafka now log information to help debug connection issues. #35661
SQL language changes
- The cost-based optimizer now picks lookup-joins less frequently. #35561
- CockroachDB now reports uses of CTEs (
WITH ...
) and subqueries in diagnostics reporting, to guide future product planning. #35650 - It is now possible to specify a
HASH
/MERGE
/LOOKUP
join hint with cross joins (CROSS <hint> JOIN
). #35700 - The output of
EXPLAIN
now useshash-join
ormerge-join
instead ofjoin
. #35688 - Added an
EXPLAIN (opt, env)
option, which provides all relevant information for the planning of a query. #35802 transaction deadline exceeded
errors are now returned to the client with a retryable code. #35284- Regular SQL errors that indicate erroneous SQL and for which CockroachDB does not yet populate a well-defined PostgreSQL error code will now be reported with code
XXUUU
instead of codeXX000
. #35896 - Removed "experimental" from the names of the two existing automatic statistics cluster settings, and added two new cluster settings to control the target number of stale rows per table that will trigger a statistics refresh. #36085
- Renamed the
experimental_reorder_joins_limit
session variable toreorder_joins_limit
. #36085 - Changed
SHOW JOBS
to no longer display automatic statistics jobs.SHOW AUTOMATIC JOBS
can now be used instead to view automatic statistics jobs. #36112 - The cost-based optimizer will now try to select the index having a leaseholder preference that is closest. #36123
- Computed columns are now evaluated after rounding any decimal values in input columns. #36128
- Changed the generation algorithm for the OID column of tables in
pg_catalog
. As with previous CockroachDB releases, we guarantee that the OID values are consistent betweenpg_catalog
tables (so that tables can be joined together), but we do not guarantee that they are stable across CockroachDB versions. Avoid storing them in client apps. #33697
Command-line changes
- The output of
cockroach debug zip
now contains more information. #36026
Admin UI changes
- Improved progress reporting for
CREATE STATISTICS
jobs. #35684 - The Queries per second metric in the Summary bar now summarizes only the query types displayed in the SQL Queries graph and Node Map. #35905
- The Jobs screen no longer shows automatic statistics by default. To see these jobs, you must now select Auto-Statistics Creation from the Type menu. #36112
Bug fixes
- Increased speed of automatic statistic jobs on clusters with low load. #35698
CHANGEFEED
s connected to a slow sink now error instead of using unbounded amounts of memory. #35745- Removed historical log entries from Raft snapshots that could lead to failed snapshots. #35701
- Fixed a bug in
RESTORE
where some unusual range boundaries in interleaved tables caused an error. #36005 - Fixed an error that occurred when creating statistics on tables with an inverted index. #35982
- Fixed a panic that occurred when comparing a value to the result of an
EXISTS
. #36038 - Fixed an error caused by incorrect calculation of null counts in
VALUES
clauses. #35997 - Reduced the occurrence of
ASYNC_WRITE_FAILURE
transaction retry errors, especially for the first insert into a newly-created table. #36104 - Fixed panics with the message "unexpected non-pending txn in augmentMetaLocked" caused by distributed queries encountering multiple errors. #36041
CHANGEFEED
s withchangefeed.push.enabled = true
(which is the default) no longer fail when run for longer than the garbage collection window of the source data and a range split occurred. They also now emit dramatically fewer duplicates. #35981- Fixed panics caused by certain window functions that operate on tuples. #36124
- Prevented deadlocks when cancelling distributed queries in some cases. #36122
- Fixed a planning error that occurred with some
IN
expressions containing a list of constant and non-constant items. #36134 - Reduced risk of data unavailability during AZ/region failure. #36133
- Fixed a planning error that occurred when using set operations with multiple columns and many null values. #36169
Performance improvements
- Improved performance of the TPC-C benchmark by pre-calculating statistics and injecting them during
IMPORT
. #35940 - Reduced the default frequency of automatic statistics refreshes. #35992
- Improved the selectivity estimation of range predicates during query optimization. #36093
Build changes
Doc updates
- Added a library of common Cluster Topology Patterns. #4235
- Documented how reads and writes are affected by the replicated and distributed nature of data in CockroachDB. #4543
- Corrected the syntax for per-replica replication zone constraints. #4569
- Added more thorough documentation on CockroachDB dependencies. #4567
Contributors
This release includes 104 merged PRs by 23 authors. We would like to thank the following contributors from the CockroachDB community:
- Dong Liang (first-time contributor)
v19.1.0-beta.20190318
Release Date: March 18, 2019
In addition to bug fixes and various general, enterprise, SQL, and Admin UI enhancements, this release includes several major highlights:
- Managed CockroachDB Console: Paid managed CockroachDB customers can now sign into their organization's account, view the connection string details, add and edit thier list of allowed IPs on the management console.
- GSSAPI with Kerberos Authentication: CockroachDB now supports the Generic Security Services API (GSSAPI) with Kerberos authentication, which lets you use an external enterprise directory system that supports Kerberos, such as Active Directory. This feature requires an Enterprise License.
- Query Optimizer Hints: The cost-based optimizer now supports hint syntax to force the use of a merge, hash, or lookup join. This let you override the cost-based optimizer's join algorithm selection in cases where you have information about your data that the cost-based optimizer does not yet have.
- Correlated Subqueries: Most correlated subqueries are decorrelated and processed by the cost-based-optimizer. However, for those that cannot be decorrelated, CockroachDB now emits an "apply" operator that executes a sub-plan for every row in its input. This allows CockroachDB to execute a large number of additional correlated subqueries that were not able to be executed in v2.1.
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.0-beta.20190318
General changes
- The cluster settings
timeseries.storage.10s_resolution_ttl
andtimeseries.storage.30m_resolution_ttl
have been renamed totimeseries.storage.resolution_10s.ttl
andtimeseries.storage.resolution_30m.ttl
for ease of use in SQL clients. Any value set using the previous setting name in existing clusters is migrated over to the new name; subsequent changes using the old name will be ignored. #34248
Enterprise edition changes
- Added the
debug encryption-active-key
command. #35234 - The
changefeed.min_high_water
metric has been deprecated in favor ofchangefeed.max_behind_nanos
, which is easier to alert on. The Changefeed dashboard in the Admin UI now contains a graph of this metric. #35257 - Added the
rocksdb.encryption.algorithm
per-store metric, which describes the encryption cipher in use. #35506 - In exchange for increased correctness confidence,
CHANGEFEED
s usingchangefeed.push.enabled
(the default) now take slightly more resources on startup and range rebalancing/splits. #35470
SQL language changes
- Changed the default set of column statistics created by CREATE STATISTICS to include up to 100 regular table columns in addition to all indexed columns. #35192
- Added the ability to pause all automatic statistics jobs by pausing the currently running job. #35243
- Automatic statistics are now enabled by default. #35291
- CockroachDB now supports many more correlated subqueries. #34546
- Schema changes now trigger automatic statistics collection for the affected table. #35252
- The
pg_catalog.current_setting()
andpg_catalog.set_config()
built-in functions are now supported for compatibility with PostgreSQL. Note that only session-scoped configuration changes remain supported (set_config(_, _, false)
). #35121 - The
RENAME COLUMN
command can now be used alongside other table commands in a singleALTER TABLE
statement. This makes it possible to, for example, atomically add a computed column based on an existing column, and rename the columns so that the computed column "replaces" the original column. #35091 - CockroachDB now supports
ALTER TABLE ... RENAME CONSTRAINT
. Only indexes that are not depended on by views can be renamed. #35091 SHOW JOBS
now returns an extrastatement
column, which is populated when the description is not the statement. #35439SHOW QUERIES
andSHOW SESSIONS
now omit internal queries and sessions by default. UseSHOW ALL QUERIES
orSHOW ALL SESSIONS
to include internal queries in the output. #35504- CockroachDB now starts emitting changefeed events immediately for sinkless changefeeds (an experimental feature). The
results_buffer_size
connection string parameter is no longer needed for this purpose. #35529 - CockroachDB now provides usable comments with optional documentation URLs for the virtual tables in
pg_catalog
,information_schema
, andcrdb_internal
. UseSHOW TABLES [FROM ...] WITH COMMENT
to read. Note thatcrdb_internal
tables remain an experimental feature subject to change without notice. #34764 - CockroachDB now reports usage frequency of various SQL scalar operators in telemetry, when telemetry is enabled, so as to guide future optimizations of query performance. #35616
- CockroachDB now reports how the
SERIAL
pseudo-type is expanded in table column definitions, when telemetry is enabled. #35656
Admin UI changes
CREATE STATISTICS
jobs no longer generate events by default. #35425- Queries issued internally by CockroachDB are now displayed under a single "(internal)" application name entry in the drop-down menu on the Statements page. #35503
- Additional types of transaction restart errors are now tracked on the Distributed dashboard. #35438
- Added "Statistics Creation" as a job type on the Jobs page. #35651
Bug fixes
- Fixed a planning bug that caused incorrect aggregation results on multi-node aggregations with implicit, partial orderings on the inputs to the aggregations. #35221
- Fixed a panic that occurred when evaluating certain binary expressions containing operands with different types. #35247
- Prevented a situation in which snapshots would be refused repeatedly over long periods of time, with error messages such as "aborting snapshot because raft log is too large" appearing in the logs, and often accompanied by under-replicated ranges in the UI. #35136
BACKUP
tonodelocal
now writes files atomically. #34937- Fixed a crash on
SET TRANSACTION AS OF SYSTEM TIME
with invalid expressions. #35316 - The experimental
CHANGEFEED
cloud storage sinks now strip secrets from the job description in the Admin UI andSHOW JOBS
output. #35257 - Fixed a nil pointer dereference in
debug zip
when one or more nodes in the cluster are down. #35366 - Window functions are now correctly planned when
UNION ALL
is present in the subquery. #35430 - Fixed panics that could occur in some cases involving joins of the results of mutations. #35482
- CockroachDB now correctly returns an error when window functions include window definitions that contain other window functions. #35369
- CockroachDB now properly applies column width and nullability constraints on the result of conflict resolution in
UPSERT
andINSERT ON CONFLICT
. #35371 - Improved telemetry for error codes. #35431
- CockroachDB now properly preserves the automatically generated name of a newly created index in
system.event_log
when the name is not specified in theCREATE INDEX
statement. #35534 - CockroachDB now properly reports
bigint
ininformation_schema.sequences.type
, for compatibility with PostgreSQL. #35577 - CockroachDB now properly reports the composite foreign key match type in
information_schema.referential_constraints
. #35575 - Subtracting 0 from a JSON array now correctly removes its first element. #35617
- Fixed a "column not in input" crash when
INSERT / UPDATE / UPSERT ... RETURNING
is used inside a clause that requires an ordering. #35644 - Fixed an error when executing some set operations containing only nulls in one of the input columns. #35321
- Fixed an on-disk inconsistency that could result from a crash during a range merge. #35626
Build changes
- Go 1.11.5 is now the minimum required version necessary to build CockroachDB. #35536
- CockroachDB will provisionally refuse to build with Go 1.12, as this is known to produce incorrect code inside CockroachDB. #35638
- Release Docker images are now built on Debian 9.8. #35517
Doc updates
- Updated the
PARTITION BY RANGE
example for geo-partitioning. #4503 - The Docs landing page now provides quick links into various areas of the CockroachDB documentation. #4476
- Documented the
BIT
data type. #4454 - Documented the
bytea_output
session variable, and fixed the documentation on bytes/string conversions. #4452 - Updated Configure Replication Zones documentation to reflect that unset variables in a replication zone now inherit their values from the parent zone. #4446
Contributors
This release includes 157 merged PRs by 29 authors. We would like to thank the following contributors from the CockroachDB community:
- Jaewan Park
v19.1.0-beta.20190304
Release Date: March 4, 2019
Downloads
To upgrade a running cluster to the latest version of CockroachDB, see Cluster Upgrade.
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.0-beta.20190304
Enterprise edition changes
- Added a GSS auth method configurable by the
server.host_based_authentication.configuration
cluster setting. This supports the new ability to use an external enterprise directory system like Active Directory for authentication in a CockroachDB cluster. Detailed usage guidance is coming soon. #34772
SQL language changes
- CockroachDB now supports the syntax
TIME(6)
,TIMESTAMP(6)
andTIMESTAMPTZ(6)
/TIMESTAMP(6) WITH TIME ZONE
, for compatibility with PostgreSQL. Only the value6
is supported, which is also the default in PostgreSQL. When used for a table column definition, the precision is not stored, and it is not possible to distinguish types with and without specified precisions in the introspection metadata. #35128 CHECK
constraints can now be applied to columns when they are first added to a table withALTER TABLE ... ADD COLUMN
. #35018- CockoachDB no longer supports
AS OF SYSTEM TIME
interval expressions less than 1 microsecond in the past. #34547 - When the JSON
?
operator is used to compare a JSON string and a string that are equal, CockroachDB now returnstrue
, for compatibility with PostgreSQL. #35005 - Specific implementations of join can now be forced by inserting
HASH
,MERGE
, orLOOKUP
between the type of join (INNER | LEFT | RIGHT | FULL
) and theJOIN
keyword. #35183 - CockroachDB now supports
SHOW SEQUENCES
to list the sequences in a given database or the current database, alongsideSHOW TABLES
, which was already able to list both tables and views. #35215 - Added the
sql.stats.experimental_automatic_collection.fraction_idle
cluster setting to control the throttling of automatic statistics. #34928
Admin UI changes
- Added a debug page that breaks down CPU usage by query (some restrictions apply). #35147
Bug fixes
- The columns
confupdtype
,confdeltype
andconfmatchtype
inpg_constraint
now report the foreign key constraint parameters properly, for compatibility with PostgreSQL clients that use them. #35052 - Fixed a panic that could occur when using
logspy
tracing in some circumstances. #34936 - Fixed a panic related to cached plans. #35027
- Fixed
CREATE STATISTICS
to run at the correct timestamp when it is specified withAS OF SYSTEM TIME
. #35139 - CockroachDB again properly reports when a database used during
PREPARE
does not exist any more whenEXECUTE
is used. #35151 - The logical plans collected for display in the web UI now hide the details of which key ranges are scanned in table lookups. #34902
- Fixed a panic that could occur via certain patterns of folding
CASE
statements containingNULL
values. #35188 - Fixed a bug that would return errors when handling valid
UPDATE
s during periods of an index creation schema change. #35157
Performance improvements
- Increased write throughput for workloads that write large numbers of intents by coalescing intent resolution requests across transactions. #34803
- Reduced write-amplification during bulk-loading (
IMPORT
andRESTORE
). #34886 - Increased the rebalancing and up-replication default rate from 2MB to 8MB. #35100
- Reduced the impact of bulk data ingestion on foreground traffic by controlling RocksDB flushes. #34800
Doc updates
- Added much more guidance on troubleshooting cluster setup and troubleshooting SQL behavior. #4223
- Added a summary of Enterprise features. #4418
- Documented CockroachDB's partial support for the Intellij IDEA. #4391
- Clarified the guidance on preparing to decommission nodes. #4406
Contributors
This release includes 89 merged PRs by 18 authors. We would like to thank the following contributors from the CockroachDB community:
- David López (first-time contributor)
- lanzao (first-time contributor)
v19.1.0-beta.20190225
Release Date: February 25, 2019
Since our initial launch, Cockroach Labs has used semantic versioning in our release cycle guidelines. Two years, one major release, and n-patch fixes later, we're making the switch to Calendar Versioning. This means subscribers to our release notes will see quite the jump in today's version numbering, from last week's 2.1.5 to today's 19.1 beta. You can read more about the switch here.
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v19.1.0-beta.20190225
General changes
- Records for completed jobs are cleaned up automatically after two weeks. #34725
SHOW JOBS
now returns only running and recently finished jobs. Older jobs can still be inspected via thecrdb_internal.jobs
table. #34829
Enterprise edition changes
nodelocal://
storage paths forBACKUP
,RESTORE
, andIMPORT
may include a node-ID in the Host part of the URI. It is not currently used (any node can get sent work and will look in its local IO directory) but will likely be required in the future. #34797CHANGEFEED
s targeting cloud sinks now partition files into date folders. #34813- The new
kv.rangefeed.concurrent_catchup_iterators
cluster setting limits the number of rangefeed catchup iterators a store will allow concurrently before queueing. #34890 - The
CHANGEFEED
experimental_avro
format now supports SQL columns of typeDATE
,TIME
,UUID
,INET
, andJSONB
. #34918
SQL language changes
- Virtual tables in
pg_catalog
andinformation_schema
now supportCOMMENT ON
like regular tables. #33697
Bug fixes
- Fixed a bug that could cause a Raft log to grow very large, which in turn could prevent replication changes. #34502
- Prevented down nodes from obstructing log truncation on ranges they are a member of. This problem could cause replication to fail due to an overly large Raft log. #34712
- Fixed a panic when subtracting an array containing null from a JSON datum. #34757
- Fixed a panic during some
UNION ALL
operations with projections, filters, or renders directly on top of theUNION ALL
. #34762 - Fixed a panic when the subquery in
UPDATE SET (a,b) = (...subquery...)
returns no rows. #34804 - Fixed a rare panic ("close of closed channel") when shutting down a server. #34823
- Fixed a deadlock during
IMPORT
andRESTORE
that caused all writes on a node to be stopped. #34830 - Fixed a panic during planning of certain complex join queries. #34843
- Fixed a panic when
CREATE STATISTICS
is run on clusters containing nodes with different versions of CockroachDB. #34842 - Fixed a bug where servers would endlessly try to refresh table statistics on dropped tables. #34884
- CockroachDB now only lists tables in
pg_catalog.pg_tables
, for compatibility with PostgreSQL. #34857 - Fixed a panic when using
EXPLAIN ANALYZE
with certain mutation queries. #34991
Performance improvements
- Subqueries used with
EXISTS
or as a scalar value now avoid fetching more rows than needed to decide the outcome. #34801
Doc updates
- Documented the built-in
ycsb
workload. #4343
Contributors
This release includes 102 merged PRs by 22 authors. We would like to thank the following contributors from the CockroachDB community:
- Jaewan Park
v2.2.0-alpha.20190211
Release Date: February 11, 2019
In addition to SQL language enhancements, general usability improvements, performance improvements, and bug fixes, this release includes several major highlights:
- Follower Reads: Enterprise users can now reduce read latencies by allowing queries to perform historical reads of the closest replica of a given piece of data rather than reading from the more distant "leaseholder" replica. To enable follower reads on a query, use the
experimental_follower_read_timestamp()
built-in function in conjunction with theAS OF SYSTEM TIME
clause. - Cost-Based Optimizer: The cost-based optimizer now supports almost all read-only queries (except window functions) and almost all mutations (e.g.,
CREATE TABLE AS
,INSERT
,UPDATE
,UPSERT
,DELETE
). In addition, the cost-based optimizer now reorders up to 4 joins in a query to attempt to find the most performant ordering (via the newexperimental_reorder_joins_limit
session variable) and takes advantage of automatic statistics without impacting foreground traffic. Note that statistics are created by default on all indexed columns when a user upgrades to this version. Finally, a query plan cache now saves a portion of the planning time for frequent queries used in the cost-based optimizer. - Change Data Capture: Enterprise users can now create
CHANGEFEED
s that deliver table updates as JSON files to cloud storage endpoints like Google Storage or AWS S3. In addition, all CockroachDB users can now use the core implementation of change data capture, via the newEXPERIMENTAL CHANGEFEED FOR
statement, to consumes table updates over a streaming Postgres connection. Finally, allCHANGEFEEDS
now use a new "push" mechanism called rangefeeds to deliver data with increased reliability and lower latency.
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v2.2.0-alpha.20190211
Backward-incompatible changes
- The
CHANGEFEED
experimental_avro
format is now backward- and forward-compatible with adjacent schemas for the same table. #34095
General changes
- Go 1.11.4 is now the minimum required version necessary to build CockroachDB. #33668
- Increased the maximum length of queries in crash reports, to make debugging easier. #34479
Enterprise edition changes
CHANGEFEED
s now experimentally support writing to cloud storage, for easy use with analytics databases. #33647 #34193- The
CHANGEFEED
envelope=row
option is now deprecated and will be removed in the Fall 2019 release. The default envelope for new changefeeds is nowwrapped
. #34309 CHANGEFEED
s now operate on an end-to-end "push" model, reducing latency of row changes. Some workloads will also see fewer transaction restarts on tables being watched byCHANGEFEED
s. #34457- Added support for standard HTTP proxy environment variables in HTTP and S3 storage. #34067
- Added support for performing sufficiently old historical reads against the closest replicas rather than leaseholders as well as a new
experimental_follower_read_timestamp()
built-in function, which can be used withAS OF SYSTEM TIME
clauses to generate a timestamp that is likely to be safe for reads from a follower. #33478
SQL language changes
VALIDATE CONSTRAINT
is now compatible with the newMATCH FULL
andMATCH SIMPLE
foreign key semantics and is more performant. #34365- Table data is now validated against a newly added
CHECK
constraint asynchronously after the transaction commits. #32504 NULL
values are now supported in int and text arrays in the driver protocol. #33675- CockroachDB now supports transmitting bit array values using the decimal encoding in the low-level client protocol. #34050
- It is now possible to force a reverse scan of a specific index using
table@{FORCE_INDEX=index,DESC}
. #34075 - Improved the output of
EXPLAIN
forindex-join
andlookup-join
. #34138 FILTER
expressions are now supported by the cost-based optimizer. #34077EXPLAIN (OPT)
now has a much shorter output.EXPLAIN (OPT,VERBOSE)
andEXPLAIN (OPT,TYPES)
can be used for more verbose output. #34128- Using a sequence as a
SELECT
target is now supported by the cost-based optimizer. #33196 - Removed the
2.0-off
and2.0-auto
modes for thesql.defaults.distsql
cluster setting. All queries are now run via the newer, distributed SQL engine; queries are still only distributed if appropriate. #34163 - The
experimental_force_lookup_join
session variable has been removed. #34142 - Added the
experimental_reorder_joins_limit
session variable, which defaults to4
and causes the cost-based optimizer to reorder up to 4 joins in a query to attempt to find the most performant ordering. This behavior can be disabled per-session by setting theexperimental_reorder_joins_limit
session variable to 0. #34549 - Formatting of timestamps as JSON strings has been changed to always use the RFC3339 format instead of Cockroach's customary format. Users can now expect to see a
T
separator instead of a space between the date and time components. #34412 - Introduced a new top-level statement for an experimental version of
CHANGEFEED
that doesn't require an enterprise license and that returns results as a stream over the sql connection. #34386 - The result buffer size can now be controlled on a per-connection basis with the
results_buffer_size
connection string parameter. #34385 CREATE STATISTICS
now runs as a job instead of as a regular SQL statement. #34279INT
values are now stored with microsecond precision instead of nanoseconds. Existing intervals with nanoseconds are no longer able to return their nanosecond part. An existing tablet
with nanoseconds in intervals of columns
can round them to the nearest microsecond withUPDATE t SET s = s + '0s'
. Note that this could potentially cause uniqueness problems if the interval is a primary key. #34202- Added support for
AS OF SYSTEM TIME
clauses inBEGIN TRANSACTION
andSET TRANSACTION
statements, which enables entire read-only transactions to be run against a historical timestamp. This functionality simplifies performing complex analytics against a consistent snapshot of historical data and eases the burden to use historical reads with ORMs which generally make modifying the syntax of generatedSELECT
statements difficult. #34305 - The behavior of the
now()
built-in function inside of historicalSELECT ... AS OF SYSTEM TIME
queries now reflects the historical timestamp at which the query is being run rather than the current clock time when the statement is executed. #34305 - The
ORDER BY
clause can no longer be used with aDELETE
statement when there is noLIMIT
clause present. Sorting the output should instead be done usingSELECT ... FROM [DELETE ...] ORDER BY ...
. #34303 - Enabled automatic statistics collection. #34529
DELETE
,UPDATE
, andUPSERT
statements are now planned by the cost-based optimizer. #34522- The value of
information_schema.columns.character_maximum_column
is set toNULL
for all integer types, for compatibility with PostgreSQL. #34182
Command-line changes
- The modified time is now set for entries in
cockroach debug zip
output. #33714 - Clarified the informational message printed upon running
cockroach start --join
. #33435
Admin UI changes
- Added a debug endpoint listing the hottest ranges by QPS on each node/store. #33336
- Improved performance of graph detail tooltips when viewing long timespans (e.g., 1 month) #34032
CHANGEFEED
metrics are now exposed in the UI. #34427
Bug fixes
- Fixed a bug in
RESTORE
that prevented restoring someBACKUP
s containing previously dropped or truncated interleaved tables. #34413 - Fixed a bug in
cockroach node status
that prevented it from displaying down nodes in the cluster in some circumstances. #34448 - Fixed several related panics in the optimizer related to plan exploration. #34667
- Resolved a cluster degradation scenario that could occur during
IMPORT
/RESTORE
operations, manifested through a high number of pending Raft snapshots. #33582 - Fixed a bug where some comparison operations with constant inputs were not getting folded during query optimization, causing the optimizer to produce sub-optimal plans. #33597
- Window functions with non-empty
PARTITION BY
andORDER BY
clauses are now handled correctly when invoked via the low-level client protocol. #33591 - Fixed a memory leak around
DEALLOCATE
andDISCARD
statements that could result in panics with theunexpected <amount> leftover bytes
message. #33423 - Lookup joins now properly preserve their input order even if more than one row of the input corresponds to the same row of the lookup table. #33536
- Fixed a panic that occurred when performing an
INSERT ON CONFLICT
with aSET UPDATE
that uses values from a subquery. #33553 - Preparing queries with missing placeholders (e.g.,
SELECT $2::int
) now results in an error. #33716 - Fixed a goroutine leak that would occur while a cluster was unavailable (or a subset of nodes partitioned away from the cluster) and would cause a resource spike to resolve. #33282
- Fixed panics or incorrect results in some cases when grouping on constant columns (either with
GROUP BY
orDISTINCT ON
). #34123 - Prevented down-replicating widely replicated ranges when nodes in the cluster are temporarily down. #34126
- Fixed a panic when an internal implementation error prevents proper handling of placeholders (query parameters). #34134
- CockroachDB now enables re-starting a node at an address previously allocated for another node. #34155
- The values reported in
information_schema.columns
for integer columns created prior to CockroachDB v2.1 asBIT
are now fixed and consistent with other integer types. #34182 - CockroachDB 2.2-alpha releases can once again be built from source on FreeBSD (unsupported platform). #34244
- Fixed a back up in flow creation observed by "no inbound stream connection" caused by not releasing a lock before attempting a possibly blocking operation. #34218
CHANGEFEED
s now can be started on tables that have been backfilled by schema changes. #34317- Fixed a possible panic in
crdb_internal.pretty_key()
. #34480 CHANGEFEED
s withchangefeed.push.enabled
set totrue
now resolve timestamps in the presence of inactive ranges. #34550- Fixed a panic when updating a job that doesn't exist. #34574
- Fixed a panic due to incorrect statistics calculations when all values of a column are NULL. #34578
- Fixed a bug where lease transfers passed through Snapshots could forget to update in-memory state on the new leaseholder, allowing write-skew between read-modify-write operations. #34548
Performance improvements
- Reduced the network and storage overhead of multi-range transactions. #33566
- A query plan cache now saves a portion of the planning time for frequent queries. #34454
- Transaction record garbage collection requests are now batched on a per range basis to reduce the number of Raft entries in a high-throughput, write-heavy, transactional workload. #34242
Doc updates
- The new Life of a Distributed Transaction details the path that a query takes through CockroachDB's architecture, starting with a SQL client and progressing all the way to RocksDB (and then back out again). #4281
- Added a warning about cross-store rebalancing not working as expected in 3-node clusters with multiple stores per node. #4320
- Updated the
INT
documentation to include examples of actual min/max integers supported by each type for easier reference. Also added a description of possible compatibility issues caused by 64-bit integers vs., for example, JavaScript runtimes. #4317 - Documented the
sql.metrics.statement_details.plan_collection.period
cluster setting, which controls how often the logical plan for a fingerprint is sampled (5 minutes by default) on the Statements page of the Admin UI. #4316 - Added guidance on removing
UNIQUE
constraints. #4276 - Added a note that when a table that was previously split is truncated, the table must be pre-split again. #4274
- Updated the SQL Performance Best Practices with caveats around interleaving tables. #4273
Contributors
This release includes 258 merged PRs by 29 authors. We would like to thank the following contributors from the CockroachDB community:
- George Utsin (first-time contributor)
- Txiaozhe (first-time contributor)
- Vijay Karthik
v2.2.0-alpha.20190114
Release Date: January 14, 2019
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v2.2.0-alpha.20190114
Backward-incompatible changes
Composite foreign key matching
We are changing the way composite foreign key matches are evaluated to match the default Postgres behavior. If your schema currently uses composite keys, it may require updates, since this change may affect your foreign key constraints and cascading behavior.
Prior to this change, we were matching composite keys with an incorrect implementation of the MATCH FULL
method, and we are resolving this by moving all existing composite foreign key matches to a correct implementation of the MATCH SIMPLE
method. Note that prior to this, there was no option for MATCH FULL
or MATCH SIMPLE
and all foreign key matching used the incorrect implementation of MATCH FULL
.
For a more detailed explanation of the changes, see below.
For matching purposes, composite foreign keys can be in one of 3 states:
- Valid: Keys that can be used for matching foreign key relationships.
- Invalid: Keys that will not be used for matching.
- Unacceptable: Keys that cannot be inserted at all.
The MATCH FULL
implementation we were using prior to this change allowed composite keys with a combination of NULL
and non-null values. This meant that we matched on NULL
s if a NULL
existed in the referencing column, essentially treating NULL
s as a valid value. This was incorrect, since MATCH FULL
requires that if any column of a composite key is NULL
, then all columns of the key must be NULL
. In other words, either all must be NULL
, or none may be.
To resolve this issue, all matches going forward will use the MATCH SIMPLE
method (this matches the Postgres default). MATCH SIMPLE
stipulates that:
- Valid composite keys may contain no
NULL
values, and will be used for matching. - Invalid keys are keys with one or more
NULL
values, and will not be used for matching, including cascading operations.
For more information, see #32693.
Mutation statements
Mutation statements like UPDATE
and INSERT
no longer attempt to guarantee mutation or output ordering when an ORDER BY
clause is present. It is now an error to use ORDER BY
without LIMIT
with the UPDATE
statement. #33087
SQL language changes
- Added support for configuring authentication via an
hba.conf
cluster setting. #32892 - Added support for collecting table statistics on a default set of columns by calling
CREATE STATISTICS
with no columns specified. #32981 - Added the
default_int_size
session variable andsql.defaults.default_int_size
cluster setting to control how theINT
andSERIAL
types are interpreted. The default value,8
, causes these types to be interpreted as aliases forINT8
andSERIAL8
, which have been the historical defaults for CockroachDB. PostgreSQL clients that expectINT
andSERIAL
to be 32-bit values can setdefault_int_size
to4
, which will causeINT
andSERIAL
to be aliases forINT4
andSERIAL4
. Please note that due to issue #32846,SET default_int_size
does not take effect until the next statement batch is executed. #32848 - When creating a replication zone, if a field is set to
COPY FROM PARENT
, the field now inherits its value from its parent zone, but any change to the field in the parent zone no longer affects the child zone. #32861 - Cockroach now supports specifying the matching method for composite foreign keys (a foreign key that includes more than one column) as either
MATCH SIMPLE
orMATCH FULL
.MATCH SIMPLE
remains the default.MATCH FULL
differs fromMATCH SIMPLE
by not allowing the mixing ofNULL
and non-NULL
values. Only allNULL
values will not be used to validate a foreign key constraint check or cascading action.MATCH PARTIAL
is still not supported. For more details see issue #20305 or https://www.postgresql.org/docs/11/sql-createtable.html. #32998 - The
string_agg()
aggregate function is now supported by the cost-based optimizer. #33172 - Added support for the
pg_catalog
introspection tablepg_am
for both PostgreSQL versions 9.5 and 9.6, which changed the table significantly. #33252 - Added foreign key checks to kv traces. #33328
- CockroachDB now defines columns
domain_catalog
,domain_schema
anddomain_name
ininformation_schema.columns
(usingNULL
values, since domain types are not yet supported) for compatibility with PostgreSQL clients. #33267 - Attempts to use some PostgreSQL built-in functions that are not yet supported in CockroachDB now cause a clearer error message, and also become reported in diagnostics reporting, if diagnostics reporting is enabled, so as to gauge demand. #33390
- CockroachDB now reports the name (not the value) of unsupported client parameters passed when setting up new SQL sessions in diagnostics reporting, if diagnostics reporting is enabled, to guage demand for additional support. #33264
- CockroachDB now collects statistics for statements executed "internally" (for system purposes). This is meant to facilitate performance troubleshooting. #32215
- CockroachDB now supports associating comments to SQL databases using PostgreSQL's
COMMENT ON DATABASE
syntax. This also provides proper support for pg'spg_catalog.pg_description
and theobj_description()
built-in function. #33057 - CockroachDB now supports associating comments to SQL table columns using PostgreSQL's
COMMENT ON COLUMN
syntax. This also provides proper support for pg'spg_catalog.pg_description
and thecol_description()
built-in function. #33355 - Logical plans are now sampled and stored in statement statistics. #33020
SHOW EXPERIMENTAL_RANGES
is faster if no columns are requested from it, like inSELECT COUNT(*) FROM [SHOW EXPERIMENTAL_RANGES...]
. #33463- The new
experimental_optimizer_updates
cluster setting controls whetherUPDATE
andUPSERT
statements are planned by the cost-based optimizer rather than the heuristic planner. Also note that when the setting is set, check constraints are not checked for rows skipped by theINSERT ... DO NOTHING
clause. #33339
Admin UI changes
- The Statement Details page now shows sample logical plans for each unique fingerprint. #33483
- SQL queries issued internally by CockroachDB are now visible on the Statements page. They can be filtered using the application name. #32215
Bug fixes
- Fixed a bug where schema changes could get stuck for 5 minutes when executed immediately after a server restart. #32988
- Fixed a bug with returning dropped unique columns in
DELETE
statements withRETURNING
. #33438 - Fixed a bug that could cause under-replication or unavailability in 5-node clusters and those using high replication factors. #32949
- Fixed an infinite loop in a low-level scanning routine that could be hit in unusual circumstances. #33063
- CockroachDB no longer reports under-replicated ranges corresponding to replicas that are waiting to be deleted. #32845
- Fixed a possible goroutine leak when canceling queries. #33130
CHANGEFEED
s and incrementalBACKUP
s no longer indefinitely hang under an infrequent condition. #32909cockroach node status --ranges
previously listed the count of under-replicated ranges in theranges_unavailable
column and the number of unavailable ranges in theranges_underreplicated
column. This fixes that mix-up. #32950- Fixed a panic in the cost-based optimizer during the planning of some queries. #33183
- Cancel requests (via the pgwire protocol) now close quickly with an EOF instead of hanging but still do not cancel the request. #33202
- CockroachDB does not crash upon running
SHOW SESSIONS
,SHOW QUERIES
, and inspections of somecrdb_internal
tables when certain SQL sessions are issuing internal SQL queries. #33138 - Updated the Zipkin library to avoid deadlock when stopping Zipkin tracing. #33287
- Fixed a panic that could result from not supplying a nullable column in an
INSERT ON CONFLICT ... DO UPDATE
statement. #33245 - Fixed pgwire binary decoding of decimal
NaN
andNULL
in arrays. #33295 - The
UPSERT
andINSERT ON CONFLICT
statements now properly check that the user has theSELECT
privilege on the target table. #33358 - CockroachDB now errors with a fatal exit when data or logging partitions become unresponsive. Previously, the process would remain running, though in an unresponsive state. #32978
- Updated the contextual help for
\h EXPORT
incockroach sql
to reflect the actual syntax of the statement. #33460 INSERT ON CONFLICT ... DO NOTHING
no longer ignores rows that appear to be duplicate in theINSERT
operands but are not yet present in the table. These are now properly inserted. #33320- Prevented a panic with certain queries that use the statement source (square bracket) syntax. #33537
- Previously, CockroachDB did not consider the value of the right operand for
<<
and>>
operators, resulting in potentially very large results and excessive RAM consumption. This has been fixed to restrict the range of these values to that supported for the left operand. #33221
Performance improvements
- Cross-range disjunctive scans where the result size can be deduced are now automatically parallelized. #31616
- Limited the concurrency of
BACKUP
on nodes with fewer cores to reduce performance impact. #33277 - Index joins, lookup joins, foreign key checks, cascade scans, zig zag joins, and
UPSERT
s no longer needlessly scan over child interleaved tables when searching for keys. #33350
Doc updates
- Updated the Production Checklist with more current hardware recommendations and additional guidance on storage, file systems, and clock synch. #4153
- Expanded the SQLAlchemy tutorial to provide code for transaction retries and best practices for using SQLAlchemy with CockroachDB. #4142
Contributors
This release includes 212 merged PRs by 34 authors. We would like to thank the following contributors from the CockroachDB community:
- Jaewan Park
- Jingguo Yao
v2.2.0-alpha.20181217
Release Date: December 17, 2018
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v2.2.0-alpha.20181217
General changes
- The default disk size on Kubernetes has been changed from 1 GiB to 100 GiB. #32428
- A new cluster setting (
sql.defaults.conn_results_buffer_size
) can be used to control server-side buffering of results. #32366
Enterprise edition changes
- Disabled range merges on tables that are being restored or imported into. #32538
- Added timeseries metrics for debugging
CHANGEFEED
performance issues. #32241 - Added the option to supply Google Cloud Storage credentials on a per-statement basis with the query parameter
credentials
. #32544 - It is now possible to use AWS S3 temporary credentials for
BACKUP
/RESTORE
andIMPORT
/EXPORT
using theAWS_SESSION_TOKEN
parameter in the URL. #32455
SQL language changes
- Users can customize the auto-retry savepoint name used by the
SAVEPOINT
command by setting theforce_savepoint_restart
session variable. For example,SET force_savepoint_restart=true; BEGIN; SAVEPOINT foo
will now function as desired. This session variable may also be supplied as part of a connection string to support existing code that assumes that arbitrary savepoint names may be used. #31971 - The names supplied to a
SAVEPOINT
command are now properly treated as SQL identifiers. For example,SAVEPOINT foo
andSAVEPOINT FOO
are now equivalent statements. #31971 - It is now an error to run
ALTER TABLE ... DROP STORED
on a column which is not actually a computed, stored column. Previously, this statement would be a successful no-op. #32279 - Many queries containing a correlated
EXISTS
subquery with a generator function can now be decorrelated and executed successfully. Previously, these queries caused a decorrelation error. #31922 IMPORT
now uses larger integer sizes when converting unsigned MySQL integer columns to their signed cockroach counterparts. #32481- An
ALTER TABLE
statement to add a foreign key constraint now automatically creates the necessary index if the referencing table is empty and the index does not already exist. #32234 - Queries involving
COLLATE
expressions are now supported by the cost-based optimizer. #32500 - Some categories of
SELECT
queries that return 0 or 1 rows (namely, queries by a PK, a unique index, or LIMIT 1 queries) are now guaranteed to not return retryable errors when running as implicit transactions (i.e., outside of aBEGIN...COMMIT
block). #32401 - Added support for
AS OF SYSTEM TIME
with theCREATE STATISTICS
statement. #32643 - CockroachDB now accepts ordinary string values for placeholders of type
BPCHAR
, for compatibility with PostgreSQL clients that use them. #32654 - CockroachDB now supports associating comments to SQL tables using PostgreSQL's
COMMENT ON TABLE
syntax. This also provides proper support for pg'spg_catalog.pg_description
and built-in functionobj_description()
. #32442 - The
SHOW TABLES
statement now supports printing out table comments using the optional phraseWITH COMMENT
, e.gSHOW TABLES FROM mydb WITH COMMENT
. #32442 - The
INT
type is now treated as an alias forINT8
. #32831 - Added an
experimental_optimize_updates
flag, which uses the cost-based optimizer to planUPDATE
statements when set to true. #32774
Command-line changes
cockroach sql
and other commands that print query results and query execution latency will now exclude the time required to prepare the display client-side from the latency measurement. #32663cockroach workload
now includes thekv
andycsb
generators. #32719- Added the
cockroach debug merge-logs
command to combine logs from multiple nodes. #32790
Admin UI changes
- All existing uses of the Loading component now properly surface data errors. Previously, data errors weren't consistently surfaced. #32464
- The Node map now uses an
equirectangular
projection. #32617
Bug fixes
- Fixed a panic on
UPDATE RETURNING *
during a schema change. #32188 - Fixed a panic when expression contains both a correlated and uncorrelated subquery. #32443
- Fixed a panic on
UPSERT
in the middle of a schema change adding a non-nullable column. #32585 - Fixed an error when configuring
NOT NULL
computed columns. #32585 - Fixed a deadlock when using
ALTER TABLE VALIDATE CONSTRAINT
in a transaction with a schema change. #32772 - Prevented non-superusers from seeing other user's sessions and queries via the
ListSessions
andListLocalSessions
status server API methods. #32253 - Avoided occasional unnecessary Raft snapshots after range splits. #31875
CHANGEFEED
s emitting into Kafka now more quickly notice new partitions. #32297- Ensured that space in the temporary storage directory is reclaimed more promptly. #32385
CHANGEFEED
s with theexperimental_avro
option now work with columnWIDTH
s andPRECISION
s. #32474- CockroachDB now properly rejects queries that use an invalid function (e.g., an aggregation) in the
SET
clause of anUPDATE
statement. #32505 - Prevented
VALUES
clauses from returning incorrect results for certain special OID values. #32494 - CockroachDB now reports an unimplemented error when a
WHERE
clause is used afterINSERT ... ON CONFLICT
. #32556 - Fixed an issue where calling
CREATE STATISTICS
on a large table could cause the server to crash due to running out of memory. #32614 - CockroachDB now properly handles foreign key cascading actions
SET DEFAULT
andSET NULL
inSHOW CREATE
andcockroach dump
. #32589 - Fixed a node data loss bug that occurs when a disk becomes temporarily full. #32605
- Fixed a panic caused by
WITH ORDINALITY
in some cases. #32596 - Dates no longer have a time component in their text encoding over the wire. #32144
- Intervals now match Postgres in their text encoding over the wire. #32144
- Intervals no longer sometimes lose 1ns of precision. This only happened rarely due to floating point inaccuracy. #32144
- Corrected the
pgwire
encoding for arrays and tuples. #32144 - Corrected the binary decimal encoding for
NaN
. #32144 - Prevented a panic when running certain subqueries that get planned in a distributed fashion. #32652
- Fixed a panic that could occur during or after a data import on Windows. #32664
- Lookup joins now properly preserve ordering for outer joins. Prior to this fix,
LEFT JOIN
queries under specific conditions could produce results which did not respect theORDER BY
clause. #32317 - CockroachDB now again enables admin users, including
root
, to list all user sessions besides their own. #32629 - Fixed a panic involving
json_agg
and window functions. #32716 - CockroachDB no longer panics when encountering an internal error related to invalid entries in the output of
SHOW SESSION
s. #32713 - Resolved a cluster degradation scenario that could occur during
IMPORT
/RESTORE
operations, manifested through a high number of pending Raft snapshots. #32594 - CockroachDB now properly evaluates
CHECK
constraints after a row conflict inINSERT ... ON CONFLICT
when theCHECK
constraint depends on a column not assigned byDO UPDATE SET
. #32779 - CockroachDB now properly records statistics for sessions where the value of
application_name
is given by the client during initialization instead ofSET
. #32754 cockroach workload run
no longer includes data-only generators #32720- Fixed a bug where metadata about contended keys was inadvertently ignored, allowing for a failure in transaction cycle detection and transaction deadlocks in rare cases. #32773
- Fixed a bug where
SCRUB
would erroneously report that index keys were out of order. #32908
Performance improvements
- Removed locking when reading physical time. #32225
- CockroachDB now users a faster randomness source to generate transaction IDs. #32238
- Implemented more efficient execution for some queries with
GROUP BY
orDISTINCT ON
and anORDER BY
clause where an index with a suitable ordering is not available. #32307 - CockroachDB now rewrites the Raft entry cache to optimize for access patterns, reduce lock contention, and reduce memory footprint. #32618
- Re-enabled usage of RocksDB FlushWAL, which is a minor performance improvement for synchronous RocksDB write operations. #32674
- Replaced the Replica latching mechanism with a new optimized data structure that improves throughput, especially under heavy contention. #32865
Build changes
ncurses
is now linked statically so that the cockroach binary no longer requires a particular version of thencurses
shared library to be available on deployment machines. #32959
Doc updates
- Updated the Performance Tuning and TPC-C Benchmarking tutorials to clarify that the
--advertise-addr
flag must be set uniquely for each node. #4164 - Fixed a method in the Build a C# (.NET) App with CockroachDB code samples. #4161
- Expanded the Build a Rust App with CockroachDB tutorial to cover secure clusters. #4127
Contributors
This release includes 265 merged PRs by 38 authors. We would like to thank the following contributors from the CockroachDB community:
- Jaewan Park (first-time contributor)
- Joe Harlow (first-time contributor)
- Mayank Oli
- shakeelrao (first-time contributor)
v2.2.0-alpha.20181119
Release Date: November 19, 2018
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v2.2.0-alpha.20181119
Backward-incompatible changes
- CockroachDB no longer supports the
B'abcde'
notation to express byte array literals. This notation now expresses bit array literals like in PostgreSQL. Theb'...'
notation remains for byte array literals. #28807 - The normalized results of certain timestamp + duration operations involving year or month durations have been adjusted to agree with the values returned by PostgreSQL. #31146
- The
CHANGEFEED
experimental-avro
option has been renamedexperimental_avro
. #31838 - Timezone abbreviations, such as
EST
, are no longer allowed when parsing or converting to a date/time type. Previously, an abbreviation would be accepted if it were an alias for the session's timezone. #31758
General changes
- Load-based splitting is now enabled by default. In conjunction, the
range_min_bytes
setting in the.default
replication zone is set to a higher value to prevent ranges from unnecessarily being considered for merging. #31413 - Added a Kubernetes configuration that shows how to use certificates generated outside of the Kubernetes-orchestrated CockroachDB cluster. #27921
- Added a Fluentd configuration for external logging of a Kubernetes-orchestrated CockroachDB cluster. #26685
SQL language changes
- The
EXPERIMENTAL_RELOCATE
statement no longer temporarily increases the number of replicas in a range more than one above the range's replication factor, preventing rare edge cases of unavailability. #29684 - The output of
SHOW JOBS
now reports ongoing jobs first in start time order, then completed jobs in finished time order. Therunning_status
column becomesNULL
when the status cannot be determined. #30917 - The output of
SHOW ZONE CONFIGURATIONS
now only shows the zone name and the SQL representation of the config. #30985 - The range log and system events logs now automatically purge records older than 30 and 90 days, respectively. This can be adjusted via the
server.rangelog.ttl
andserver.eventlog.ttl
cluster settings. #30913 - In cases such as
'2018-01-31'::TIMESTAMP + '1 month'
, where an intermediate result of February 31st needs to be normalized, previous versions of CockroachDB would advance to March 3. Instead, CockroachDB now "rounds down" to February 28th to agree with the values returned by PostgreSQL. This change also affects the results of thegenerate_sequence()
function when used with timestamps. #31146 - Updated the output of
SHOW ZONE CONFIGURATIONS
. Also, unset fields in zone configurations now inherit parent values. #30611 - If diagnostics reporting is enabled, attempts to use
CREATE/DROP SCHEMA
,DEFERRABLE
,CREATE TABLE (LIKE ...)
, andCREATE TABLE ... WITH
are now collected as telemetry to gauge demand for these currently unsupported features. #31635 - If diagnostics reporting is enabled, the name of SQL built-in functions are now collected upon evaluation errors. #31677
- If diagnostics reporting is enabled, attempts by client apps to use the unsupported "fetch limit" parameter (e.g., via JDBC) are now collected as telemetry to gauge support for this feature. #31637
- The
IMPORT format (file)
syntax is deprecated in favor ofIMPORT format file
. Similarly,IMPORT TABLE ... FROM format (file)
is deprecated in favor ofIMPORT TABLE ... FROM format file
. #31263 - For compatibility with PostgreSQL, it is once again possible to use the keywords
FAMILY
,MINVALUE
,MAXVALUE
,INDEX
, andNOTHING
as table names, and the names "index" and "nothing" are once again accepted in the right-hand side ofSET
statement assignments. #31731 - Renamed the first column name returned by
SHOW STATISTICS
tostatistics_name
. #31927 - CockroachDB now accepts a wider variety of date, time, and timestamp formats. #31758
- The new
experimental_vectorize
session setting, when enabled, causes columnar operators to be planned instead of row-by-row processors, when possible. #31354 - CockroachDB now supports the
BIT
andVARBIT (BIT VARYING)
bit array data types like PostgreSQL. Currently, only the bit array literal notation with a capital B (e.g.,B'10001'
) is supported; the notation with a smallb
(e.g.,b'abcd'
) continues to denote byte arrays as in previous versions of CockroachDB. #28807 - Added the
array_to_json
built-in function. #29818 - Statements involving the dropping or truncating of tables, such as
DROP DATABASE
,DROP TABLE
, andTRUNCATE
, are now considered jobs and, as such, can be tracked viaSHOW JOBS
and the Jobs page of the Admin UI. #29993
Command-line changes
- The
cockroach cert create-client
now offers the--also-generate-pkcs8-key
flag for writing a client key in PKCS#8 format. #29008 - The client-side option
smart_prompt
now controls whethercockroach sql
andcockroach demo
use the current transaction state to offer a multi-line entry at the start of new transactions. #31630 - The
cockroach sql
andcockroach demo
commands now recognize the commandsexit
andquit
to terminate the shell. #31915 - The
cockroach debug estimate-gc
command now allows users to specify TTL period, with a default of 24 hours. #31402
Admin UI changes
- Improved the layout of the Cluster Overview page for large clusters with many nodes and ranges. #31512
- Added the current node ID to the Advanced Debugging page to help identify the current node when viewing the web UI through a load balancer. #31835
- The Non-Table Cluster Data section of the Databases page now includes all non-table data types. Previously, this section only showed Time Series data. #31830
Bug fixes
- Hash functions with
NULL
input now returnNULL
. #29822 - Generated sequences now respect the
statement_timeout
session variable. #31083 IS OF (...)
expressions no longer report arrays with different element types as being the same. #31393- Fixed a bug where Raft proposals could get stuck if forwarded to a leader who could not itself append a new entry to its log. #31408
- The
confkey
column ofpg_catalog.pg_constraint
no longer includes columns that were not involved in the foreign key reference. #31610 - Fixed a small memory leak when running distributed queries. #31736
- Fixed a bug in the cost-based optimizer that sometimes prevented passing ordering requirements through aggregations. #31754
- Fixed a bug that caused transactions to unnecessarily return a "too large" error. #31733
CHANGEFEED
s now escape Kafka topic names, when necessary. #31596- Fixed a bug that would incorrectly cause JSON field access equality comparisons to be true when they should be false. #31751
- Fixed a bug that sometimes caused invalid results or an "incorrectly ordered stream" error with streaming aggregations. #31825
- Fixed a mismatch between lookup join planning and execution, which could cause queries to fail with the error "X lookup columns specified, expecting at most Y". #31792
- Prevented a performance degradation related to overly aggressive Raft log truncations that could occur during
RESTORE
orIMPORT
operations. #31914 EXPLAIN ANALYZE
plans no longer show the processor with ID 0's stats in the Response box. #31941- Fixed rare deadlocks during
IMPORT
,RESTORE
, orBACKUP
. #31963 - Fixed a panic caused by incorrectly encoded Azure credentials. #31984
- The cost-based optimizer no longer chooses the wrong index for a scan because of incorrect selectivity estimation. #31937
- Prepared statements that bind temporal values now respect the session's timezone setting. Previously, bound temporal values were always interpreted as though the session time zone were UTC. #31758
- Prevented a stall in the processing of Raft snapshots when many snapshots are requested at the same time. #32053
CHANGEFEED
s now spend dramatically less time flushing Kafka writes. #32060- Fixed a bug that caused some queries with
DISTINCT ON
andORDER BY
with descending columns to return an error incorrectly. #31976 - Fixed a bug that caused queries with
GROUP BY
orDISTINCT ON
to return incorrect results or an "incorrectly ordered stream" error. Also improved performance of some aggregations by utilizing streaming aggregation in more cases. #31976 - Fixed bit array wire encoding in binary format. #32091
- Fixed a bug that caused transactions to appear partially committed. CockroachDB was sometimes claiming to have failed to commit a transaction when some (or all) of its writes were actually persisted. #32166
- Prevented long stalls that can occur in contended transactions. #32211
- The graphite metrics sender now collects and sends only the latest data point instead of all data points since startup. #31829
Performance improvements
- Improved the performance of
AS OF SYSTEM TIME
queries by letting them use the table descriptor cache. #31716 - Within a transaction, when performing a schema change after the table descriptor has been modified, accessing the descriptor should be faster. #30934
- Improved the performance of index data deletion. #31326
- The cost-based optimizer can now determine more keys in certain cases involving unique indexes, potentially resulting in better plans. #31662
- Reduced the amount of allocated memory by pooling allocations of
rocksDBBatch
andRocksDBBatchBuilder
objects. #30523 - Cache zone configuration values to avoid repetitive deserialization. #30143
Contributors
This release includes 998 merged PRs by 50 authors. We would like to thank the following contributors from the CockroachDB community:
- Jan Owsiany (first-time contributor)
- M-srivatsa (first-time contributor)
- Mayank (first-time contributor)
- Mayank Oli (first-time contributor)
- Mo Firouz (first-time contributor)
- Sankt Petersbug (first-time contributor)
- Vijay Karthik
- changangela (first-time contributor)
- hueypark (first-time contributor)
- neeral