What's New in v19.2.7

This version of CockroachDB is no longer supported. For more details, see the Release Support Policy.

May 20, 2020

This page lists additions and changes in v19.2.7 since v19.2.6.


A denial-of-service (DoS) vulnerability is present in CockroachDB v19.2.0 - v19.2.11 due to a bug in protobuf. This is resolved in CockroachDB v19.2.12 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.


Cockroach Labs has discovered a bug relating to incremental backups, for CockroachDB v19.2.0 - v19.2.12. 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.

Users are advised to upgrade to v20.1.15 or v20.2.8 or later, which includes resolutions.

For more information, including other affected versions, see Technical Advisory 63162.

Get future release notes emailed to you:


Docker image

$ docker pull cockroachdb/cockroach:v19.2.7

Backward-incompatible changes

  • Prior to this patch, the phase of server shutdown responsible for range lease transfers to other nodes would give up after 10000 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 duration server.shutdown.lease_transfer_wait applies. #47691
  • The textual error and warning messages displayed by cockroach quit under various circumstances have been updated. The message ok still indicates that the operation has likely succeeded. #47691
  • 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 the standard error stream. #47691
  • The copy of system and crdb_internal tables extracted by cockroach debug zip is now written using the TSV format (inside the ZIP file), instead of an ASCII-art table as previously. #48098

General changes

  • Prior to this patch, the phase of server shutdown responsible for range lease transfers to other nodes had a hard timeout of 5 seconds. This timeout is now configurable with the new cluster setting server.shutdown.lease_transfer_wait. #47691

SQL language changes

  • Columns in the process of being added or removed to a table are now always set to their default or computed value if another transaction concurrently inserts, updates, or upserts a row. This fixes an issue where a column being backfilled would not be properly set by concurrent transactions. #47411
  • The pg_collation, pg_proc, and pg_type tables in pg_catalog no longer require privileges on any database in order for the data to be visible. #48081
  • Histogram collection with CREATE STATISTICS is no longer supported on columns with type ARRAY. Only row count, distinct count, and null count are collected for ARRAY-type columns. #48344
  • CockroachDB now correctly reports the type length for the CHAR data type. #48643

Command-line changes

  • The time that cockroach quit waits client-side for the node to drain (i.e., remove existing clients and push range leases away) is now configurable with the flag --drain-wait. The default value for --drain-wait is 10 minutes. Note that separate server-side timeouts still apply. Check the server.shutdown.* cluster settings for details. #47691
  • It is now possible to drain a node without shutting down the process, using cockroach node drain. This makes it easier to integrate CockroachDB with service managers and orchestration. It is safe to issue cockroach node drain and then separately stop the service via a process manager or orchestrator. Without this new command, there is a risk of misconfiguring the service manager to auto-restart the node after it shuts down via cockroach quit. cockroach node drain also recognizes the new --drain-wait flag. #47691
  • The commands cockroach quit and cockroach node drain now report a "work remaining" metric on their standard error stream. The value reduces until it reaches 0 to indicate that the graceful shutdown has completed server-side. #47691
  • To support clusters that have been configured to use a cluster name, client commands such as cockroach init and cockroach quit now support the --cluster-name and --disable-cluster-name-verification flags. Previously it was impossible to run such commands against nodes configured with the --cluster-name flag. #48017
  • cockroach debug zip now properly skips over fully decommissioned nodes. #48095
  • cockroach debug zip now tries multiple times to retrieve data using SQL if it encounters retry errors. #48098
  • cockroach debug zip now supports two command-line parameters: --nodes and --exclude-nodes. When specified, they control which nodes are inspected when gathering the data. This makes it possible to focus on a group of nodes of interest in a large cluster, or to exclude nodes that cockroach debug zip would have trouble reaching otherwise. Both flags accept a list of individual node IDs or ranges of node IDs, e.g., --nodes=1,10,13-15. #48098

