Version 6.5.0¶
Released on 2026-10-13.
Note
If you are upgrading a cluster, you must be running CrateDB 5.0.0 or higher before you upgrade to 6.5.0.
We recommend that you upgrade to the latest 6.4 release before moving to 6.5.0.
A rolling upgrade from >= 6.4.0 to 6.5.0 is supported. 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¶
The PostgreSQL type mapping of CrateDB’s
bytetype changed from"char"(OID 18) toint2(OID 21). Clients now receivebytecolumns asint2in both text and binary formats.Most clients reading data determine the type of a column dynamically, and are largely unaffected. With
pgjdbc,ResultSet’sgetString()andgetByte()return the same results as before.getObject()now returns aShortinstead of aString.The CrateDB JDBC driver is unaffected:
getObject()returns anIntegeras it did before.Changed the type mapping of PostgreSQL’s
"char"type frombyteto character(1).Before:
CREATE TABLE tbl (col "char");was equal toCREATE TABLE tbl (col byte);After:
CREATE TABLE tbl (col "char");is equal toCREATE TABLE tbl (col character(1));Existing tables are not affected. For new tables the
character(1)column will reject byte values, which are valid for abytecolumn:INSERT INTO tbl (col) VALUES (65); SQLParseException[‘65’ is too long for the character type of length: 1]
This improves compatibility with PostgreSQL: In cases where a PostgreSQL client sets the parameter type hint to OID 18 (
"char"), and casts the value tocharacterorvarchar, the byte encoded"char"value is now correctly interpreted as ASCII decimal 65, resulting in"A". Before it interpreted65as a character sequence, resulting in a"65"string.The query plan that EXPLAIN displays no longer shows operands in the order as written in the query. This is because operands are now normalized to be in lexicographic order. This enables deduplication of symmetrical join conditions (i.e.
a = bis identical tob = a). Query results are not affected.Removed the
USERSandPRIVILEGESkeywords for the RESTORE SNAPSHOT statement, which have been deprecated since 5.6.0. UseUSERMANAGEMENTinstead.Added copy_from.http.redirects and copy_from.http.blocked_hosts settings to allow CrateDB administrators to prevent users from accessing HTTP resources from hosts reachable on an internal network or other arbitrary hosts using COPY FROM. For more information see the relevant security advisory.
The
crate.ymlshipped with the CrateDB tarball sets the blocked hosts to_local_,_site_,_link_and disables redirects by default. On new installationsCOPY FROMstatements trying to access these blocked hosts will therefore fail.Existing installations aren’t affected unless the
crate.ymlconfiguration file is changed as part of the update - which we do recommend for improved security.
Deprecations¶
None
Changes¶
SQL Statements¶
Manish Singh added support for dropping multiple tables with a single DROP TABLE statement, e.g.
DROP TABLE t1, t2, t3.
SQL Standard and PostgreSQL Compatibility¶
Manish Singh added the
pg_is_in_recovery()scalar function for improved compatibility with PostgreSQL tools. It returnstruewhen the cluster health isREDandfalseotherwise.
Data Types¶
Dhruv Patel added support for using date as a column type in
CREATE TABLEstatements, enabling migration of PostgreSQL schemas containingDATEcolumns without DDL modification.
Scalar and Aggregation Functions¶
Gaurav K Ohri added support for the regexp_match scalar.
Performance and Resilience Improvements¶
Dhruv Patel improved query planning by normalizing a double negation to the predicate it negates, so that
NOT NOT <predicate>is now optimized the same way as<predicate>. Previously the redundant negation made the predicate opaque to the optimizer. For example, inWHERE NOT NOT (a = 1 AND b = 2)theANDwas no longer visible, so neither part could be pushed down to the relation it belongs to.Re-added the change to swapping and renaming of tables to no longer re-allocate the shards of the swapped/renamed table, so that in-progress snapshots can finish successfully. Previously, the in-progress snapshots would fail and remain in
PARTIALstate, with anABORTEDfailure message showing in the sys.snapshots system table.Bing O’Dowd improved query planning by deduplicating identical join conditions joined by the
ANDoperator.Improved the performance of
GROUP BYqueries onSTRINGcolumns with doc values enabled: aggregation values are now read directly from doc values where possible. Benchmarks showed a performance increase that can exceed 100%, but this depends on the number of such columns in theGROUP BYclause and by their combined cardinality in the table.Somil Jain improved metadata query performance by caching analyzed
ViewInfoinstances, reducing repeated analysis of view definitions when accessinginformation_schemaviews.Improved DELETE, DROP TABLE, DROP COLUMN, ADD COLUMN, RENAME COLUMN, SET/DROP DEFAULT, DROP CONSTRAINT, SET/RESET and REROUTE such that concurrent SWAP TABLE cannot affect aforementioned queries already in progress.
Improved RENAME TABLE to fail if the source relation name points to a different table while the statement is being executed.
Improved SWAP TABLE to fail if the source or target relation name points to a different table while the statement is being executed.
Added an optimization for
count(DISTINCT col)queries without aGROUP BY, wherecolis a string column. Such a query is now rewritten to group bycol, so that it is executed like:SELECT count(col) FROM (SELECT col FROM tbl GROUP BY col) tmp
In our benchmarks this improvement made certain queries up to 21x faster. The amount of improvement you’ll see depends on the column’s cardinality.
If multiple such aggregates reference different columns, each one is deduplicated on its own, e.g.:
SELECT count(DISTINCT "cCode"), count(DISTINCT "sourceIP") FROM uservisits
is executed like:
SELECT a.c, b.c FROM (SELECT count("cCode") AS c FROM (SELECT "cCode" FROM uservisits GROUP BY "cCode") d1) a CROSS JOIN (SELECT count("sourceIP") AS c FROM (SELECT "sourceIP" FROM uservisits GROUP BY "sourceIP") d2) b
Our benchmarks have shown a decrease of 36% in query time for a mix of low-cardinality and high-cardinality columns. The rule currently applies based on table size (up to 6.6 million rows) rather than column cardinality.
Somil Jain added support for collecting table-level statistics for foreign tables during
ANALYZE, enabling the query planner to make better decisions based on estimated row counts and table sizes.Optimized keys-only
GROUP BYqueries for text columns without a filter (e.g.SELECT text_column from tbl GROUP BY text_column) by utilizing Lucene’s term dictionary. Such queries now take 41% less time to complete in our benchmark for high-cardinality columns.
Administration and Operations¶
Added support for OpenID Connect Discovery to the JWT authentication method. The
issvalue of a user’s JWT properties or of the JWT Based Authentication can now be the issuer identifier of a standard OpenID Connect provider, instead of the URL of its JWK endpoint. CrateDB then requests<iss>/.well-known/openid-configurationand reads the JWK endpoint URL from thejwks_urifield of the discovery document.Issuers that do not serve a discovery document are unaffected: CrateDB falls back to using
issas the JWK endpoint URL directly.
Client interfaces¶
Increased the PostgreSQL wire protocol version announced to clients from
14to15, since14is being deprecated in November.
SQL Standard and PostgreSQL Compatibility¶
Somil Jain added the
information_schema.constraint_column_usageview to improve PostgreSQL compatibility with tools that introspect database metadata.Somil Jain added support for concatenating bitstrings using the concat function or the
||operator.