Version 6.2.0¶
Released on 2026-01-13.
Warning
Do not use this version when upgrading from any previous version containing tables created before Version 5.5.0 as this may result in data loss!
If the cluster contains tables created before Version 5.5.0, after
upgrading to Version 6.2.0 certain actions on such tables like
deleting partitions, changing settings, rename, swap, etc. can lead to
corrupted table which causes all the data of the columns created
in versions before Version 5.5.0 to be shown as NULL. The bug
has been fixed in Version 6.2.6, so we highly recommend to avoid
upgrading to any earlier 6.2.x version.
Once already affected by the bug, existing data may be lost forever, while
new data (via INSERT or UPDATE) can be retrieved normally.
Note
If you are upgrading a cluster, you must be running CrateDB 5.0.0 or higher before you upgrade to 6.2.0.
We recommend that you upgrade to the latest 6.1 release before moving to 6.2.0.
A rolling upgrade from >= 6.1.2 to 6.2.0 is supported. Doing a rolling upgrade from an earlier version than 6.1.2 can cause runtime errors when executing statements relying on implicit casts.
Before upgrading, you should back up your data.
Warning
Tables that were created before CrateDB 5.x will not function with 6.x and must be recreated before moving to 6.x.x.
You can recreate tables using COPY TO and COPY FROM or by
inserting the data into a new table.
Table of contents
Breaking Changes¶
Changed
SHOW <parameter_name>to use theparameter_nameas column name in the result set instead of using a fixedsettingcolumn name to match the behavior of PostgreSQL.Changed the detailed http error code for the
Duplicate Objecterror from4100to40910as it is a conflict.Changed the detailed http error code for the
Query killederror from5030to5005as it is an internal server error.
Changes¶
SQL Statements¶
Added support for the CREATE SCHEMA and DROP SCHEMA statements.
SQL Standard and PostgreSQL Compatibility¶
Added a
client_encodingsession setting. The only supported value isUTF8. Other values are not supported and will continue to result in INFO log message that the SET SESSION statement is ignored.Columns names prefixed with an underscore are now accepted, although their use is still discouraged to avoid conflicts in case future CrateDB versions introduce additional system columns.
As a side effect of this change, using the existing system columns in write operations now causes an error instead of silently discarding the values.
For example, in earlier versions the behavior was as follows:
cr> create table tbl (x int); cr> insert into tbl (x, _id, _version, _seq_no) values (1, 100, 200, 300); cr> refresh table tbl; cr> select *, _id, _version, _seq_no from tbl; +---+----------------------+----------+---------+ | x | _id | _version | _seq_no | +---+----------------------+----------+---------+ | 1 | Szu9JZoBFWbuMAwIJry8 | 1 | 0 | +---+----------------------+----------+---------+
In 6.2.0 the
INSERT INTOstatement results in an error:cr> insert into tbl (x, _id, _version, _seq_no) values (1, 100, 200, 300); InvalidColumnNameException["_id" Cannot write to system column]
Added support for selecting more than one column within a subquery used in a
EXISTSclause.Implemented protocol version negotiation support in the PostgresSQL wire protocol, adding support for clients initially requesting higher minor versions than the server supports. The client is expected to downgrade it’s used minor version in such cases.
Data Types¶
Added support for the UUID type.
Scalar and Aggregation Functions¶
None
Performance and Resilience Improvements¶
Added heuristics to clear the SQL parsers internal cache on memory pressure. This should help on clusters where users run hundreds of thousands of unique SQL statements, leading to the parser cache taking up a significant amount of memory.
Added an optimization rule to push down query predicates in cases where the child relation is using scalar sub-queries.
For example, given the following setup:
CREATE TABLE t1 (x int, y int); CREATE TABLE t2 (a int, b int); CREATE VIEW v1 AS SELECT * FROM t1 where x in (select a from t2)
A query on the view is now pushed down to
t1to utilize its indices:SELECT * from v1 where y = 10
Reduced the memory footprint of the internal state used in the hyperloglog_distinct aggregation. This should help if using the aggregation together with a GROUP BY with many unique keys.
Administration and Operations¶
Added a
WITHclause with atimeoutproperty to ALTER TABLE .. SET.Enabled TCP fallback for SRV DNS queries used when Node Discovery via DNS is enabled.
Added a
primaryflag to ShardInfo to expose whether the shard is primary or replica.Added columns
is_master, androlesto sys.nodes, which expose which is the currentmasternode of the cluster, and what are the roles of the node in the cluster (master_eligibleand/ordata). Additionally, exposed this info is through NodeInfo. To export them to a Prometheus format, you must use the latest version1.2.3of the jmx_exporter.Added the column
column_details['oid']to the information_schema.columns view. A column’soidis an internal identifier for each column of a table. It’s unique inside a table and used in some rather internal column representation. Some exceptions or information like anANALYZEoutput exposing this identifier instead of a column name. Using this new column helps to lookup the column name by itsoidin such situations.Added the
refresh_statsandmerge_statscolumns to the sys.shards table.Added
total_affected_row_countto the QueryStats JMX MBean and the sys.jobs_metrics table, grouped by query type.
Client interfaces¶
Added more detailed errors and their corresponding http error codes for some of which were previously mapped to generic error.