Bug fixes

  • Previously, CockroachDB could incorrectly consider a non-NULL value from an interleaved parent table to be NULL when the interleaved child has a NULL value in the row with the corresponding index key. This bug has been fixed. #47104
  • A data race on AST nodes for SELECT statements that include a WINDOW definition has been fixed. Previously, these queries could have returned incorrect results. #47176
  • Previously, a panic could occur when SHOW RANGES or SHOW RANGE FOR ROW was called with a virtual table. This bug has been fixed. #47516
  • Fixed incorrect results that could occur when casting negative intervals or timestamps to type decimal. #47521
  • Previously, when the query was executed with the row-by-row engine, CockroachDB could incorrectly return no output instead of returning a parsing error in queries with count(*). This bug has been fixed. #47486
  • Previously, CockroachDB incorrectly released the memory used in hash aggregation operations, which could lead to node crashes. This bug has been fixed. #47519
  • Previously, PARTITION BY and ORDER BY columns in window specifications lost qualifications when used inside views. This bug has been fixed. #47716
  • Fixed a bug where target column specifications in IMPORT INTO were ignored. #47796
  • Columns named with reserved keywords and/or other special characters are now correctly handled. #47796
  • CockroachDB will now avoid producing a severe "internal error" upon certain privilege check failures with pg_catalog built-in functions. #48243
  • Fixed a bug causing cascading deletes to fail when deleting thousands of rows across interleaved tables. #48287
  • Fixed a rare bug that could lead to data corruption or data loss if a replica was both the source of a snapshot, was being concurrently removed from the range, and if certain specific conditions exist inside RocksDB. #48319
  • Fixed a rare bug where stats were not automatically generated for a new table. #48028
  • Fixed a rare bug where stats refreshes could fail. CockroachDB now triggers stats refreshing after completing an import job, after the transaction finishes the job commits. #48028
  • Fixed an error that occurred when statistics collection was explicitly requested on a column with type ARRAY. #48344
  • Fixed a rare bug causing a range to deadlock and all the writes to the respective range to timeout. #48304
  • Fixed a bug causing HTTP requests to fail with error 503 "transport: authentication handshake failed: io: read/write on closed pipe" and continue failing until the node was restarted. #48482
  • cockroach debug zip can now successfully avoid out-of-memory errors when extracting very large system or crdb_internal tables. #48098
  • cockroach debug zip will now properly report an error if an error is encountered while writing the end of the output ZIP file. #48098
  • Fixed a bug that caused vectorized queries on composite data types to occasionally return invalid data. #48464
  • Previously, SHOW STATISTICS USING JSON output contained incorrect single quotes for strings with spaces inside histograms. This bug has been fixed. #48545
  • Fixed a bug preventing timestamps from being closed, which could result in failed follower reads or failure to observe resolved timestamps in changefeeds. #48683
  • Fixed a bug that falsely indicated that kv.closed_timestamp.max_behind_nanos was almost always growing. #48690
  • CockroachDB now prevents dropping databases that contain tables that are currently offline due to IMPORT or RESTORE. Previously, dropping a database in this state could lead to a corrupted schema, which prevented running backups. #48612
  • Fixed a bug that caused cockroach dump to erroneously include an additional CREATE UNIQUE INDEX "primary" ... INTERLEAVE IN PARENT statement in the dump output on tables with interleaved primary keys. This bug made it impossible to re-import dumped data without manual editing. #48777
  • Fixed a bug that caused SHOW CREATE statements to sometimes show a partitioning step for an index that was previously dropped. #48767
  • Fixed a bug that caused changefeeds that were created with a cursor, and that encounter a retryable error before writing their first checkpoint, to perform full-table backfills upon restart. #48752
  • Fixed a bug that could cause canceled changefeeds to not stop. #48752

Performance improvements

  • Fixed a bug in the histogram filtering logic of the optimizer which was causing inaccurate cardinality estimates for queries with equality predicates on UUIDs and strings, as well as some other types. This bug has existed since histograms were first introduced into the optimizer in the v19.2.0 release. Fixing it improves the optimizer's cardinality estimates and results in better query plans in some cases. #48625
  • Histograms used by the optimizer for query planning now have more accurate row counts per histogram bucket, particularly for columns that have many NULL values. This results in better plans in some cases. #48645
  • Fixed a performance inefficiency in the vectorized execution engine. This fix speeds up all queries that are executed with the vectorized engine, with most noticeable gains on the queries that output many rows. #48733


This release includes 47 merged PRs by 21 authors. We would like to thank the following contributors from the CockroachDB community:

  • Artem Barger (first-time contributor)
  • Jason Brown (first-time contributor)
YesYes NoNo