The releases on this page are testing releases, not supported or intended for production environments. The new features and bug fixes noted on this page may not yet be documented across CockroachDB’s documentation.
- CockroachDB self-hosted: All v26.3 testing binaries and Docker images are available for download.
- CockroachDB Advanced: v26.3 testing releases are not yet available.
- CockroachDB Standard and Basic: v26.3 testing releases are not available.
When v26.3 becomes Generally Available (GA), a new v26.3.0 section on this page will describe key features and additional upgrade considerations.
CockroachDB v26.3 is in active development, and the following testing releases are intended for testing and experimentation only, and are not qualified for production environments or eligible for support or uptime SLA commitments. When CockroachDB v26.3 is Generally Available (GA), production releases will also be announced on this page.
- For details about the support window for this release type, review the Release Support Policy.
For details about all supported releases, the release schedule, and licenses, refer to CockroachDB Releases Overview.
After downloading a supported CockroachDB binary, learn how to install CockroachDB or upgrade your cluster.
Get future release notes emailed to you:
v26.3.0-alpha.1
Release Date: June 10, 2026
Downloads
CockroachDB v26.3.0-alpha.1 is a testing release. Testing releases are intended for testing and experimentation only, and are not qualified for production environments and not eligible for support or uptime SLA commitments.
Experimental downloads are not qualified for production use and not eligible for support or uptime SLA commitments, whether they are for testing releases or production releases.
| Operating System | Architecture | Full executable | SQL-only executable |
|---|---|---|---|
| Linux | Intel | cockroach-v26.3.0-alpha.1.linux-amd64.tgz (SHA256) |
cockroach-sql-v26.3.0-alpha.1.linux-amd64.tgz (SHA256) |
| ARM | cockroach-v26.3.0-alpha.1.linux-arm64.tgz (SHA256) |
cockroach-sql-v26.3.0-alpha.1.linux-arm64.tgz (SHA256) |
|
| Mac (Experimental) |
Intel | cockroach-v26.3.0-alpha.1.darwin-10.9-amd64.tgz (SHA256) |
cockroach-sql-v26.3.0-alpha.1.darwin-10.9-amd64.tgz (SHA256) |
| ARM | cockroach-v26.3.0-alpha.1.darwin-11.0-arm64.tgz (SHA256) |
cockroach-sql-v26.3.0-alpha.1.darwin-11.0-arm64.tgz (SHA256) |
|
| Windows (Experimental) |
Intel | cockroach-v26.3.0-alpha.1.windows-6.2-amd64.zip (SHA256) |
cockroach-sql-v26.3.0-alpha.1.windows-6.2-amd64.zip (SHA256) |
Docker image
Multi-platform images include support for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.
Within the multi-platform image, both Intel and ARM images are generally available for production use.
To download the Docker image:
docker pull cockroachdb/cockroach-unstable:v26.3.0-alpha.1
Breaking changes
- User-defined views that reference
crdb_internalvirtual tables now enforce unsafe access checks. To restore the previous behavior, set the session variableallow_unsafe_internalsor the cluster settingsql.override.allow_unsafe_internals.enabledtotrue. - Changed privilege requirements for
RESTOREstatements for non-admin users.RESTORE DATABASEno longer accepts the deprecatedCREATEDBrole option, and requires theRESTOREsystem privilegeRESTORE TABLEno longer accepts the deprecatedCREATEprivilege, and requires theRESTOREprivilege on the parent database. - The
system.statement_statisticsmetadataJSONBcolumn no longer carries a copy of the statement query text, query summary, or database for rows newly flushed once the cluster has finalized 26.3. Consumers should source these values fromsystem.statements(or via thequery,query_summary, anddatabasecolumns on thecrdb_internal.statement_statistics,crdb_internal.statement_persisted, andcrdb_internal.statement_activityviews which already join to it). - The
alter_typeevent has been replaced by the operation-specific eventsalter_type_add_value,alter_type_rename_value, andalter_type_drop_value. - DDL operations such as
CREATE TABLEandALTER TABLE ... ADD COLUMNnow reject computed columns that use unsupported UDF patterns, including:- PL/pgSQL UDFs.
- Multi-statement SQL UDFs.
- UDFs with
OUT/INOUTparameters. - Nested UDF calls.
- UDF bodies with subqueries, CTEs,
FROMclauses, or set-returning functions. Previously these were accepted but would fail during schema change backfill, leaving the table in a state where schema changes could not be performed.
- Fixed enforcement of
CREATE SCHEMA ... AUTHORIZATIONto require that the executing user is a member of the specified role, matching PostgreSQL behavior. Previously, any user withCREATEprivilege on the database could create schemas owned by arbitrary roles. - Added enforcement to return an error when casting an array containing
NaN,Infinity, or zero elements to thevectortype. This change matches PostgreSQL behavior. - Index definitions now use only the schema-qualified table name (for example,
public.t), instead of the previous behavior wherepg_get_indexdef()andpg_indexes.indexdefincluded a database name prefix. This fix improves PostgreSQL tool compatibility. - Changed the cluster setting
server.gc_assist.enabledto default tofalse, disabling GC assist to help reduce tail latencies. This change should not affect CockroachDB workloads, but if needed you can re-enable GC assist settingserver.gc_assist.enabledtotrue. - Statement fingerprinting no longer distinguishes between implicit and explicit transactions. After you upgrade, you might temporarily see duplicate statement entries in SQL Activity until older, pre-upgrade statistics age out.
- Webhook CSV output now separates rows with newlines. Previously, multiple rows in a batch could be concatenated onto one line.
- Follow-the-workload rebalancing is now disabled by default as part of its deprecation. The
kv.allocator.load_based_lease_rebalancing.enabledcluster setting is retired and hidden fromSHOW CLUSTER SETTINGS, but can still be set to re-enable the feature if needed. - Renamed the
exportrequest.delay.totalmetric tokv.bulk_low_pri_read.delay.total. This metric now tracks throttling delay for all low-priority bulk read requests.
Security updates
- Added the
auth.min_password_lengthmetric that reports the configured minimum password length for the cluster. This metric can be used to monitor and alert on password length policy, ensuring compliance with organizational security requirements. - Added the
auth.password_encryption.is_scrammetricto report whether password encryption is configured to use SCRAM-SHA-256 (1) or crdb-bcrypt (0). Use this metric to verify and alert on password hashing policy across the cluster, verifying security compliance requirements. - Removed an overly restrictive TLS curve preference that limited FIPS mode to P-256. CockroachDB now uses Go's native FIPS curve selection, improving interoperability with clients that prefer other FIPS curves.
- Changed auditing so zone configuration changes (for example,
ALTER ... CONFIGURE ZONE) are now logged to theSENSITIVE_ACCESSaudit log channel for all users, not just admins. A newzone_config_auditevent is emitted whenever a user sets or discards a zone configuration. - Updated frontend dependencies to address known security vulnerabilities:
lodashupdated to 4.18.1.immerupdated to 9.0.21.ellipticupdated to 6.6.1.bn.jsupdated to 4.12.3/5.2.3.
General changes
- Added a
csv_headeroption toCREATE CHANGEFEEDthat adds a header row tocsvformat changefeeds to webhook and cloud storage sinks. Whencsv_headeris enabled, CockroachDB includes a header row of column names at the start of each webhook request body and at the beginning of each generated CSV file. - Added the following files to statement bundles produced by
EXPLAIN ANALYZE (DEBUG):descriptors.json, which contains pretty-printed descriptor JSON for each object referenced by the statement.schema_changes.txt, which contains recent schema-change history for those objects.
- Changed transactional logical data replication to require the
CURSORparameter. - Improved rangefeed performance by prioritizing catch-up scans for high-priority rangefeeds (such as system table watchers) over bulk consumers, reducing delays in delivering updates under heavy scan load.
- Updated spatial libraries to use GEOS 3.14 instead of GEOS 3.13.
SQL language changes
- Updated CockroachDB to align with PostgreSQL version 18.0.0, including the following changes:
- PostgreSQL version 18.0.0 is now reported in the
server_versionandserver_version_numread-only configuration parameters. - Updated schemas for
pg_attribute,pg_auth_members,pg_class,pg_collation,pg_constraint,pg_database,pg_prepared_statements,pg_statistic_ext, andpg_typewith new and corrected columns - Fixed 14 pre-existing column type mismatches across
pg_am,pg_conversion,pg_enum,pg_extension,pg_operator,pg_range,pg_seclabel,pg_settings, andpg_stat_activity. - Updated 35 unimplemented and stub table schemas to match PostgreSQL 18:
pg_group,pg_hba_file_rules,pg_indexes,pg_inherits,pg_language,pg_locks,pg_proc,pg_publication,pg_publication_rel,pg_publication_tables,pg_range,pg_replication_slots,pg_stat_activity,pg_stat_all_indexes,pg_stat_all_tables,pg_stat_database,pg_stat_database_conflicts,pg_stat_gssapi,pg_stat_progress_analyze,pg_stat_progress_vacuum,pg_stat_subscription,pg_stat_sys_indexes,pg_stat_sys_tables,pg_stat_user_indexes,pg_stat_user_tables,pg_stat_xact_all_tables,pg_stat_xact_sys_tables,pg_stat_xact_user_tables,pg_statio_user_sequences,pg_statistic_ext_data,pg_stats,pg_stats_ext,pg_subscription,pg_ts_parser, andpg_user_mapping. - Added 15 new stub tables:
pg_aios,pg_backend_memory_contexts,pg_ident_file_mappings,pg_parameter_acl,pg_publication_namespace,pg_shmem_allocations_numa,pg_stat_checkpointer,pg_stat_io,pg_stat_progress_copy,pg_stat_recovery_prefetch,pg_stat_replication_slots,pg_stat_subscription_stats,pg_stat_wal,pg_stats_ext_exprs, andpg_wait_events.
- PostgreSQL version 18.0.0 is now reported in the
- Added the
sql.udf.countmetric, which tracks the number of SQL statements that invoke a user-defined function (UDF). - Added the
information_schema.crdb_statement_statisticsandinformation_schema.crdb_transaction_statisticsviews to expose persisted SQL statement and transaction statistics with a stable schema. Data can lag by up to one SQL stats flush interval (10 minutes by default). For real-time statistics, continue usingcrdb_internal.cluster_statement_statistics. - Added
information_schema.crdb_jobs_with_progress, a stable view exposing per-job metadata together with the current progress fraction, resolved HLC, status message, and last-updated timestamp. Theresolvedcolumn is the raw HLC; applyhlc_to_timestampat the call site if a wall-clock value is needed. - Added
information_schema.crdb_job_messages(job_id), a set-returning function that returns the message history for one job (recorded,kind,message). The argument is mandatory; an unknown or invisiblejob_idreturns zero rows. - Added
information_schema.crdb_jobs, a stable view exposing per-job metadata from the jobs system intended for programmatic use. UnlikeSHOW JOBS, thedescriptioncolumn is returned in full and theerrorcolumn distinguishesNULL(no error) from the empty string. The lifecycle column is namedstate. - Added
information_schema.crdb_job_progress_history(job_id), a set-returning function that returns the full progress trajectory of a job (recorded,progress_fraction,resolved).resolvedis the raw HLC decimal; applyhlc_to_timestampat the call site for a wall-clock value. The argument is mandatory; an unknown or invisiblejob_idreturns zero rows. - Added a new
VIEWEVENTLOGsystem privilege that grants read-only access to the event log. Non-admin users can be granted event log visibility viaGRANT SYSTEM VIEWEVENTLOG TO <user>without needingVIEWCLUSTERMETADATAor theadminrole. - Added support for
ALTER DOMAIN ... SET DEFAULTandALTER DOMAIN ... DROP DEFAULT. - Added support for the
bit_xoraggregate function, which computes the bitwise XOR of all non-null input values (orNULLif there are none) for integer and bit-string inputs, matching PostgreSQL. - Added the cluster setting
sql.status.active_query_text.max_bytes, which controls the maximum length of SQL text shown inSHOW CLUSTER QUERIES,SHOW CLUSTER SESSIONS, and the correspondingcrdb_internalvirtual tables. Statements longer than this limit are truncated with a trailing ellipsis. - Added support for
CREATE DOMAINandDROP DOMAINsyntax, to define named types based on existing types with optional constraints. - Added
ALTER DATABASE ... ALTER SUPER REGION ... SURVIVE {ZONE|REGION} FAILUREsyntax, allowing individual super regions to have their own survival goal independent of the database default. - Added support for configuring zone settings at the super region level in multi-region databases using
ALTER DATABASE ... ALTER LOCALITY SUPER REGION ... CONFIGURE ZONE. This allows setting zone configuration properties (for example,num_votersandnum_replicas) that apply to all tables and partitions whose affinity region belongs to the specified super region. - Added support for the
TRUNCATEtable privilege viaGRANTandREVOKE, for parity with PostgreSQL. For backwards compatibility,TRUNCATEoperations are allowed for users that have eitherTRUNCATEorDROPprivileges. - Added a new cluster setting,
sql.schema.auto_unlock.enabled, that controls whether DDL operations automatically unlockschema_lockedtables. When set tofalse, DDL on schema-locked tables is blocked unless the user manually unlocks the table first. This allows customers using LDR to enforceschema_lockedas a hard lock that prevents user-initiated DDL. The default istrue, preserving existing behavior. - Added support for the
SHOW RANGES .. WITH ZONEoption which adds azone_configcolumn of typeJSONBcontaining the fully resolved zone configuration for each range (with inheritance applied). - Added a
SKIP FORIEGN KEYSoption forCREATE LOGICALLY REPLICATED TABLE, which creates the destination table without foreign key constraints. - Added support for
ALTER DOMAIN ... RENAME TOstatements. - Added a new cluster setting
sql.prepared_transactions.unsafe.enabled(default:false) that controls whetherPREPARE TRANSACTIONstatements are accepted. This setting is marked unsafe and requires the unsafe setting interlock to change. When disabled, attempting to prepare a transaction returns an error.COMMIT PREPAREDandROLLBACK PREPAREDremain available regardless of this setting to allow cleanup of existing prepared transactions. - Added support for an upper bound on execution latency when you request statement diagnostics bundles. Set
max_execution_latency(optionally withmin_execution_latency) to capture bundles only for statements whose execution latency falls within the specified range. - Added support
DROP PROVISIONED ROLESstatements to bulk-drop provisioned roles with optional filter criteria, skipping users that own objects or have other dependencies. - Added support for subscript access on values of type
nameusing 0-based indexing (for example,('hello'::name)[0]returnsh). Out-of-bounds subscripts returnNULL, matching PostgreSQL behavior. - Added the built-in function
pg_get_statisticsobjdef(), which returns theCREATE STATISTICSstatement for an extended statistics object. - Added pretty-print style to statement bundles with
CREATE FUNCTIONandCREATE PROCEDURE. - Added support to
SHOW TRACE FOR SESSIONfor span tags such as_verbose,_dropped_logs, and_dropped_children. Tags use the=== operation:<name> <tags>format for span start messages to identify when trace output is truncated. - Added a
pg_dump_compatibilitysession variable that improves compatibility with thepg_dumpPostgreSQL tool. Set it topostgresto makepg_catalogreport OIDs that match the hardcoded ones expected bypg_dump, hide CockroachDB-internal objects, and make other fixups that allowpg_dumpoutput to run on non-CockroachDB servers. Set it tocockroachdbfor the samepg_catalogfixes while keeping CockroachDB-specific syntax. Like other session variables,pg_dump_compatibilitycan be set in the connection string. - Added additional execution statistics to
EXPLAIN ANALYZEfor vector index operations including contention and wait times, MVCC scan statistics, and tenant RU consumption. - Added KV statistics to
EXPLAIN ANALYZEfor vector search and vector mutation search operations, including gRPC calls, bytes read, pairs read, KV time, and KV CPU time. - Added support for PostgreSQL-compatible transaction-level advisory lock functions (
pg_advisory_xact_lock,pg_advisory_xact_lock_shared,pg_try_advisory_xact_lock, andpg_try_advisory_xact_lock_shared, includingint4two-argument overloads). Locks are tied to the SQL transaction and released on commit or rollback. - Added
query,query_summary, anddatabasecolumns tocrdb_internal.cluster_statement_statistics,crdb_internal.statement_statistics,crdb_internal.statement_statistics_persisted, andcrdb_internal.statement_activity. These columns expose the statement text, summary, and originating database directly, without requiring callers to parse themetadataJSONBcolumn. - Added support for the
ST_3DDistanceandST_3DDWithingeospatial functions, which compute minimum distance and within-distance checks using 3D Euclidean distance. These functions consider the Z coordinate of geometries, unlike their 2D counterpartsST_DistanceandST_DWithin. EXPLAINnow recommends vector indexes for queries that use vector distance operators (<->, <=>, <#>) withORDER BY ... LIMIT, including support for equality prefix columns and all three distance metrics (L2, cosine, inner product).- Added a new cluster setting
sql.stats.table_statistics_cache.capacitythat controls the maximum number of tables whose statistics are retained in the in-memory LRU cache (default:256). - Added support for the
SEQUENCE NAME <name>clause onALTER TABLE ... ADD GENERATED ... AS IDENTITYandALTER TABLE ... ADD COLUMN ... GENERATED AS IDENTITY. The clause names the backing sequence explicitly instead of using the auto-generated<table>_<column>_seqpattern. - Added the SQL CPU timeline to
EXPLAIN ANALYZEfor all queries, including mutations and queries run through the row-by-row execution engine. Previously, this line was only shown for non-mutation queries that ran through the vectorized execution engine. CREATE SCHEMA,DROP SCHEMA,CREATE ROLE, andDROP ROLEcan now be used in PL/pgSQL stored procedure bodies.- Added support for
ALTER DOMAIN ... OWNER TO. - Added an
optionsargument tocrdb_internal.tsdb_query()to control TSDB-side downsampling, derivatives, source filtering, and cross-source aggregation. The supported JSONB keys are documented in the function description (use\\df+ crdb_internal.tsdb_query). - Added the cluster settings
sql.crdb_internal.tsdb_query.max_time_rangeandsql.crdb_internal.tsdb_query.max_rowsto limit the amount of work a singlecrdb_internal.tsdb_query()call can perform. Queries that exceed either limit are rejected with an error that identifies which setting to adjust. - Added the
crdb_internal.tsdb_query(name, start_time, end_time)table function, which returns datapoints from the in-cluster time series database for a named metric over a specified time window. Calls require theVIEWCLUSTERMETADATAsystem privilege. - Added the
pg_database_sizePostgreSQL-compatible built-in function. It returns an approximate on-disk size sourced from a periodically refreshed cache. - Added the
pg_relation_size,pg_table_size, andpg_total_relation_sizePostgreSQL-compatible built-in functions for table relations. Sizes come from a periodically refreshed cache and may lag the true value by minutes. Index OIDs andpg_indexes_sizeare not yet supported; they will be added in a follow-up. - Added the
pg_size_prettyandpg_size_bytesPostgreSQL-compatible built-in functions. - Added support for
COMMENT ON VIEWandCOMMENT ON SEQUENCEstatements. Comments set on views and sequences are visible viapg_catalog.pg_descriptionand theobj_description()built-in function. - Added support for
COMMENT ON FUNCTION,COMMENT ON PROCEDURE, andCOMMENT ON ROUTINEstatements on user-defined functions and stored procedures. Comments are visible viapg_catalog.pg_descriptionand theobj_description(oid, 'pg_proc')built-in function. The argument list is required when the routine name is overloaded and may be omitted otherwise. TheCOMMENT ON ROUTINEstatement accepts either a function or a procedure, matching PostgreSQL. Comments are not supported on built-in functions. - Added support for
LISTcolumns toIMPORT INTO ... PARQUET. ALISTis decoded into a targetARRAYcolumn (with an element type matching the Parquet element's physical or logical type) or a targetJSONBcolumn (serialized as a JSON array). When aLISTelement is an unannotatedBYTE_ARRAY, the bytes are passed through to the target as a string with no UTF-8 validation. For binary data, target anARRAY<BYTES>column to preserve the original bytes losslessly. NestedLISTs andMAPcolumns are unsupported and rejected at file-open time. - Added support for SQL-standard inline body syntax for SQL routines.
CREATE FUNCTIONandCREATE PROCEDUREwithLANGUAGE SQLmay now use eitherBEGIN ATOMIC ... END(with one or more body statements) or a bareRETURN exprin place of the dollar-quotedAS $$ ... $$form. Routines created with the inline form display as the dollar-quoted form inSHOW CREATEoutput. CREATE TABLEandALTER TABLE ... ADD COLUMNnow supportGENERATED AS IDENTITY (SEQUENCE NAME {name}). This clause allows you to explicitly name the backing sequence instead of using the auto-generated<table>_<column>_seqsequence name.- Added PostgreSQL-compatible built-in functions
factorial,gcd,lcm,scale,min_scale,trim_scale,log10,erf,erfc, andrandom_normal. - Added a 3-argument overload of
ST_DistanceSpheroidthat accepts a textualSPHEROIDdefinition (e.g.,'SPHEROID["GRS_1980",6378137,298.257222101]') as the third argument, matching the PostGIS signature. The supplied spheroid is used for the geodesic distance computation in place of the one derived from the geographies' SRID. - Added a
REFERENCESprivilege for tables, matching PostgreSQL behavior. Foreign key creation now requires theREFERENCESprivilege on the referenced (parent) table instead ofCREATE. The child (origin) table still requiresCREATE. Existing users withCREATEon tables are automatically grantedREFERENCESduring upgrade. TheREFERENCESprivilege can be granted and revoked independently viaGRANT/REVOKE REFERENCES ON <table>. Note that restoring a pre-26.3 backup onto a 26.3+ cluster does not automatically grantREFERENCESto users who hadCREATE; an explicitGRANT REFERENCESis needed to create foreign keys on restored tables. - Added support for creating foreign keys when the referenced table has a unique constraint on a subset of the referenced columns. Creation of new subset-unique foreign keys can be disabled by setting the
sql.subset_unique_fks.enabledcluster setting tofalse. - Added partial support for
ALTER DOMAIN ... SET NOT NULLandALTER DOMAIN ... DROP NOT NULL. The constraint is currently treated as NOT VALID which limits checks to newly inserted or updated rows. - Stored procedures now support
GRANT,REVOKE, andALTER DEFAULT PRIVILEGES. These statements remain unsupported inside user-defined functions andDOblocks. - Improved
CREATE PROCEDUREvalidation forPL/pgSQLprocedure bodies that contain DDL.- When late binding is disabled, procedure bodies containing DDL are now rejected with an error message referencing the
sql.procedures.plpgsql.late_binding.enabledcluster setting. - When late binding is enabled,
CREATE SCHEMA,DROP SCHEMA,CREATE ROLE, andDROP ROLEare now allowed inPL/pgSQLprocedure bodies.
- When late binding is disabled, procedure bodies containing DDL are now rejected with an error message referencing the
- Improved out-of-the-box support for dump/restore clients. Connecting a tool to CockroachDB with an
application_nameofpg_dump,pg_restore, orpg_dumpallnow automatically sets thepg_dump_compatibilitysession setting to "cockroachdb" (emitting aNOTICE), unless the setting is provided explicitly in the connection string. - Added the session setting
optimizer_inline_placeholder_equalities, defaults totrue. When set tofalse, the optimizer does not propagate placeholder equality constraints into correlated subqueries. - Added
sql.routine.<type>.started.countandsql.routine.<type>.countSQL statement metrics for DDL and DCL executed inside stored procedure bodies. - Added the cluster setting
sql.procedures.plpgsql.late_binding.enabled(defaults tofalse). When enabled,PL/pgSQLprocedure bodies are not resolved atCREATE PROCEDUREtime. References are instead resolved atCALLtime, matching PostgreSQLPL/pgSQLsemantics.LANGUAGESQL procedures and functions are unaffected. - Added support for the
pg_lockstable, which only supports the monitoring of advisory locks. - A new cluster setting
sql.log.failed_query.enabledcauses every SQL statement that ends in an error to be logged on theSQL_EXEClog channel as afailed_queryevent, including the statement text, SQLSTATE, and error text. A companion settingsql.log.failed_query.internal_queries.enableddoes the same for internally executed statements. Both default to off. Operators can use this to derive custom metrics for specific error classes without enablingsql.log.all_statements.enabled. - Added support for the
ST_3DMaxDistance,ST_3DDFullyWithin,ST_3DIntersects,ST_3DShortestLine,ST_3DLongestLine,ST_3DClosestPoint, andST_3DPerimetergeospatial functions. - Added support for the
ST_3DShortestLine,ST_3DLongestLine, andST_3DClosestPointgeospatial functions. - CockroachDB now recognizes the fixed-offset timezone abbreviations defined by PostgreSQL's
pg_timezone_abbrevsview (such asEST,PST,EAT,CET) when parsingtimestamptzliterals. Previously these abbreviations returned an "unimplemented" error. The abbreviations are also now exposed via thepg_catalog.pg_timezone_abbrevsvirtual table. - PL/pgSQL routines can now access fields of composite-typed variables without surrounding the variable name in parentheses (for example
v.xin addition to the previously required(v).x), matching PostgreSQL behavior. When a PL/pgSQL variable shadows a column with the same name in a SQL statement inside the routine, the reference is now rejected as ambiguous instead of being silently resolved. - Two new session variables,
distsql_plan_locality_filteranddistsql_plan_locality_filter_strict, allow restricting DistSQL physical planning of a session's queries to SQL instances whose locality matches a user-supplied filter. These variables mirror theEXECUTION LOCALITYoption already available forBACKUP,RESTORE, andCHANGEFEEDjobs. - Added the
pg_get_function_sqlbodybuilt-in function for compatibility with PostgreSQL 14+. The function returnsNULLfor all functions today, matching PostgreSQL's behavior for functions defined with theAS $$..$$syntax. ST_3DDistanceandST_3DDWithinnow fall back to 2D distance when either input lacks a Z dimension, matching PostGIS. Previously the missing Z was treated as 0.- Added support for the
ST_3DPerimeter()geospatial function. - CockroachDB now supports the
WITH NO DATAoption forCREATE TABLE ... AS. When specified, theASquery is planned to derive the new table's column names and types, but is not executed, so the table is created empty. This matches PostgreSQL: the resulting table is an ordinary, immediately-usable table (it can be selected from and inserted into right away), unlike a materialized view created withWITH NO DATA, which must be refreshed before it can be queried.WITH DATAremains the default and populates the table from the query. EXPLAINandEXPLAIN ANALYZEnow display atable stats modefield (canaryorstable) when thesql.stats.canary_fractioncluster setting is greater than 0, indicating which table statistics were used for query planning. Scan nodes for tables with active canary stats also show the configured canary window duration.- Exposed the following settings for canary table statistics:
- Cluster setting
sql.stats.canary_fraction: probability that table statistics will use canary mode (i.e., always use the freshest stats) instead of stable mode (i.e., use the second-freshest stats) for query planning [0.0-1.0]. - Session variable
canary_stats_mode: Whensql.stats.canary_fractionis greater than0, controls which table statistics are used for query planning on the current session:onalways uses the newest (canary) stats immediately when they are collected,offdelays using new stats until they outlive the canary window, andautoselects probabilistically based on the canary fraction. Has no effect whensql.stats.canary_fractionis0.
- Cluster setting
EXPLAIN (VERBOSE)andEXPLAIN ANALYZE (VERBOSE)now include a detailed tree of statement hints showing each hint's type, configuration (donor SQL or variable name/value), and skip reason if applicable.EXPLAINandEXPLAIN ANALYZEnow report statement hints as applied or skipped. Hints that fail at runtime (for example, referencing a missing index or an invalid session variable) appear as skipped.EXPLAIN (VERBOSE)andEXPLAIN ANALYZE (VERBOSE)also include per-hint details and the skip reason when applicable.- Aggregation function
ST_AsMVTcan now also be used as a window function. CREATE CHANGEFEED FOR DATABASEnow returns an error stating that the feature is not implemented.- The
information_schema.crdb_enable_statement_hintsbuilt-in function now accepts an optionaldatabaseargument to enable or disable only hints scoped to a specific database. - Changed the default value of the session variable
optimizer_span_limitto131072. This bounds the number of spans the optimizer will allow in constrained index scans generated during query optimization. Queries that would exceed this limit will use fewer looser spans with remaining filters instead. Set to0to disable the limit. REPLACE FUNCTION/PROCEDUREin the legacy schema changer now strictly requires function ownership, matching the declarative schema changer and PostgreSQL behavior.- Reduced the necessary user privileges for
SHOW SCHEDULES, only requiring theVIEWJOBsystem privilege. Non-admin users can be granted schedule visibility viaGRANT SYSTEM VIEWJOB TO <user>without needing directSELECTon system tables. - Changed statement bundles to pretty-print
DOstatements. - Setting
skip_unique_checks = trueon an index now emits a notice warning that unique constraint enforcement is bypassed, with a pointer to theINSPECTdocumentation. - Changed the
create_statementcolumn returned bySHOW CREATE FUNCTIONandSHOW CREATE PROCEDUREto be pretty-printed. pg_catalogno longer shows the synthetic primary key constraint or its backing index for materialized views. This matches PostgreSQL, which never attaches a constraint or index to a materialized view implicitly.- Changed statement hints so creating a hint that conflicts with an existing hint now emits a
NOTICEindicating that older hints will be skipped. UseSHOW STATEMENT HINTSto identify stale hints. - Renamed the
canary_stats_modesession variable values from"off"/"on"to"force_stable"/"force_canary". These modes now work independently of thesql.stats.canary_fractioncluster setting, allowing per-session opt-in without cluster-wide enrollment. - Conflicting names in
ALTER TYPE ... RENAME VALUEnow error consistently with PostgreSQL. ALTER TYPE ... SET (property = value)now returns a clear unimplemented error instead of a syntax error.- Removed the
implicit_txnfield from statement statistics. Theimplicit_txncolumn is no longer present incrdb_internal.node_statement_statistics, and statement statistics stored insystem.statement_statisticsno longer include animplicitTxnmetadata key. - The
custom_plansandgeneric_planscolumns inpg_prepared_statementsnow report the number of times a custom or generic plan was used for each prepared statement, matching PostgreSQL behavior. - CockroachDB now sends
default_transaction_read_only,in_hot_standby,search_path, andscram_iterationsasParameterStatusmessages during connection startup, matching PostgreSQL 18 behavior. - The
pg_catalog.pg_proccolumnsprocost,prorows,prosupport, andproparallelnow return PostgreSQL-compatible default values instead ofNULL. Built-ins reportprocost=1, user-defined functions reportprocost=100,prorowsis1000for set-returning routines and0otherwise,prosupportis-, andproparallelisu(unsafe) for all routines because CockroachDB does not track parallel safety. pg_catalog.pg_constraintnow exposesNOT NULLconstraints as named entries, matching PostgreSQL behavior for non-nullable columns. These entries usecontype='n', setconkeyto an array containing the column'sattnum, and setconnameto a name like{table}_{column}_not_null.GENERATED ALWAYS AS (<expr>)andAS (<expr>)column definitions no longer require a trailingSTOREDorVIRTUALkeyword. When neither is specified, the column defaults toVIRTUAL, matching PostgreSQL.- Updated
pg_relation_sizeandpg_table_sizeto return the size of the primary index only, matching PostgreSQL's "heap only" semantics. The previous (over-counting) behavior is preserved bypg_total_relation_size.pg_relation_sizealso accepts an index OID, returning that index's cached size. The newpg_indexes_size()built-in function returns the sum of the relation's secondary index sizes. - The
ALTER DOMAIN ... SET SCHEMAstatement is now supported. - DDL executed inside a stored procedure now honors the
SERIALIZABLEisolation requirement that top-level DDL has always had: when a procedure containing DDL is called underREAD COMMITTEDorREPEATABLE READin an implicit transaction, the transaction is automatically upgraded toSERIALIZABLEfor the call; otherwise the call is rejected with a clear error. - Unimplemented PL/pgSQL syntax errors now include a link to the GitHub issue tracking the missing feature.
- Fixed the error messages for
GRANT ROLEandREVOKE ROLEinside functions and procedures to correctly identify the statement asGRANT ROLE/REVOKE ROLEinstead of the genericGRANT/REVOKE.
Operational changes
- Changed the default value of the
obs.ash.enabledcluster setting totrue, enabling Active Session History sampling by default. - Added the
obs.ash.enabled,obs.ash.sample_interval,obs.ash.buffer_size,obs.ash.log_interval,obs.ash.log_top_n, andobs.ash.response_limitcluster settings. These settings control Active Session History (ASH) sampling frequency, buffer size, logging intervals, and query limits. - Statement diagnostics requests with
sampling_probabilityandexpires_atnow collect up to 10 bundles (configurable viasql.stmt_diagnostics.max_bundles_per_request) instead of a single bundle. Set the cluster setting to1to restore single-bundle behavior. - Added two new metrics,
auth.cert.san.conn.totalandauth.cert.san.conn.success, to track SAN-based certificate authentication attempts and successes. - Added the metrics
storage.wal.failover.secondary.disk.capacityandstorage.wal.failover.secondary.disk.availableto report disk space utilization of the secondary WAL volume when WAL failover is configured. - A new cluster setting,
server.gc_assist.enabled, allows operators to dynamically disable GC assist in CockroachDB's forked Go runtime. By default, it follows theGODEBUG=gcnoassistflag. A new metric,sys.gc.assist.enabled, reports the current state (1= enabled,0= disabled). - Added support for a visibility level filter on the Prometheus scrape endpoints
/_status/varsand/metrics. Use the?visibility=query parameter (all,support, oressential) or the cluster settingobs.metrics_scrape.default_visibilityto control which metrics are exported. Default value isallto support existing behavior. - Added the
liveness.uncached_scansmetric, which counts direct KV scans of the node liveness range. - Added throttling for low-priority bulk read operations, such as TTL
SCANand backupEXPORToperations. Configure throttling with thekv.bulk_low_pri_read.max_rateandkv.bulk_low_pri_read.max_concurrentcluster settings. - Added certificate lifecycle metrics to improve observability and alerting for certificate health:
security.certificate.last_rotation(exported assecurity_certificate_last_rotationin Prometheus) reports the Unix timestamp, in seconds, of the most recent certificate rotation. Reports0if the process has not rotated the certificate since startup.security.certificate.expiry_days(exported assecurity_certificate_expiry_daysin Prometheus) reports the number of days remaining until each certificate expires. Reports0if the certificate is expired, missing, or cannot be loaded.
- Physical cluster replication now returns clearer errors if you attempt to cut over before the initial scan replicates any data. Cutting over to
LATESTduring the initial scan now returns an explicit error instead of using the replication start time. Cutting over to an explicit timestamp now validates that the timestamp is not earlier than the replication start time. - The cluster settings
storage.sstable.compression_algorithm_backup_storageandstorage.sstable.compression_algorithm_backup_transportno longer appear inSHOW ALL CLUSTER SETTINGS. These settings can still be viewed and set explicitly by name. - Added additional statement statistics to the
sql.stats.discarded.currentto report statement drops due to memory pressure and fingerprint-tracking limits on the SQL stats ingester. - Added three new admission control metrics for monitoring disk bandwidth token usage:
admission.granter.disk_write_byte_tokens_used.regular.kv,admission.granter.disk_write_byte_tokens_used.elastic.kv, andadmission.granter.disk_write_byte_tokens_used.snapshot.kv. The existingadmission.granter.disk_write_byte_tokens_exhausted_duration.kvmetric is now marked as essential and will appear on the Overload dashboard. - Four new gauges
mma.overloaded_store.{lease_grace,short_dur,medium_dur,long_dur}.blockedreport overloaded stores that the multi-metric allocator (MMA) deferred because they already had too much pending work. Per duration bucket, success + failure + blocked equals the count of overloaded stores observed. A persistently non-zero value on thelong_dur.blockedgauge indicates an overloaded store that is repeatedly being deferred and may not be receiving relief. - The
changefeed.checkpoint_lagmetric is now reported per job and fixed to report correctly when changefeed jobs are paused. - Active Session History (ASH) now includes a
COMMITworkload type that attributes commit-deferred work for an explicit transaction with the transaction fingerprint as theworkload_id.
Command-line changes
- Added the
--backgroundflag tocockroach demoto start the demo cluster without opening an interactive SQL shell. The process prints connection information and runs until it receivesSIGINTorSIGTERM. - Added a "restricted" mode for
cockroach sql, which can be used with the\restrictand\unrestrictmetacommands. In restricted mode, the shell blocks all backslash metacommands except\unrestrict, helping prevent metacommands embedded in plain-text SQL dumps from running when you pipe the dump into the shell. SQL statements still run normally, and restricted mode is preserved across\iand\irincludes. - Added the
cockroach debug uploadcommand to upload adebug.zipfile to Cockroach Labs Support. - The
\\l+and\\dt+metacommands in the built-in SQL shell now include aSizecolumn showing on-disk sizes, matching PostgreSQLpsql. These values are stored in a periodically refreshed cache that pulls frompg_database_sizeandpg_table_size, which may lag the live byte count by a few minutes.
DB Console changes
- Added a "Changed only" checkbox to the Cluster Settings report page in DB Console. When checked, only settings that have been explicitly overridden are shown.
Bug fixes
- Fixed
pg_catalog.pg_proc.prosecdefandinformation_schema.routines.security_typeto correctly reportDEFINERforSECURITY DEFINERfunctions and procedures. - Fixed a bug that could cause an internal error when running
SELECT ... FOR UPDATEorSELECT ... FOR SHAREwithORDER BYthat uses a non-defaultNULLordering (for example,null_ordered_last) underREAD COMMITTED. - Fixed a bug where
BACKUP TENANTcould silently omit the data of tables located after a table that is excluded from backup and is the last table in the tenant's keyspace. width_bucket(operand, b1, b2, count)now returns an error whencountis zero or negative, matching PostgreSQL.width_bucket(operand, b1, b2, count)now returns an error when the two bounds are equal, matching PostgreSQL.- Fixed a bug where division between
FLOATandINTvalues (for example,8.0::FLOAT / 2::INT) could fail with an "unsupported binary operator" error. MixedFLOAT/INTdivision now returns aFLOATresult, matching PostgreSQL behavior. - Fixed a bug in encryption at rest where 256-bit keys generated with
cockroach gen encryption-key -version=2 --size=256were misclassified as AES-192-CTR-V2 on load. This bug resulted in data keys being generated at 24 bytes (AES-192) instead of the intended 32 bytes (AES-256). Existing key files with the wrong algorithm string are now automatically corrected on load, and data keys are rotated to the correct size on node restart. - Fixed a bug where
IMPORT INTOand some schema change backfills could fail when the destination table had computed columns that call user-defined functions (UDFs). Computed columns that referenceIMMUTABLE, single-expression SQL UDFs now work withIMPORT INTOandALTER TABLE ... ADD COLUMN. - Fixed a bug where
ALTER DATABASE ... PRIMARY REGIONcould leave stale table zone configurations, causing voter constraints and lease preferences to reference the previous primary region. - Fixed a bug where a CockroachDB node could hang during startup if a secondary tenant (shared-process) server failed to initialize, blocking the system tenant from accepting connections.
- Fixed a bug where
pg_index.indisreadywas incorrectly set tofalsefor all valid indexes. In PostgreSQL,indisreadyistruefor all fully created indexes. - Fixed a bug where restoring a database backup containing default privileges that referenced non-existent users would leave dangling user references in the restored database descriptor.
- Fixed a bug where rolling back a
CREATE TABLEthat referenced user-defined types or sequences would leave orphaned back-references on the type and sequence descriptors, causing them to appear incrdb_internal.invalid_objectsafter the table was GC'd. - Fixed a bug where running
EXPLAIN ANALYZE (DEBUG)on a query that invokes a UDF with many blocks could cause out-of-memory errors (OOMs). - Fixed a bug where concurrent updates to a table using multiple column families during a partial index creation could result in data loss, incorrect
NULLvalues, or validation failures in the resulting index. - Fixed a bug where setting
AWS_SKIP_CHECKSUM=truedid not fully suppress checksums on multipart uploads to S3-compatible storage, which could cause errors with services that do not supportCRCchecksums. - Added a new cluster setting
changefeed.kafka.max_request_sizeand a per-changefeedFlush.MaxBytesoption in the Kafka sink config to control the maximum size of record batches sent to Kafka by the v2 sink. Lowering this from the default of 256 MiB can prevent spurious message-too-large errors when multiple batches are coalesced into a single broker request. - Fixed a bug where the DB Console Overview page could crash for users with the
MODIFYSQLCLUSTERSETTINGandVIEWACTIVITYprivileges but withoutVIEWCLUSTERSETTING. The Settings API now always includes required non-sensitive console keys such asversion. - The PCR job now switches into the cutover phase more promptly after a failover is requested, terminating the replication phase more quickly and more reliably when components of the ingestion process are hung due to network errors.
- Fixed a bug where
ALTER FUNCTION ... RENAME TOandALTER PROCEDURE ... RENAME TOcould create duplicate functions in non-public schemas. - Fixed a data race that could cause certificate expiration metrics (
security.certificate.expiration.node-client,security.certificate.expiration.client-tenant,security.certificate.expiration.ca-client-tenantand their TTL counterparts) to not update after certificate rotation viaSIGHUP. - Fixed a crash (
traceRegion: alloc too large) that could occur when Go's execution tracer was enabled and a range cache lookup used a key longer than about 64 KB. - Fixed a bug where descriptor version fetching could be incorrectly throttled by the elastic CPU limiter, potentially leading to increased query latency or timeouts under high CPU load.
- Context cancellation is now surfaced if a
statement_timeoutoccurs while waiting for a schema change. - Fixed a bug where owner columns for built-in objects in some
pg_catalogtables (pg_proc.proowner,pg_type.typowner,pg_collation.collowner,pg_operator.oprowner,pg_tablespace.spcowner, andpg_statistic_ext.stxowner) could beNULL. - Fixed a bug where transient I/O errors (such as cloud storage network timeouts) during split or merge trigger evaluation were misidentified as replica corruption, causing the node to crash. These errors now correctly fail the operation, which is retried automatically.
- Fixed a bug where transient I/O errors reading from the
AbortSpanwere misidentified as replica corruption, causing the node to crash. These errors are now returned to the caller as regular errors. - Fixed a bug where comparing an
OID[]column against a string constant could fail with the errorunsupported comparison operator: <oid[]> = <string>, improving PostgreSQL compatibility (for example, forpg_dump). - Fixed a bug where statement hints that set session variables with integer, float, or timeout types (for example,
reorder_joins_limit,testing_optimizer_cost_perturbation, orstatement_timeout) could be accepted but then silently ignored at execution time. - Fixed a bug where converting a table from
REGIONAL BY ROWtoGLOBALwould not clear theskip_unique_checksstorage parameter on the primary key, even though implicit partitioning was removed. - Fixed a bug where executing a mutation in a subquery (e.g., as a CTE) could cause the "rows written" metrics like
sql.statements.index_rows_written.countandsql.statements.index_bytes_written.countto not be incremented correctly. - Fixed a bug that caused an "Unsupported system page size" startup crash with
ppc64le(POWER) CockroachDB binaries on systems with64 KBpages. REFRESH MATERIALIZED VIEWnow evaluates row-level security (RLS) policies using the view owner's identity instead of the invoker's, matching PostgreSQL's definer semantics.- Fixed a bug where DB Console Databases page privilege checks did not resolve role membership chains for
CONNECTgrants. Users who inheritedCONNECTthrough role hierarchies now correctly see their authorized databases and tables. - Fixed a bug where the
lock_timeoutanddeadlock_timeoutsession settings were not honored by FK existence checks performed during insert fast path execution. This could cause inserts to block indefinitely on conflicting locks instead of returning a timeout error. - Fixed a bug where CockroachDB might not have respected the table-level parameters
sql_stats_automatic_full_collection_enabledandsql_stats_automatic_partial_collection_enabledand defaulted to using the corresponding cluster settings when deciding whether to perform automatic statistics collection on a table. - Fixed a bug where creating a PL/pgSQL or SQL user-defined function that referenced a schema-qualified sequence or table through a
REGCLASScast (for example,nextval('sc.myseq'::REGCLASS)) could fail with the errorrelation does not existatCREATE FUNCTIONtime if the object's schema was not in the search path. - Fixed a bug where logical replication job status messages showed a fully redacted error (
"permanent error: ‹×›"). The actual error text is now preserved. - Fixed a nil-pointer panic during tenant garbage collection that could occur when the zone configuration or GC policy for the tenants range was missing.
- Fixed a rare panic that could occur when a virtual cluster entry was removed before it was fully populated by the rangefeed.
- Fixed an assertion failure during
DROP SCHEMA CASCADEor concurrent table drops when triggers had cross-table dependencies. - Fixed a bug where
ALTER TABLE ... ADD CONSTRAINT ... UNIQUEcould ignore theSTORINGclause and create a unique index without the specified stored columns. - Fixed a bug causing an internal error when creating a trigger on a
REGIONAL BY TABLEorGLOBALtable, if the trigger function referenced the multi-region enum typecrdb_internal_region. ALTER FUNCTION RENAMEandALTER FUNCTION SET SCHEMAnow correctly detect dependencies from triggers and row-level security policies, preventing renames that would break those objects.- Fixed a bug where
EXPORT INTO PARQUETcould panic whenchunk_sizeorchunk_rowswas set to a large value. This fix avoids an integer overflow in the Parquet library's buffer sizing logic. - Trigonometric functions now return errors consistent with PostgreSQL when passed out-of-range input.
- Fixed a bug that could cause an infinite loop in the optimizer when a query used a
LIMITvalue larger than4294967295with a join. - The
pg_catalogandinformation_schemaviews no longer report a column default for identity columns, matching expected behavior in PostgreSQL. - Fixed a bug where
experimental_strftimecould truncate years before 1000 when you used the%Yformat directive.experimental_strftimenow zero-pads%Yto at least four digits (for example, year 1 formats as0001). - Fixed a bug under the declarative schema changer where
ALTER TABLE ... DROP CONSTRAINT {pk}, ADD PRIMARY KEY (...)would leave behind an unwanted unique secondary index on the old primary key columns. - Fixed a bug where the DB Console login page did not show the OIDC login button when navigating with
?cluster=<tenant>to a tenant with OIDC enabled. OIDC login on non-default virtual clusters now works correctly. - Fixed a bug where a malformed binary numeric value sent over the pgwire protocol could cause the server to panic with a slice bounds error, crashing the connection. These inputs are now rejected with a proper error.
- Fixed a bug that caused
PGCOPYimports to reject valid octal and hexadecimal byte escapes for values greater than 127.PGCOPYimports now also treat the standard\.marker as the end of input. - Fixed a bug where setting
--advertise-sql-addrto the same value across multiple SQL instances could cause changefeeds withexecution_localityfilters to fail with "no instances found matching locality filter". - A physical cluster replication reader tenant no longer fails authentication and other queries with errors of the form "resolved
to but found no descriptor with id " after the reader tenant ingests a system table at an ID different from the one it was bootstrapped with. Previously, a per-node namespace cache could pin the bootstrap-time ID and require a tenant restart to recover. - Fixed a panic during
CREATE VECTOR INDEXbackfill when the table contained a public column ordered before the vector column that was not stored in the source primary index and was not referenced by the new index. In practice this was triggered by virtual computed columns. The schema change crashed the SQL node processing the backfill instead of completing. - Stopped logging a spurious "declarative schema changer does not support DISCARD" message every time a
DISCARDstatement was executed. The message had no functional impact but could produce very high log volume on busy clusters that issueDISCARDon every connection checkout. - Fixed a hang in
IMPORT INTOrollback where the revert could wedge the job indefinitely until the node was restarted. - Fixed a bug where unqualified function calls could fail with incorrect privilege errors when two databases on the same cluster had identically-named functions in custom schemas. The query cache could serve a memo from one database context to another, causing
USAGEprivilege errors referencing schemas from the wrong database. - Fixed an issue where
ALTER TYPE ... DROP VALUEcould fail on enums referenced by very large tables when the validation scan ran long enough for GC to invalidate its read timestamp. The schema changer now installs a protected timestamp over referencing tables for the duration of the scan. - Fixed a bug where
RESTORE TABLEof a multi-region table backed up mid-ALTER TABLE ... SET LOCALITYwould fail with a descriptor rewrite error. - Fixed a bug where formatting a
UNIQUEconstraint orPRIMARY KEYthat used both storage parameters (WITH (...)) and aWHEREclause or visibility clause could produce invalid SQL that CockroachDB could not parse. - Fixed incorrect results in
ST_3DDistance,ST_3DDWithin,ST_3DShortestLine, andST_3DClosestPointfor polygons lying in a vertical plane, and improved detection of when a line passes through a 3D polygon's interior. - Fixed a bug where Physical Cluster Replication (PCR) reader virtual clusters could permanently fail authentication, causing all SQL connections to fail with "descriptor not found".
- Fixed a bug where some scalar expressions could incorrectly fail type checking with "unsupported binary operator" errors. These expressions now proceed further through type checking, which can allow them to succeed or return a more accurate error message.
- Fixed a bug in
cockroach debug tsdumpwhere the dump output could omit labeled histogram child time series (for example,changefeed.sink_backpressure_nanos{scope="default"}-countandchangefeed.sink_backpressure_nanos{scope="default"}-p99), even when thetimeseries.persist_child_metrics.enabledcluster setting was enabled. - Fixed a data race in the multi-metric allocator between gossip-driven store load updates and concurrent lease/replica rebalancing decisions.
- Fixed a bug that could cause
DROP COLUMN ... CASCADEto return an error referencing an internal placeholder column name when concurrent writes occurred during a schema change. - Fixed a bug where
make_date(),make_timestamp(), andmake_timestamptz()could return an incorrect year for negative (BC) year inputs. CockroachDB now interprets negative years as "N BC", matching PostgreSQL semantics. - A long-running
BACKUPto S3 usingAUTH=implicitno longer fails with anExpiredTokenerror when it races the rotation of the underlying short-lived credentials. The S3 client now retriesExpiredToken,ExpiredTokenException, andRequestExpirederrors the same way the legacyaws-sdk-gov1 client did. - The AWS S3 and KMS clients now refresh short-lived credentials a few seconds before they expire, rather than only after expiry. This avoids
ExpiredTokenerrors that could occasionally fail long-runningBACKUP,RESTORE, or other operations when running withAUTH=implicitagainst credentials providers that issue short-lived tokens. - Columns produced by set-returning functions in FROM clauses can now be referenced using the function name as a qualifier (e.g.
SELECT jsonb_each_text.key FROM jsonb_each_text(j)), matching PostgreSQL behavior. - Fixed a job profiler assertion failure that could occur when requesting execution details for a job that was currently running
- Fixed a rare nil pointer panic in the internal SQL executor.
- The
^operator and thepower()andpow()built-in functions now return an error (instead ofNaNorInf) for invalid float exponentiation, such as a negative base with a non-integer exponent or a zero base with a negative exponent. This matches PostgreSQL behavior and prevents invalid values from propagating to downstream functions, such as geospatial functions. - Fixed a bug where dropping a table with
exclude_data_from_backupenabled could cause a concurrentBACKUPholding a protected timestamp on the table's data to fail with the errorbatch timestamp must be after replica GC threshold. - The
storage.compression.crmetric now includes blob files. - The
pg_get_function_argumentsandpg_get_function_identity_argumentsbuilt-in functions now include parameter names, parameter modes (OUTandINOUT),VARIADICparameters, andDEFAULTclauses for user-defined routines, matching PostgreSQL behavior. Previously, these functions returned only comma-separated input argument types. - Fixed a bug where using the pgwire extended query protocol to bind parameters (including enum types) to a prepared statement after rolling back to a savepoint could cause an internal error (
read sequence number is ignored after savepoint rollback). - Fixed a bug where using the pgwire extended query protocol to prepare a statement after rolling back to a savepoint could cause an internal error (
read sequence number is ignored after savepoint rollback). This bug affected client drivers that use theParsemessage (extended protocol) instead of simple query execution. - Fixed a panic of the form
runtime error: index out of range [N] with length Nthat could occur when running aCOPY FROMconcurrently with anALTER TABLE ADD COLUMN. - Fixed a bug where
IMPORT INTOfrom Parquet files could cause cascading node crashes across a cluster when the specified column list excluded a non-last table column. - Fixed a compatibility bug where casting an OID to
regclass,regproc,regprocedure, or a user-definedregtypeand then to text emitted only the bare entity name. CockroachDB now follows PostgreSQL and emits the schema-qualified name (schema.name, with each component quoted only when necessary) whenever the bare name would not resolve back to the same OID through the currentsearch_path. pg_function_is_visiblenow matches PostgreSQL's signature-aware semantics: a function in a non-search-path schema whose signature is disjoint from same-named functions in earlier search-path schemas is correctly reported as visible (true) rather than shadowed.- Fixed a
no stores for meansForStoreSetpanic in the multi-metric allocator (MMA) store rebalancer that could occur when the rebalancer's periodic tick raced gossip propagation of store descriptors during process startup. The rebalancer now skips its work for that tick and retries on the next interval. - Fixed a limitation/warning for Active Session History (ASH) when enabled on high-core nodes.
- Fixed a crash that could occur when
st_linemergewas called on invalid geometries that containNaNcoordinates. - Fixed a bug where queries calling a UDF that transitively performs mutations could incorrectly use a LeafTxn, potentially leading to incorrect behavior.
- Fixed some node-to-node connection error paths during
DistSQLexecution to correctly return error code58C01(InternalConnectionFailure) instead ofXXUUU(Uncategorized). - Fixed an internal optimizer assertion that could cause query planning to fail, most notably during
INSPECTindex consistency checks, with an "estimated distinct count must be non-zero" error when the optimizer encountered inconsistent column statistics. - Fixed a bug in the legacy replica allocator where ranges with
voter_constraintsdiscriminating sibling stores on the same node could get stuck on the wrong sibling indefinitely. - Fixed a bug where logging large-row events could cause excessive memory usage and potentially lead to out-of-memory (OOM) crashes when a single statement wrote many rows larger than the
sql.guardrails.max_row_size_logthreshold (particularly with wide primary keys). The logged primary key is now size-bounded, and large-row event logging is rate-limited withSkippedLargeRowsreporting suppressed events. - Fixed a bug that could cause an internal error when executing a prepared statement with an untyped
NULLargument. - Fixed a regression where the Jobs page could display duplicate titles when embedded in the CockroachDB Cloud Console with the new navigation enabled.
- Fixed a bug where the DB Console on virtual clusters showed zero values for histogram-based charts (such as Service Latency and SQL Execution Latency) even though the metrics were being recorded correctly. Prior to this fix, the metrics were visible in Prometheus scrapes (
/_status/vars) and Datadog but not in the DB Console. - Fixed a bug where
ALTER DATABASE system DROP REGIONcould fail with the errorunsupported comparison: bytes to crdb_internal_regionwhen thesystemdatabase was configured as multi-region. - DDL and
current_userinside aSECURITY DEFINERstored procedure now resolve against the procedure owner, matching PostgreSQL. Previously they evaluated against the invoker. - Fixed a bug where
pg_class.relhastriggersalways reportedfalse, even for tables that had triggers defined. - Fixed a bug that could cause an internal error during
INSERT,UPDATE, orUPSERTon aREGIONAL BY ROWtable configured withinfer_rbr_region_col_using_constraintwhen the referenced parent table did not have a unique constraint covering the foreign key's non-region columns. The region is now inferred by selecting an arbitrary matching parent row. - Fixed a bug where creating a user-defined function or view could fail with an internal error if its body contained
NULL::REGCLASSor aREGCLASSparameter that evaluated toNULL. - Fixed a planning issue where queries that use
FOR UPDATE SKIP LOCKEDwithORDER BYon an unindexed column andLIMITcould lock more rows than necessary. This could cause concurrent sessions to skip those rows and return fewer results than expected. These queries now lock only the rows needed to satisfy theLIMIT.
Performance improvements
- Fixed a performance bug that could prevent query plans containing user-defined functions (UDFs) from being cached. Repeated executions of prepared statements that reference UDFs now have less planning overhead.
- Improved performance in some prepared statements by storing inline placeholder equalities into other references of the same column, such as correlated subqueries. This change enables constrained index scans in prepared statements where previously a full scan was required.
- Statement executions using canary stats will no longer use cached plans, which prevents cache thrashing but causes a slight increase in planning time over statement executions using stable stats.
- Improved performance of queries against
information_schema.routineswhen looking up role information for built-in functions. - Fixed a bug that caused pretty-printing of large SQL statements to fail due to exceeding max recursion depth.
- Improved throughput for the Kafka v2 changefeed sink by increasing the per-broker limit to 5 concurrent produce requests, matching the v1 behavior.
- Fixed a bug where the optimizer could fail to generate efficient generic plans for queries whose filters reference placeholders and also include subqueries (such as
EXISTS, scalar subqueries, orANY) that reference the same placeholder. - Improved performance for concurrent protected
timestampprotect and release calls, such as those used byBACKUPoperations and changefeeds. - Enabled parallelization of multi-key lookup joins for all lookup joins by default, improving performance of general mutation statements. Previously, this behavior applied only to mutations on multi-region tables. To restore the previous behavior, set
parallelize_multi_key_lookup_joins_only_on_mr_mutationstotrue. - Improved performance on queries that use
ORDER BYwithLIMITon hash-sharded secondary indexes by using an efficientUNION ALLplan instead of falling back to a full table scan. Previously, either an index hint orSET unconstrained_non_covering_index_scan_enabled = on;were required to use an efficientUNION ALLplan when the index was non-covering.
Miscellaneous
Added a new session variable
optimizer_span_limitthat bounds the number of spans the optimizer will allow in a single constrained index scan. If a singleINset has more items than this limit, thatINset will not be used to build a constrained index scan. If the cross product of two or moreINsets would produce more spans than this limit for a composite index, then only a prefix of theINsets will be used to produce spans.For example, for the following table and query, only the predicates on columns
aandbwill be used to construct the constrained scan ofabc_idx, because including the predicate on columncwould produce more spans thanoptimizer_span_limit:CREATE TABLE abc (a INT, b INT, c INT, INDEX abc_idx (a, b, c)); SET optimizer_span_limit = 10; SELECT * FROM abc WHERE a IN (1, 3, 5) AND b IN (2, 4, 6) AND c IN (7, 9, 11);Upgraded the CockroachDB Go toolchain to version 1.26.2.