What's new in CockroachDB beta-20170406
Happy Thursday!
You can download the new beta here.
Cheers,
The Cockroach Labs Team
-----------------------------------
Backwards-Incompatible ChangesThe implementation of indexing for collated string columns has changed. Any secondary indexes containing collated strings must be dropped before upgrading to this version and then re-created after upgrading. Note that this applies only to secondary indexes, not to primary indexes. #14528
-
Any row with a
-0
FLOAT
orDECIMAL
value in a primary key or index must be deleted before upgrading to this version and then re-inserted after upgrading. Otherwise, the row containing-0
will show up during table scans, but it will not be possible to delete it or select it as part of an index scan.If you suspect
-0
values are present but don’t know where, an alternative approach is to usecockroach dump
to back up tables withFLOAT
orDECIMAL
columns, drop the tables before upgrading, and then use the backup files to recreate the tables and indexes after upgrading. #14528 The
experimental_strptime
andexperimental_strftime
functions are deprecated and will be removed in a future release. If you are currently using these functions, please let us know here.
SQL Language Changes
- SQL variables can now be reset to their default values with the
RESET
statement orSET x TO DEFAULT
. #14105 - Schema changes within transactions are now restricted. Certain combinations of schema changes with other statements (which would previously hang) will now return an error. It is recommended that DDL statements be issued outside of transactions, or as the only statement within a transaction. #14368
-
ROLLBACK TO SAVEPOINT
is now allowed at any time, not only after receiving a “retry transaction” error. #14538 -
SHOW TRANSACTION ISOLATION
andSHOW TRANSACTION PRIORITY
are now only allowed during a transaction. #14491 - SQL user names are now required to start with a letter, contain only letters, numbers, and underscores, and be no longer than 63 characters. #14525
- The
BYTES
type name is now reported asbytea
inpg_catalog.pg_type
for compatibility with PostgreSQL. #14495 - The PostgreSQL type IO functions (like
int8in
,int8out
,int8send
, andint8recv
) have dummy implementations for compatibility with some ORMs. #14529
Command-Line Interface Changes
- Command history no longer corrupts previous commands when normalizing them. #14496
- The
cockroach start
no longer uses theCOCKROACH_PORT
environment variable; the port must be set on the server’s command line (similar to--host
and other flags). #14612
Admin UI Changes
- The Node List page has been improved. #14395
- A new
node-id
metric with labels for the node’s address is now exported for use in external monitoring systems. #14544
Performance Improvements
- A single
TimestampCache
is now shared by all replicas on a store, providing better control over memory usage and better support for large transactions. #14489 - Reduced memory used by the
TimestampCache
. #14516 #14514 - Replica garbage collection is now much more efficient. #14391
- Adding and dropping columns now uses the distributed SQL engine. #14331
Bug Fixes
-
INSERT ON CONFLICT DO UPDATE
no longer uses an error-prone optimization. TheUPSERT
statement is now faster than the equivalentINSERT ON CONFLICT DO UPDATE
statement. #14485 - Joining nodes of two different clusters is now detected more reliably. #14475
- Fixed a panic during prepared
UPDATE
statements. #14481 -
FLOAT
andDECIMAL
values in primary keys and indexes now consider0
and-0
equal (although the sign will correctly be retained). #14528 -
DECIMAL
values in primary keys and indexes no longer have zeros truncated. If a secondary index contains aDECIMAL
value with trailing zeros, you can drop and re-create the index to have the value returned correctly when the index is used. #14528
Doc Updates
- Expanded the Build a Ruby App with CockroachDB tutorial to feature the ActiveRecord ORM. #1234
- Clarified the
--store
flag in thecockroach start
documentation. #1243 - Updated the build from source instructions to use a source tarball instead of the
cockroach
GitHub repository. The source tarball downloads faster and doesn’t need to be extracted in theGOPATH
. Developers who want to contribute to CockroachDB should use the instructions in CONTRIBUTING.md instead. #1209
Contributors
This release includes 88 merged PRs by 22 authors. We would like to thank the following contributors from the CockroachDB community, especially first-time contributor Daniel Upton.
- Christian Meunier
- Daniel Upton