August 25, 2020
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-alpha.3
Backward-incompatible changes
- A CockroachDB node started with
cockroach start
without the--join
flag no longer automatically initializes the cluster. Thecockroach init
command is now mandatory. The auto-initialization behavior had been deprecated in version 19.2. #51245 - Clusters running alphas of 20.2 that use
ENUM
types will not be able to upgrade to betas or major releases of 20.2 due to internal representation changes. #52483 - Improved
WITH
option parsing forRESTORE
. Does not allow the same option to be specified twice, and also prevents usage of quoted option names. #52302 - The file names for heap profile dumps now use the naming scheme
memprof.<date-and-time>.<heapsize>
, where previously they were namedmemprof.<heapsize>.<date-and-time>
. #50446
General changes
cockroach node recommission
has new semantics. Previously it was able to recommission any decommissioning node, regardless of how long ago its was decommissioned, or removed from the cluster. Nowcockroach node recommission
serves to only cancel an accidental inflight decommissioning process that wasn't finalized. #50329- CPU profiles are now taken as part of the
cockroach debug zip
command. #50625 - CPU profiles taken from CockroachDB servers now contain more profiler labels related to ongoing SQL processing. #50625
- The CockroachDB tarballs now include the
libgeos
andlibgeos_c
libraries, which are required to be copied to/usr/local/lib/cockroach
for UNIX/MacOS systems to perform certain geospatial operations. The Windows location will be finalized at a later date. This location is configurable with the--geo-libs
flag tocockroach start
. #51108 - The Docker container that ships with CockroachDB now includes the GEOS library needed for geospatial functionality in
/usr/local/lib/cockroach
(which is the default location where thecockroach
binary looks for the GEOS libraries). #51392 - Timestamp functions are now supported by
IMPORT INTO
. #51390 IMPORT INTO
now supportsunique_rowid()
as a default expression. #50922- Previously, CockroachDB would spam its logs when undergoing network connectivity issues. This patch reduces the frequency of said spam. #51937
- Reverted the Go version back to 1.13. #52348
Enterprise edition changes
RESTORE
has a new optionskip_missing_sequence_owners
that must be supplied when restoring only the table/sequence that was previously a sequence owner/owned by a table. Additionally, this fixes a bug where ownership relationships would not be remapped after aRESTORE
. #50949- Disabled the use of
IMPORT
with user defined types. Users should useIMPORT INTO
instead. #51149 - Added support for
BACKUP TENANT
andRESTORE TENANT
. #50967 - Implemented a
CREATE SCHEDULE FOR BACKUP
statement which allows the creation of periodic backup schedules. #51308 - Implemented schedule control statements to pause, resume, or delete scheduled jobs. #51896
- Added support for user-defined schemas in the
IMPORT
andIMPORT INTO
statements. #51936 - Added a
FOR SCHEDULES
clause to the job control statements to enable management of the jobs created by schedules. #52038 - The
SHOW SCHEDULES
statement now displays information about the scheduled jobs. #52230 - Added the ability to display jobs started by a specified schedule. #52274
- Added a
BACKUP ... INTO
alternative toBACKUP TO
which automatically picks a new path within the destination. #52329 - The
BACKUP
statement now takes priority over other transactions if its initial attempts to export a range fail. #51624 - Exported CSV files are now prepended with a long unique ID. This can help to mitigate situations where multiple export runs are written to the same directory, resulting in mixed data. This change does not prevent mixed data; rather, it makes it possible to identify files from distinct runs, so that an operator can clean up. #52547
- Updated
IMPORT
so that it cannot be used to create tables in user-defined schemas. Users should instead create the table withCREATE TABLE
and then useIMPORT INTO
. #52729 - The
RESTORE
statement can now run in "detached" mode. That is, instead of waiting for theRESTORE
job to finish, the job ID is returned immediately, and the job itself runs in the background. #52779 - Enabled
BACKUP
andRESTORE
when user-defined schemas are in use. #52588
SQL language changes
General SQL updates
- Added support for materialized views. #52530
- Indexes are no longer required on the origin side of a foreign key relationship, and are no longer automatically created. #50771
- Added a
CREATE SCHEDULE FOR BACKUP
statement. This statement can be used to specify a recurring backup schedule. #50631 - Removed the
SYMVAR
modifier toEXPLAIN (PLAN)
. #51349 - The vectorized engine now supports the aggregate function
concat_agg
. #51148 - Disallowed row-level locking in
READ-ONLY
transactions to be consistent with Postgres behavior. #51335 - Implemented the
datetime_precision
column in theinformation_schema.columns
table for time-stored values. #51352 - The
sql.log.slow_query.latency_threshold
cluster setting now requires an explicit unit when being set. (e.g.. 500ms for 500 milliseconds, 5us for 5 nanoseconds, 5s for 5 seconds etc). An error with a hint pops up if the user fails to provide units. #50632 - Added a deprecation notice for the use of
ALTER TABLE .. RENAME
with a qualified name. #51433 - Disabled using
ALTER TABLE .. RENAME
to change the schema of a table. #51433 - Unqualified names in the target of
ALTER TABLE ... RENAME
are now treated as having the same database and schema as the table being renamed. #51433 - Interleaved table joins now show up in
EXPLAIN (PLAN)
output. #51469 - The
pg_catalog.pg_attribute
table now contains the columnsattidentity
(unimplemented) andattgenerated
(implemented, 's' for computed/generated columns). #51466 - Made a minor change to remove the outdated CCL-only message from the
GRANT
andREVOKE ROLE
help messages. #51465 - Added the
num_nulls
andnum_nonnulls
builtin functions, which count the number of arguments that are passed to them which are NULL or non-NULL, respectively. #51515 EXPLAIN (PLAN)
now shows any filter on a scan as a separatefilter
node. #51493- Added the
stddev_pop
andvar_pop
aggregate functions for population standard deviation and variance calculations. #51447 - Added support for the
idle_in_session_timeout
variable to allow automatically terminating sessions that idle past a certain threshold. #51223 - Added the cluster setting
sql.defaults.idle_in_session_timeout
for setting a defaultidle_in_session_timeout
value for new sessions. This gives users the ability to setidle_in_session_timeout
values for all newly created sessions. #51223 - Added support for renaming a value of an
ENUM
using theALTER TYPE <type> RENAME VALUE <old> TO <new>
syntax. #51490 - Exposed the MVCC timestamp of each row as a system column on the table. This column is named
crdb_internal_mvcc_timestamp
and is accessible only in a limited set of contexts. #51494 - Transactions that have modified or created a type will execute queries on the local node, rather than distributing the queries to other nodes in the cluster. #51784
- Casting
TIMESTAMP
types toTEXT
-related types now omits the timezone component. For example,'2001-12-15 15:14:13'::TIMESTAMP
will now format as'2001-12-15 15:14:13'
instead of'2001-12-15 15:14:13+00:00'
. #51692 - Added the builtin function
crdb_internal.approximate_timestamp
to convert theDECIMAL
returned from thecrdb_internal_mvcc_timestamp
system column into aTIMESTAMP
. #51662 EXPLAIN
no longer shows the "hidden" annotation for columns. #51837- Previously, matching with
LIKE
supported the "prefix" notationmatch(test%)
and "suffix" notationmatch(%test)
This commit adds the "contains" notationmatch(%test%)
. #51636 - Dropping a column always drops all indexes that index the column. It is no longer necessary to provide the
CASCADE
option toDROP COLUMN
. #51661 - The
SHOW CREATE
statement now contains the schema of a table in theCREATE
statement. #50889 - The
EXPORT
statement no longer requires an enterprise license. #52029 EXPLAIN (DISTSQL)
diagrams have been updated by switching table name with index name (previously, we had the syntaxindex@table
, and now we havetable@index
). #52085- The 'bytes' and 'rows read' metrics are now tracked with mean and variance, similar to the other per-statement metrics.
crdb_internal.node_statement_statistics
has been updated to remove thebytes_read
androws_read
columns, replacing them withbytes_read_avg
,bytes_read_var
,rows_read_avg
, androws_read_var
. #51630 - Added cosmetic improvements to
EXPLAIN
node naming. #52195 - Added support for
ALTER TABLE/SEQUENCE/VIEW SET SCHEMA
to set the schema of the table to the target schema. One must haveDROP
privileges on the table andCREATE
privileges on the schema to perform the operation. #52090 - Added support for the setting and getting of the
synchronous_commit
andenable_seqscan
variables, which do not affect any performance characteristics. These are no-ops enabled to allow certain tools to work. #52168 EXPLAIN
no longer shows grouping columns as "aggregations" for the group operator. #52232- It's now possible to specify a KMS URI or a list of KMS URIs to encrypt
BACKUP
data/manifests with by passing thekms
option toBACKUP
. #52091 - Query statistics now include the disk bytes and rows read from lookup and index joins, in addition to ordinary table scans. #52237
- The value of
pg_class.atttypmod
and the TypeModifier in the RowDescription for array columns is now the same as the type modifier of the type of the array contents. This enhances compatibility with the Postgres wire protocol. #52428 - Added support for
ALTER TABLE ... ALTER COLUMN ... SET NULL
syntax forIMPORT PGDUMP
type backups. #52442 - Added a hint for
"line too long"
errors when importing a backup with long lines. #52432 - Added "ownership" concept objects. Objects must now have an owner; all objects that do not have owners currently will have
admin
set as the default owner except system objects. System objects without owners will havenode
as their owner. By default, owners are the creator of the object. Owners have all privileges to the objects they own. Similarly, any roles that are members of the owner role also have all privileges on the object. Roles cannot be dropped if they own objects. This PR does not add support for changing the ownership of objects; that will be added in a future PR to support dropping roles. #51856 - When using
IMPORT PGDUMP
withINSERT INTO
clauses, specifying a column name that is case sensitive (e.g."cApItAls"
) would previously error specifying the column name was not found. This has been fixed. #52485 - Added the
pg_get_serial_sequence
builtin function. #52436 - Added support for the
ALTER TYPE SET SCHEMA
command to set the schema of a user-defined type. The user must haveCREATE
privileges on the schema andDROP
privileges on the type to set the schema. #52301 - Added a new statement
SHOW ENUMS
which displays information on existing enums. #52538 - Added support for the
BINARY
format forCOPY FROM
. #51890 - Previously,
IMPORT PGDUMP
usingCOPY
required all rows to be present in the same order as the table definition. This restriction has been removed. #52488 - Added a notice that is displayed to the user when she tries to add a value which already exists in an
ENUM
. #52534 - Modified
SHOW TABLES
to return estimates of the number of rows in each table. The new column's name isestimated_row_count
. The number of rows is taken from thesystem.table_statistics
table (viacrdb_internal.table_row_statistics
, which shows only tables accessible to the current user). #52203 - Implemented the
regexp_split_to_table
andregexp_split_to_array
builtin functions. #52479 - Added support for the
CREATE UNLOGGED TABLE
syntax to be parsed and recorded internally by CockroachDB. However, this syntax does not modify the behavior of the table. #52596 - Added support for the use of
CREATE INDEX ... WITH ...
syntax. #52640 "no inbound stream connection"
errors should happen less frequently due to the addition of connection retries. #52624- Extended the
RESTORE
statement to support the 'KMS' option. This can be used to decrypt encryptedBACKUP
(s). #52434 - Added support for parsing the syntax
CREATE TABLE ... WITH (autovacuum_enabled = bool)
, which results in a no-op. #52652 - Added various improvements to
EXPLAIN
. #52730 - Implemented the
ALTER SCHEMA RENAME TO
command. #52349 - The vectorized execution engine now fully supports comparison operators (things like
ILIKE
,IS NOT DISTINCT FROM
,SIMILAR TO
, and several others). #52313 - The
experimental_follower_read_timestamp()
function has been renamed tofollower_read_timestamp()
, signifying more confidence in CockroachDB's follower read implementation. The previous name remains a supported alias. #52359 - The reserved, non-documented cluster settings
server.heap_profile.*
have been renamed toserver.mem_profile.*
. They now control collection of multiple types of memory profiles besides just Go heap allocations. #50446
Spatial support updates
For instructions showing how to get started with CockroachDB Spatial, see Working with Spatial Data.
- Implemented the
ST_MakePolygon
function forGEOMETRY
types. #50979 - Added a variant of each index-backed geospatial function that is prefixed with a
_
(e.g.,ST_Covers
gets a non-index-accelerated variant called_ST_Covers
). These prefixed variants avoid using the spatial index while providing the same functionality. #51225 - Implemented the
ST_DistanceSphere
andST_DistanceSpheroid
operators forGEOMETRY
types. #51461 - Implemented the
ST_ConvexHull
function onGEOMETRY
types. #51446 - Implemented the
ST_Disjoint
builtin function forGEOMETRY
types. #51444 - Added support for the
USING GIST
syntax to create an inverted index onGEOMETRY
andGEOGRAPHY
columns. #51516 - Implemented the
ST_IsValid
,ST_IsValidReason
andST_MakeValid
operators forGEOMETRY
types. #51484 - Implemented the
ST_Force2D
functionality forGEOMETRY
types. #51514 - Updated geospatial functions that take in a string argument such that when an ambiguous function that could be referring to either
GEOMETRY
orGEOGRAPHY
types is encountered, theGEOMETRY
type is chosen. This is the case for the following functions:st_area
,st_asewkt
,st_asgeojson
,st_buffer
,st_coveredby
,st_covers
,st_distance
,st_dwithin
,st_intersects
, andst_length
. #51563 - Implemented
ST_Length2D
andST_Perimeter2D
forGEOMETRY
types. #51556 - Implemented
ST_Envelope
forGEOMETRY
types. #51604 - Added the
ST_RelatePattern
builtin function, which checks whether a given DE-9IM intersection matrix matches a given pattern. #51858 - Implemented
ST_GeoHash
forGEOMETRY
andGEOGRAPHY
types. #50611 - Implemented the
ST_Buffer
andST_Intersection
functions forGEOGRAPHY
types. #51537 - Implemented the
ST_Intersection
function forSTRING
types. #51537 - When ordering by geospatial columns, they will now be ordered by the Hilbert Space-filling Curve index so that points which are geographically similar are clustered together. #51898
- Implemented the
GEOMETRY
builtin functionST_Translate
. #51483 - Implemented the
GEOMETRY
builtin functionST_Scale
. #52350 - Implemented the
ST_MakeLine
aggregate builtin function. #52631 - Implemented the
GEOMETRY
builtin functionST_SetPoint
. #52655 - Added aliases for
GeomFromEWKT
toST_GeomFromEWKT
andGeomFromEWKB
toST_GeomFromEWKB
. #52789 - Added
ST_AsGeoJSON
for recordsets, putting row contents into the properties field of a GeoJSON object. #52715
Command-line changes
- Added a set of
statement-diag
CLI commands that can be used to manage statement diagnostics. #50924 - Introduced a
membership
column to the output generated bycockroach node status --decommission
. It should be used in favor of theis_decommissioning
column going forward. #50329 - The v20.2 CLI
cockroach node
family of subcommands will not work with servers running older versions ofcockroach
, but the v20.1 CLIcockroach node
subcommands will work against v20.2 servers. #50329 - The
is_decommissioning
column found in the output ofcockroach node decommission
is slated for removal in v20.1. Operators should instead use the newmembership
column to determine node membership status. #50329 - The
--wait
flag tocockroach node decommission
now takes any of the following values:all
waits until all target nodes' replica counts have dropped to zero and marks the nodes as fully decommissioned. This is the default.none
marks the targets as decommissioning, but does not wait for the replica counts to drop to zero before returning. If the replica counts are found to be zero, nodes are marked as fully decommissioned. Use when polling manually from an external system. #50329
- The
statement-diag
CLI command will now show all times in UTC. #51185 - Added a
userfile upload
command that can be used to upload a file to the user scoped blob storage:userfile upload source/file /destination/of/file
#50981 SIGQUIT
now causes a CockroachDB server to log its stack traces without shutting down. #50774- Added Kerberos (GSS) support to
cockroach sql
and other CLI commands that only use the SQL protocol (such asnode ls
, ornode status
). Othercockroach
CLI commands that also use the RPC protocol still cannot use Kerberos (such asnode decommission
,debug zip
, etc). #51570 - Improved the user semantics for
userfile upload
by supporting different patterns of specifying the source and destination CLI arguments. The source argument is required, while the destination argument is now optional. #51353 - Changed the Kerberos URL connection string parameters to the standard
krbsrvname
(previouslyservice
) andkrbspn
(previouslyspn
). #51947 - Updated the label used for the commit ID in the printed version info. #52263
cockroach dump
now supports dumping databases that contain user-defined schemas, as well as accepting schema-qualified table names as arguments. #52079- The
userfile
command now supports anls
command which allows users to list the files they have uploaded to the user-scoped FileTableStorage.userfile ls
accepts a single, optional CLI argument which can either be a well-formed userfile URI or a glob pattern. The latter defaults to searching in the default FileTableStorage tabledefaultdb.public.userfiles_$USERNAME
. #51482 - The
userfile
command now supports a delete command, which allows users to delete the files they have uploaded to the user-scopedFileTableStorage
.userfile delete
accepts one CLI argument which can either be a well-formed userfile URI or a glob pattern. The latter defaults to searching in the defaultFileTableStorage
tabledefaultdb.public.userfiles_$USERNAME
. #51610 - CockroachDB now better attempts to retain heap profile dumps after a crash due to an out-of-memory (OOM) error. #50446
- CockroachDB now better attempts to retain memory statistics corresponding to increases in total memory usage, not just heap allocations. #50446
- Crashes in
cockroach demo
sessions are now reported to telemetry, if telemetry is enabled. #52696
DB Console changes
- Removed the Now button for the "From" timepicker in the custom time range on the Metrics page. #51047
- Updated the node label in chart legends to make the node ID visible. #50434
- Updated DB Console database page styles to match the Cockroach Labs design system. #47753
- Updated link on login page for secure clusters to point to a moved documentation URL. #51862
- The Statement Details page now contains statistics for rows and disk bytes read. #51630
- The time range selector (on the Metrics page) now shows time in UTC instead of local time, with a "(UTC)" prefix after the time to highlight this in the UI. #51056
Bug fixes
- Fixed an internal error that occurred when
AddGeometryColumn
was called with NULL arguments. This now results in a no-op and returns NULL. #50992 - Previously, CockroachDB could crash when internal memory accounting hit a discrepancy. Now it will report an error instead. #50962
- Fixed the "column not in input" internal error in cases involving lookup semi/anti joins. #50993
- Added better support for large statement diagnostic bundles. #50974
- Previously, if there was a table
t(a int, b int)
, and a sequenceseq
that was first owned byt.a
and then altered to be owned byt.b
, it would make the tablet
impossible to drop. This is now fixed. #50720 - The
age
function previously did not normalize the duration for large day orH:M:S
values in the same way PostgreSQL does. This is now fixed. #51054 - Fixed an internal error in some cases involving
COALESCE
with NULL inputs. #51022 - Fixed a bug where very long-running incremental backups could fail if the data they were backing up was garbage collected. #51069
- Fixed a bug causing the raw trace file collected inside a statement diagnostics bundle to be sometimes empty when the cluster setting
sql.trace.txn.enable_threshold
was in use. #50914 - Prevented spurious
"SimpleQuery not allowed while in extended protocol mode"
errors. #51194 - Previously, CockroachDB could hit an internal error when executing the
regexp_replace
builtin function; this has been fixed. #51303 - Fixed an internal error involving
CASE
statements and boolean expressions with NULL operands. #51154 IMPORT
no longer fails when run in a database which has a user with privileges on the database. #51315cockroach dump
no longer fails with an error when dumping temporary tables, views, or sequences. It either ignores them or throws an informative error if the temporary object is explicitly requested to be dumped via the CLI. #51185- Fixed incorrect results in some cases involving joins on interleaved tables with limits. #51398
- Fixed a bug where
cockroach dump
would not properly escape quotes within table comments. #51463 - Fixed a bug where
cockroach dump
would not emit a correct statement for comments on indexes. #51463 - Fixed a bug in in the pgwire protocol implementation where CockroachDB would not correctly populate the
TableOID
andTableAttributeNumber
fields in theRowDescription
message of a prepared statement correctly. #51479 - Some queries in the vectorized execution engine could previously hang during cleanup. This is now fixed. #51375
- Previously, users could not drop tables or sequences with invalid internal state due to circular ownership issues. This is now fixed. #51253
- Updated the vectorized engine to show the same statistics for 'rows'/'bytes read' as the row-at-a-time engine. #51591
- Previously, CockroachDB could throw a "command is too large" error when performing
UPSERT
operations with many values. Internally, we attempted to perform such operations by splitting them into "batches", but the batching mechanism was broken. This is now fixed. #51608 - It is no longer possible for rapid range lease movement to trigger a rare assertion failure under contended workloads. The assertion contained the text:
"discovered lock by different transaction than existing lock"
. #51615 - CockroachDB now tracks the location of follower replicas for all ranges much more effectively than before. This means that more queries will be successfully served as "follower reads". #51437
- Before this change, we would leave orphaned
system.namespace
/system.descriptor
entries if we ran aDROP DATABASE CASCADE
and the database contained "dependency" relations. For example, if the database included a view which depended on a table in the database, dropping the database would result in an orphaned entry for the view. Same thing for a sequence that was used by a table in the database. (See #51782 for reproduction steps). This bug is now fixed, and cleanup of entries happens as expected. #51813 - Fixed instances of slow plans for prepared queries involving CTEs or foreign key checks. #51788
- Fixed the
"unhandled op: json-object-agg"
internal error. #51881 - CockroachDB would previously emit benign internal "context canceled" errors when queries were executed by the vectorized engine. This is now fixed. #51772
- Added better detection of invalid computed column or partial index predicates that contain context-dependent operators. #51886
- Increased robustness of
RESTORE
against descriptors which may be in an unexpected state. #51848 - Previously, CockroachDB could return incorrect results on query that encountered a
ReadWithinUncertaintyInterval
error, and this has been fixed. #51518 - Previously, a
BACKUP
job would block once it had finished backing up the data. This is now fixed. #51999 - Previously,
RESTORE
would sometimes block at the end of the job when sending its results back if the connection that started the job disconnected. This is now fixed. #51999 COPY
previously did not allow a backslash of any character other than the special table set. CockroachDB would emit an error in these cases. This behavior is changed to allow any character after a backslash and interpret it to mean the character itself to match the behavior of PostgreSQL (e.g. now\a
will be interpreted asa
). Furthermore, non hex-digits following a\x
are now interpreted without the backslash, (e.g.\xH
will be interpreted asxH
). Strings ending with a single backslash will use the backslash (e.g.x\\
is interpreted asx\
). #52068- Fixed an internal error that could occur when an aggregate function argument contained a correlated subquery with another aggregate function referencing the outer scope. This now returns an appropriate user-friendly error:
"aggregate function calls cannot be nested"
. #52092 - CockroachDB could previously crash on some queries with merge joins; this has now been fixed. #52042
- Resolved an internal error that occurred with 0-argument builtin functions in the vectorized engine. #52103
- Previously, subtracting months from a
TIMESTAMP
/DATE
/TIMESTAMPTZ
whose date value was greater than 28 could subtract a further year off. This is now fixed. #52138 - Fixed an issue where large write requests no longer have a chance of erroneously throwing a
"transaction with sequence has a different value"
error. #52234 - Previously, shutting down a connection with an open transaction that had active temporary tables caused deadlocks or general brokenness. This was because the table cleanup was done inside of the open transaction. This commit moves the table cleanup to be after the user transaction is shut down. #52148
- Fixed a rare bug that could cause actionable closed timestamps to effectively regress over a given keyspan. This could in turn lead to a serializability violation when using follower reads. This was due to ill-defined interactions between range merges and the closed timestamp subsystem. #50265
- Updated the functions
crdb_version()
andversion()
to return the same result. #52032 - Fixed a bug with the temporary object cleaner where it was stuck trying to remove objects that it mistakenly thought were temporary. Note that no persistent data was deleted -- the temporary cleaner simply errored out because it thought certain persistent data was temporary. #51359
- Fixed a bug when using the
COPY
protocol which could prevent schema changes for up to 5 minutes. #52384 - Previously, CockroachDB would erroneously restart the execution of empty, unclosed portals after they had been fully exhausted. This has been fixed. #48842
- Updated
IMPORT PGDUMP
andIMPORT MYSQLDUMP
to reject specifying multiple files. #52500 - Fixed an internal error involving string literals used as arrays. #52416
- Fixed a bug where jobs could fail to run during version upgrades. #52475
- Don't display a value for
gc.ttlseconds
in the DB Console if it is not set. #52721 - Updated CockroachDB's handling of an unknown condition that would previously crash a node with the message
"committed txn with writeTooOld err"
. This condition no longer crashes a node; instead, an error message is printed to the logs asking for help in the investigation. #51619
Performance improvements
SELECT IN
performance on longer filter rows was improved in the vectorized engine by replacing a linear scan with binary search. #50337- Improved the efficiency of garbage collection when there are a large number of versions of a single key, commonly found when utilizing sequences. #51184
- Scans over the virtual table
pg_type
by the OID column have improved performance in common cases. #51374 - Queries no longer block during planning if cached table statistics have become stale and the new statistics have not yet been loaded. Instead, the stale statistics are used for planning until the new statistics have been loaded. This improves performance because it prevents latency spikes that may occur if there is a delay in loading the new statistics. #51616
- Modified the cardinality estimate for index-accelerated geospatial functions to make it more likely for the optimizer to choose a geospatial inverted index join during query planning. This results in more efficient plans in most cases. #51963
- Added support for performing joins using geospatial inverted indexes in a wider variety of cases. Complex boolean predicates combining multiple index-accelerated geospatial functions are now supported as join conditions. #52376
- Previously, histogram statistics were only collected for the first column of each index. Now they are collected for each indexed column, allowing the optimizer to more accurately estimate costs of query plans. #52448
- Unnecessary mutex contention observed in heavy read workloads has been removed. #51055
- Ranges recover moderately faster when their leaseholder is briefly down before becoming live again. #51888
Contributors
This release includes 634 merged PRs by 59 authors.
We would like to thank the following contributors from the CockroachDB community:
- Andrii Vorobiov
- Eugene Kalinin (first-time contributor)
- Juan Carlos (first-time contributor)
- Vaibhav (first-time contributor)
- Vincent Xiao (first-time contributor)
- Yongyang Lai
- dujin (first-time contributor)
- himanshuchawla009 (first-time contributor)
- manhhiep92 (first-time contributor)
- xuhui-lu (first-time contributor)