What's New in beta-20160414

Apr 14, 2016

Get future release notes emailed to you:


Backwards-incompatible Changes

  • Any databases using the DECIMAL type will need to be deleted and created from scratch. Columns of this type were encoded incorrectly in older beta releases. (Again! We apologize for the inconvenience.) #5994
  • The SQL function transaction_timestamp_unique has been removed in favor of the new cluster_logical_timestamp function described below.

New Features

  • ALTER TABLE supports several new operations: ADD COLUMN with a default value (#5759), ALTER COLUMN SET DEFAULT, ALTER COLUMN DROP DEFAULT, and ALTER COLUMN DROP NOT NULL (#5947)
  • The TIMESTAMPTZ type is now accepted as an alias for TIMESTAMP for compatibility with PostgreSQL; our TIMESTAMP type already supports time zones in the same way as PostgreSQL's TIMESTAMPTZ. #5893
  • The STRING type now accepts a length parameter (e.g., STRING(50)), similar to CHAR and VARCHAR. #5918
  • The LIMIT clause now accepts placeholders. #5977
  • The RETURNING clause of INSERT, DELETE, and UPDATE statements now accepts placeholders. #5934
  • When sending queries to the cockroach sql tool via stdin, a terminating semicolon is not required and instructions for interactive mode are no longer printed (similar to the existing behavior of -e). #5988
  • The experimental_uuid_v4() SQL function has been renamed to uuid_v4(). The old name remains as a deprecated alias. #5886

Performance Improvements

  • Reduced the number of files created in the data directory, and fixed issues in which the process could run out of file descriptors. #5888
  • Introduced a special fast path for transactions that are contained entirely within one range. #5966
  • Reduced the number of unnecessary network round trips by ensuring that the range lease holder and the raft leader coincide. #5973

Bug Fixes

  • The gossip system no longer recommends redundant forwarding addresses, which could prevent the cluster from fully connecting. #5901
  • Timestamps are now correctly reported in the network protocol as having time zone offsets. #5909
  • Buffered data is now flushed to the network immediately on error. #5909
  • Timeseries data no longer diverges across replicas. #5905

Internal Changes

  • SQL functions related to the current time (now, current_timestamp, statement_timestamp, statement_timestamp) now use the clock of the node that executed them instead of a timestamp derived from the internal hybrid logical clock. This means that these functions are less likely to produce duplicate values, but it is more likely for one transaction to see a timestamp that is less than a timestamp already seen in another transaction. Applications that require a globally monotonic timestamp-like value can use the new function cluster_logical_timestamp instead. #5805
  • New HTTP endpoint /debug/metrics exposes internal metric data in JSON format. #5894
  • Logs are no longer written to stderr by default, only to the logs subdirectory of the data directory. #5979


This release includes 58 merged PRs by 18 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Andrey Shinkevich.

  • Andrey Shinkevich
  • Kenji Kaneda
  • Seif Lotfy
  • es-chow
YesYes NoNo