September 30, 2020
Warning:
A denial-of-service (DoS) vulnerability is present in CockroachDB v20.2.0 - v20.2.3 due to a bug in protobuf. This is resolved in CockroachDB v20.2.4 and later releases. When upgrading is not an option, users should audit their network configuration to verify that the CockroachDB HTTP port is not available to untrusted clients. We recommend blocking the HTTP port behind a firewall.
For more information, including other affected versions, see Technical Advisory 58932.
Get future release notes emailed to you:
Downloads
Docker image
$ docker pull cockroachdb/cockroach-unstable:v20.2.0-beta.3
Security updates
- Added ability to login via OIDC provider: Operators can now configure a single OIDC authentication provider using a collection of cluster settings that can provide authentication for users into the DB Console only (not for SQL). The user must exist as a SQL user in the database for the authentication to work. #54659
General changes
- Reduced the memory overhead of rangefeeds (i.e., long-lived requests) which reduces the memory overhead for running
CHANGEFEED
s over large tables. #54631
SQL language changes
General SQL updates
- After renaming a database, schema, or type, the old names are now immediately inaccessible from other sessions when referred to in schema change statements as soon as the new name is committed. This matches the existing behavior for tables. This is a change from earlier 20.2 beta releases. #54384
- Added the ability to parse the
ONLY
and*
(descendant) clauses inUPDATE
. This is a no-op as we do not support table inheritance. #54426 - Added the ability to parse the
CONNECTION LIMIT [=] iconst32
syntax forCREATE DATABASE
. This is currently a no-op for -1, and errors for any other value. By default, the value is -1 (unlimited connections). #54421 - Creating cross-database foreign key references is now disallowed (and can be re-enabled via the
sql.cross_db_fks.enabled
cluster setting). #54520 - Creating views that refer to tables in other databases is now disallowed (and can be re-enabled via the
sql.cross_db_views.enabled
cluster setting). #54520 - Partial index definitions in
pg_catalog
are now formatted with parentheses around theWHERE
clause. #54535 - Interleaved joins are now disabled by default and will be entirely removed in the 21.1 release, because they are often slower than the merge join. #54162
- Foreign key violation errors now fill in the "constraint name" error message field. #54576
CREATE SCHEDULE
output now has a column calledlabel
which was previously calledname
. #54397- If a user/role has ownership over a type or a schema, it is no longer possible to drop them using
DROP ROLE
. #54511 - Implemented
SHOW GRANTS ON SCHEMA <schema_list>
#54596 - Added a custom
information_schema.type_privileges
table that displays type privileges for each supported type. #54596 - Implemented the
SHOW GRANTS ON TYPE
command, which shows grants for a specific type. #54596 - The
SHOW GRANTS
without any table/type/schema/database qualifier now also shows types. Thetable_name
column is renamed totype_name
. #54596 - Added support for the Postgres
CREATE EXTENSION
syntax. This no-ops for thepostgis
extension, and gives unimplemented errors for extensions we do not yet support. #54595 - Added unimplemented errors for using operator classes as parameters for creating an index. #54595
- Creating sequences that are
OWNED BY
columns in tables in other databases is now disallowed (and can be re-enabled via thesql.cross_db_sequence_owners.enabled
cluster setting). #54585
Spatial support updates
- Implemented the geometry builtins
ST_Boundary
,ST_Difference
,ST_Relate
(BNR variant),ST_MinimumClearance
,ST_MinimumClearanceLine
,ST_Polygon
,ST_Angle
,ST_FrechetDistance
, andST_HausdorffDistance
. #54436 - Implemented
ST_S2Covering
, which returns the S2 coverings used for indexing for geometry and geography types. #54433
Command-line changes
- The timing details for query execution in the SQL shell (e.g.,
cockroach sql
,cockroach demo
) have been completed to also properly take query parsing and planning time into account. As previously, this timing display can be disabled with\set show_times off
. #54623 - The format used to display query execution times has been simplified. #54623
DB Console changes
Bug fixes
- Fixed a bug introduced in earlier v20.2 versions where attempting to drop a column which is referenced by multiple indexes fails to drop all relevant indexes. #54262
- Fixed a bug causing servers to crash with the message "committed txn with writeTooOld". Versions below 20.1.4 are susceptible to this bug. Versions 20.1.4+ will not crash, but instead print messages to the log files. #54280
- Fixed a bug which would cause an internal error when writing to a table with a recently (concurrent or in the same transaction)
NOT NULL
enum column. #54432 - CockroachDB now properly returns an appropriate error when the user attempts to rename a constraint to a name which conflicts with an existing index. #54430
- Fixed a bug from earlier alphas where dropping a database which contained tables using user-defined types could result in panics. #54431
- Fixed an internal error and/or panic that could occur when the
ST_Distance
orST_MaxDistance
functions were compared against a constant or variable with any type other than float. For example, previously a query with the predicateWHERE ST_Distance(g1, g2) < 10::int
could cause an error. #54395 - There was a bug in transaction statistics collection that could let the data structure grow unboundedly large. This is now fixed, and the resetting happens at the same cadence as statement statistics. #54457
- Fixed an internal error in some cases when recursive common table expressions were used. #54419
- Fixed a bug in our implementation of the Postgres wire protocol where using
CopyIn
with an extremely large message would close the TCP connection with no discernible error. This is changed to now display that the message is too big. #54187 - Starting with v20.2.0-alpha.3, CockroachDB would crash when performing an
UPSERT
with aRETURNING
clause of more than 10k rows. This is now fixed. #54490 - Fixed a bug where queries that could be automatically retried did not respect the
statement_timeout
session setting. #54370 - Fixed a bug where a failure while restoring data may have resulted in the restore job getting stuck. This bug was only present on 20.2 alphas and betas. #54447
- CockroachDB could previously crash in very rare circumstances when there were many queries running in the cluster that were consuming a lot of memory and at least one query was running via the vectorized execution engine. This is now fixed. #54404
- In a previous beta, backing up to an auto-appendable directory would not work if authentication parameters were specified in the URI. #54621
- Fixed a bug from earlier alphas whereby jobs would not properly populate their
started
timestamp. #54638 - The first timing column in the trace.txt file collected as part of a statement diagnostics bundle has been fixed. #54559
Performance improvements
- The optimizer can now use partial indexes for lookup join operations. This results in potentially more efficient query plans for joins on tables with partial indexes. #54362
- Lookup semi- and anti-joins are now explored by the optimizer in more cases when the
ON
filter implies a partial index predicate. This may lead to more efficient query plans in some cases. #54362 - Left outer spatial joins can now be index-accelerated, which can lead to performance improvements in some cases. #54110
- Spatial anti joins can now be index-accelerated, which can lead to performance improvements in some cases. #54471
Contributors
This release includes 62 merged PRs by 24 authors.
We would like to thank the following contributors from the CockroachDB community:
- Erik Grinaker