Release Notes for v19.2.2

Hi All,

This week we released v19.2.2

To download the release click here.

General changes

  • Improved the consistency checker's log output. #42149
  • Nodes that have been terminated as the result of a failed consistency check now refuse to restart, making it more likely that the operator notices that there is a persistent issue in a timely manner. #42149
  • Client usernames can now be defined to start with a digit; in particular, all-digit usernames are now permitted. #42989
  • To curb the spread of corrupted data, outliers are now terminated when the replicas within a range are corrupted. Previously, the leaseholder replica would terminate, regardless of which replicas disagreed with each other. #42149

Enterprise edition changes

  • RESTORE now supports the restoration of empty databases. #42733

SQL language changes

  • Added the ability to run avg() over intervals. #42679
  • Some columns (typinput, typoutput, typreceive, typsend, typmodin, typmodout, typanalyze) in pg_type were incorrectly typed as OID instead of REGPROC. This issue has been resolved. #42784
  • It is now valid for SELECT and HAVING to refer to ungrouped columns in the special case when the grouped columns contain the primary key of the table containing the ungrouped column. #42694
  • It is now supported to specify selection target aliases as GROUP BY columns. Note that the FROM columns take precedence over the aliases, which are only used if there is no column with that name in the current scope. #42694
  • CockroachDB will now report a more accurate error message, hint, and error code if an error is encountered while adding a new column. #42530

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. #42726
  • The event log now presents all cluster settings changes, unredacted, when an admin user uses the page. #42726
  • 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. #42726
  • Access to table statistics are temporarily blocked from access by non-admin users until further notice, for security reasons. #42726
  • Certain debug pages have been blocked from non-admin users for security reasons. #42726

Bug fixes

  • The TIMESTAMP data type is now fully supported by the vectorized engine. Previously, an "unsupported type" error was thrown. #42576
  • Previously, casting the same type into two or more different precisions/widths from a table in the same SELECT query would result in only the first precision specified. For example, SELECT a::decimal(10, 3), a::decimal(10, 1) FROM t would return both results as a::decimal(10, 3). This PR fixes that behavior. #42578
  • 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. #42651
  • It is now possible to transfer range leases to lagging replicas. #42761
  • Long running transactions which attempt to TRUNCATE can now be pushed and will commit in cases where they previously failed or retried forever. #42772
  • Fixed a case in which CockroachDB incorrectly determined that a query (or part of a query) that contains an IS NULL constraint on a unique index column returns at most one row, possibly ignoring a LIMIT 1 clause. #42791
  • 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. #42838
  • Fixed a bug with incorrect handling of Top K sort by the vectorized engine when K is greater than 1024. #42843
  • Prevent internal error in some cases when a NULL literal is passed to the OVERLAPS operator #42878
  • Fixed a bug that caused rare crashes when using built-in functions. #42674
  • Other callers to acquireNodeLease now do not get erroneously cancelled just because the context of the first caller was cancelled. #42893
  • Changefeeds now emit backfill row updates for a dropped column when the table descriptor drops that column. #42669
  • Tables that are being restored or imported are no longer considered valid targets in backups and changefeeds. #42735
  • Fixed a bug where selecting columns by forcing an INTERLEAVING index would return an error instead of returning the correct results. #42901
  • CockroachDB now prevents a number of panics from the SQL layer caused by an invalid range split. These would usually manifest with messages containing encoding errors like "found null on not null column". #42859
  • Fixed the row count estimate during query planning for some queries with multiple predicates in which the selectivity of one predicate was calculated using a histogram. #42962
  • Previously, when executing a built-in function via the vectorized engine that returns an output type unsupported by the vectorized engine, CockroachDB could return an error instead of falling back to the row-by-row execution engine. This is now fixed. #42990
  • Empty arrays are now correctly encoded and decoded over the binary protocol. #42974
  • Fixed some existing caching issues surrounding role memberships, where users could sometimes see out-of-date role membership information. #43004
  • Previously, attempting to parse 0000-01-01 00:00 when involving time did not work as pgdate does not understand 0000 as a year. This is now fixed. #42918
  • The allocator now considers stores with very close diversity scores equal (all other things being the same) and doesn't attempt to rebalance. #43077
  • The allocator now considers the new store being added when looking for a target in the case of a rebalance. #43077
  • CockroachDB did not previously handle date casts from TIMESTAMP/TIMESTAMPZ with time attached for times before the UNIX epoch correctly. For example, '1969-12-30 01:00:00'::timestamp would round to '1969-12-31' instead of '1969-12-30'. This is now fixed. #43022
  • CockroachDB is now less likely to hang in an inconvenient or inoperative state if it attempts to access an external HTTP server that is blocked or overloaded. Nodes failing to shut down with cockroach quit were a symptom of this bug. #42539


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