Cluster settings apply to all nodes of a CockroachDB cluster and control, for example, whether or not to share diagnostic details with Cockroach Labs as well as advanced options for debugging and cluster tuning.
They can be updated anytime after a cluster has been started, but only by a member of the admin
role, to which the root
user belongs by default.
In contrast to cluster-wide settings, node-level settings apply to a single node. They are defined by flags passed to the cockroach start
command when starting a node and cannot be changed without stopping and restarting the node. For more details, see Start a Node.
Settings
These cluster settings have a broad impact on CockroachDB internals and affect all applications, workloads, and users running on a CockroachDB cluster. For some settings, a session setting could be a more appropriate scope.
Setting | Type | Default | Description |
---|---|---|---|
admission.kv.enabled | boolean | false | when true, work performed by the KV layer is subject to admission control |
admission.sql_kv_response.enabled | boolean | false | when true, work performed by the SQL layer when receiving a KV response is subject to admission control |
admission.sql_sql_response.enabled | boolean | false | when true, work performed by the SQL layer when receiving a DistSQL response is subject to admission control |
bulkio.backup.resolve_destination_in_job.enabled | boolean | false | defer the interaction with the external storage used to resolve backup destination until the job starts |
bulkio.stream_ingestion.minimum_flush_interval | duration | 5s | the minimum timestamp between flushes; flushes may still occur if internal buffers fill up |
changefeed.node_throttle_config | string |
| specifies node level throttling configuration for all changefeeeds |
cloudstorage.http.custom_ca | string |
| custom root CA (appended to system's default CAs) for verifying certificates when interacting with HTTPS storage |
cloudstorage.timeout | duration | 10m0s | the timeout for import/export storage operations |
cluster.organization | string |
| organization name |
cluster.preserve_downgrade_option | string |
| disable (automatic or manual) cluster version upgrade from the specified version until reset |
diagnostics.active_query_dumps.enabled | boolean | true | experimental: enable dumping of anonymized active queries to disk when node is under memory pressure |
diagnostics.forced_sql_stat_reset.interval | duration | 2h0m0s | interval after which the reported SQL Stats are reset even if not collected by telemetry reporter. It has a max value of 24H. |
diagnostics.reporting.enabled | boolean | true | enable reporting diagnostic metrics to cockroach labs |
diagnostics.reporting.interval | duration | 1h0m0s | interval at which diagnostics data should be reported |
enterprise.license | string |
| the encoded cluster license |
external.graphite.endpoint | string |
| if nonempty, push server metrics to the Graphite or Carbon server at the specified host:port |
external.graphite.interval | duration | 10s | the interval at which metrics are pushed to Graphite (if enabled) |
feature.backup.enabled | boolean | true | set to true to enable backups, false to disable; default is true |
feature.changefeed.enabled | boolean | true | set to true to enable changefeeds, false to disable; default is true |
feature.export.enabled | boolean | true | set to true to enable exports, false to disable; default is true |
feature.import.enabled | boolean | true | set to true to enable imports, false to disable; default is true |
feature.restore.enabled | boolean | true | set to true to enable restore, false to disable; default is true |
feature.schema_change.enabled | boolean | true | set to true to enable schema changes, false to disable; default is true |
feature.stats.enabled | boolean | true | set to true to enable CREATE STATISTICS/ANALYZE, false to disable; default is true |
jobs.retention_time | duration | 336h0m0s | the amount of time to retain records for completed jobs before |
kv.allocator.load_based_lease_rebalancing.enabled | boolean | true | set to enable rebalancing of range leases based on load and latency |
kv.allocator.load_based_rebalancing | enumeration | leases and replicas | whether to rebalance based on the distribution of QPS across stores [off = 0, leases = 1, leases and replicas = 2] |
kv.allocator.qps_rebalance_threshold | float | 0.25 | minimum fraction away from the mean a store's QPS (such as queries per second) can be before it is considered overfull or underfull |
kv.allocator.range_rebalance_threshold | float | 0.05 | minimum fraction away from the mean a store's range count can be before it is considered overfull or underfull |
kv.bulk_io_write.max_rate | byte size | 1.0 TiB | the rate limit (bytes/sec) to use for writes to disk on behalf of bulk io ops |
kv.bulk_sst.max_allowed_overage | byte size | 64 MiB | if positive, allowed size in excess of target size for SSTs from export requests; export requests (i.e. BACKUP) may buffer up to the sum of kv.bulk_sst.target_size and kv.bulk_sst.max_allowed_overage in memory |
kv.bulk_sst.target_size | byte size | 16 MiB | target size for SSTs emitted from export requests; export requests (i.e. BACKUP) may buffer up to the sum of kv.bulk_sst.target_size and kv.bulk_sst.max_allowed_overage in memory |
kv.closed_timestamp.follower_reads_enabled | boolean | true | allow (all) replicas to serve consistent historical reads based on closed timestamp information |
kv.protectedts.reconciliation.interval | duration | 5m0s | the frequency for reconciling jobs with protected timestamp records |
kv.range_split.by_load_enabled | boolean | true | allow automatic splits of ranges based on where load is concentrated |
kv.range_split.load_qps_threshold | integer | 2500 | the QPS over which, the range becomes a candidate for load based splitting |
kv.rangefeed.enabled | boolean | false | if set, rangefeed registration is enabled |
kv.replication_reports.interval | duration | 1m0s | the frequency for generating the replication_constraint_stats, replication_stats_report and replication_critical_localities reports (set to 0 to disable) |
kv.snapshot_rebalance.max_rate | byte size | 8.0 MiB | the rate limit (bytes/sec) to use for rebalance and upreplication snapshots |
kv.snapshot_receiver.reservation_queue_timeout_fraction | float | 0.4 | the fraction of a snapshot's total timeout that it is allowed to spend queued on the receiver waiting for a reservation |
kv.snapshot_recovery.max_rate | byte size | 8.0 MiB | the rate limit (bytes/sec) to use for recovery snapshots |
kv.transaction.max_intents_bytes | integer | 4194304 | maximum number of bytes used to track locks in transactions |
kv.transaction.max_refresh_spans_bytes | integer | 256000 | maximum number of bytes used to track refresh spans in serializable transactions |
kv.transaction.reject_over_max_intents_budget.enabled | boolean | false | if set, transactions that exceed their lock tracking budget (kv.transaction.max_intents_bytes) are rejected instead of having their lock spans imprecisely compressed |
schedules.backup.gc_protection.enabled | boolean | false | enable chaining of GC protection across backups run as part of a schedule; default is false |
security.ocsp.mode | enumeration | off | use OCSP to check whether TLS certificates are revoked. If the OCSP server is unreachable, in strict mode all certificates will be rejected and in lax mode all certificates will be accepted. [off = 0, lax = 1, strict = 2] |
security.ocsp.timeout | duration | 3s | timeout before considering the OCSP server unreachable |
server.auth_log.sql_connections.enabled | boolean | false | if set, log SQL client connect and disconnect events (note: may hinder performance on loaded nodes) |
server.auth_log.sql_sessions.enabled | boolean | false | if set, log SQL session login/disconnection events (note: may hinder performance on loaded nodes) |
server.authentication_cache.enabled | boolean | true | enables a cache used during authentication to avoid lookups to system tables when retrieving per-user authentication-related information |
server.clock.forward_jump_check_enabled | boolean | false | if enabled, forward clock jumps > max_offset/2 will cause a panic |
server.clock.persist_upper_bound_interval | duration | 0s | the interval between persisting the wall time upper bound of the clock. The clock does not generate a wall time greater than the persisted timestamp and will panic if it sees a wall time greater than this value. When cockroach starts, it waits for the wall time to catch-up till this persisted timestamp. This guarantees monotonic wall time across server restarts. Not setting this or setting a value of 0 disables this feature. |
server.consistency_check.max_rate | byte size | 8.0 MiB | the rate limit (bytes/sec) to use for consistency checks; used in conjunction with server.consistency_check.interval to control the frequency of consistency checks. Note that setting this too high can negatively impact performance. |
server.eventlog.enabled | boolean | true | if set, logged notable events are also stored in the table system.eventlog |
server.eventlog.ttl | duration | 2160h0m0s | if nonzero, entries in system.eventlog older than this duration are deleted every 10m0s. Should not be lowered below 24 hours. |
server.host_based_authentication.configuration | string |
| host-based authentication configuration to use during connection authentication |
server.hsts.enabled | boolean | false | if true, HSTS headers will be sent along with all HTTP requests. The headers will contain a max-age setting of one year. Browsers honoring the header will always use HTTPS to access the DB Console. Ensure that TLS is correctly configured prior to enabling. |
server.identity_map.configuration | string |
| system-identity to database-username mappings |
server.oidc_authentication.autologin | boolean | false | if true, logged-out visitors to the DB Console will be automatically redirected to the OIDC login endpoint (this feature is experimental) |
server.oidc_authentication.button_text | string | Login with your OIDC provider | text to show on button on DB Console login page to login with your OIDC provider (only shown if OIDC is enabled) (this feature is experimental) |
server.oidc_authentication.claim_json_key | string |
| sets JSON key of principal to extract from payload after OIDC authentication completes (usually email or sid) (this feature is experimental) |
server.oidc_authentication.client_id | string |
| sets OIDC client id (this feature is experimental) |
server.oidc_authentication.client_secret | string |
| sets OIDC client secret (this feature is experimental) |
server.oidc_authentication.enabled | boolean | false | enables or disabled OIDC login for the DB Console (this feature is experimental) |
server.oidc_authentication.principal_regex | string | (.+) | regular expression to apply to extracted principal (see claim_json_key setting) to translate to SQL user (golang regex format, must include 1 grouping to extract) (this feature is experimental) |
server.oidc_authentication.provider_url | string |
| sets OIDC provider URL ({provider_url}/.well-known/openid-configuration must resolve) (this feature is experimental) |
server.oidc_authentication.redirect_url | string | https://localhost:8080/oidc/v1/callback | sets OIDC redirect URL via a URL string or a JSON string containing a required `redirect_urls` key with an object that maps from region keys to URL strings (URLs should point to your load balancer and must route to the path /oidc/v1/callback) (this feature is experimental) |
server.oidc_authentication.scopes | string | openid | sets OIDC scopes to include with authentication request (space delimited list of strings, required to start with `openid`) (this feature is experimental) |
server.rangelog.ttl | duration | 720h0m0s | if nonzero, range log entries older than this duration are deleted every 10m0s. Should not be lowered below 24 hours. |
server.shutdown.drain_wait | duration | 0s | the amount of time a server waits in an unready state before proceeding with the rest of the shutdown process (note that the --drain-wait parameter for cockroach node drain may need adjustment after changing this setting) |
server.shutdown.lease_transfer_wait | duration | 5s | the amount of time a server waits to transfer range leases before proceeding with the rest of the shutdown process (note that the --drain-wait parameter for cockroach node drain may need adjustment after changing this setting) |
server.shutdown.query_wait | duration | 10s | the server will wait for at least this amount of time for active queries to finish (note that the --drain-wait parameter for cockroach node drain may need adjustment after changing this setting) |
server.time_until_store_dead | duration | 5m0s | the time after which if there is no new gossiped information about a store, it is considered dead |
server.user_login.store_client_pre_hashed_passwords.enabled | boolean | false | whether the server accepts to store passwords pre-hashed by clients |
server.user_login.timeout | duration | 10s | timeout after which client authentication times out if some system range is unavailable (0 = no timeout) |
server.web_session.auto_logout.timeout | duration | 168h0m0s | the duration that web sessions will survive before being periodically purged, since they were last used |
server.web_session.purge.max_deletions_per_cycle | integer | 10 | the maximum number of old sessions to delete for each purge |
server.web_session.purge.period | duration | 1h0m0s | the time until old sessions are deleted |
server.web_session.purge.ttl | duration | 1h0m0s | if nonzero, entries in system.web_sessions older than this duration are periodically purged |
server.web_session_timeout | duration | 168h0m0s | the duration that a newly created web session will be valid |
sql.auth.resolve_membership_single_scan.enabled | boolean | false | determines whether to populate the role membership cache with a single scan |
sql.cross_db_fks.enabled | boolean | false | if true, creating foreign key references across databases is allowed |
sql.cross_db_sequence_owners.enabled | boolean | false | if true, creating sequences owned by tables from other databases is allowed |
sql.cross_db_views.enabled | boolean | false | if true, creating views that refer to other databases is allowed |
sql.defaults.copy_partitioning_when_deinterleaving_table.enabled | boolean | false | default value for enable_copying_partitioning_when_deinterleaving_table session variable |
sql.defaults.datestyle | enumeration | iso, mdy | default value for DateStyle session setting [iso, mdy = 0, iso, dmy = 1, iso, ymd = 2] |
sql.defaults.datestyle.enabled | boolean | false | default value for datestyle_enabled session setting |
sql.defaults.default_int_size | integer | 8 | the size, in bytes, of an INT type |
sql.defaults.disallow_full_table_scans.enabled | boolean | false | setting to true rejects queries that have planned a full table scan |
sql.defaults.distsql | enumeration | auto | default distributed SQL execution mode [off = 0, auto = 1, on = 2] |
sql.defaults.drop_enum_value.enabled | boolean | false | default value for enable_drop_enum_value; allows for dropping enum values |
sql.defaults.experimental_alter_column_type.enabled | boolean | false | default value for experimental_alter_column_type session setting; enables the use of ALTER COLUMN TYPE for general conversions |
sql.defaults.experimental_auto_rehoming.enabled | boolean | false | default value for experimental_enable_auto_rehoming; allows for rows in REGIONAL BY ROW tables to be auto-rehomed on UPDATE |
sql.defaults.experimental_distsql_planning | enumeration | off | default experimental_distsql_planning mode; enables experimental opt-driven DistSQL planning [off = 0, on = 1] |
sql.defaults.experimental_enable_unique_without_index_constraints.enabled | boolean | false | default value for experimental_enable_unique_without_index_constraints session setting;disables unique without index constraints by default |
sql.defaults.experimental_hash_sharded_indexes.enabled | boolean | false | default value for experimental_enable_hash_sharded_indexes; allows for creation of hash sharded indexes by default |
sql.defaults.experimental_implicit_column_partitioning.enabled | boolean | false | default value for experimental_enable_temp_tables; allows for the use of implicit column partitioning |
sql.defaults.experimental_new_schema_changer.enabled | enumeration | off | default value for experimental_use_new_schema_changer session setting;disables new schema changer by default [off = 0, on = 1, unsafe_always = 2] |
sql.defaults.experimental_stream_replication.enabled | boolean | false | default value for experimental_stream_replication session setting;enables the ability to setup a replication stream |
sql.defaults.experimental_temporary_tables.enabled | boolean | false | default value for experimental_enable_temp_tables; allows for use of temporary tables by default |
sql.defaults.foreign_key_cascades_limit | integer | 10000 | default value for foreign_key_cascades_limit session setting; limits the number of cascading operations that run as part of a single query |
sql.defaults.idle_in_session_timeout | duration | 0s | default value for the idle_in_session_timeout; default value for the idle_in_session_timeout session setting; controls the duration a session is permitted to idle before the session is terminated; if set to 0, there is no timeout |
sql.defaults.idle_in_transaction_session_timeout | duration | 0s | default value for the idle_in_transaction_session_timeout; controls the duration a session is permitted to idle in a transaction before the session is terminated; if set to 0, there is no timeout |
sql.defaults.implicit_select_for_update.enabled | boolean | true | default value for enable_implicit_select_for_update session setting; enables FOR UPDATE locking during the row-fetch phase of mutation statements |
sql.defaults.insert_fast_path.enabled | boolean | true | default value for enable_insert_fast_path session setting; enables a specialized insert path |
sql.defaults.interleaved_tables.enabled | boolean | false | allows creation of interleaved tables or indexes |
sql.defaults.intervalstyle | enumeration | postgres | default value for IntervalStyle session setting [postgres = 0, iso_8601 = 1, sql_standard = 2] |
sql.defaults.intervalstyle.enabled | boolean | false | default value for intervalstyle_enabled session setting |
sql.defaults.large_full_scan_rows | float | 1000 | default value for large_full_scan_rows session setting which determines the maximum table size allowed for a full scan when disallow_full_table_scans is set to true |
sql.defaults.locality_optimized_partitioned_index_scan.enabled | boolean | true | default value for locality_optimized_partitioned_index_scan session setting; enables searching for rows in the current region before searching remote regions |
sql.defaults.lock_timeout | duration | 0s | default value for the lock_timeout; default value for the lock_timeout session setting; controls the duration a query is permitted to wait while attempting to acquire a lock on a key or while blocking on an existing lock in order to perform a non-locking read on a key; if set to 0, there is no timeout |
sql.defaults.on_update_rehome_row.enabled | boolean | true | default value for on_update_rehome_row; enables ON UPDATE rehome_row() expressions to trigger on updates |
sql.defaults.optimizer_use_histograms.enabled | boolean | true | default value for optimizer_use_histograms session setting; enables usage of histograms in the optimizer by default |
sql.defaults.optimizer_use_multicol_stats.enabled | boolean | true | default value for optimizer_use_multicol_stats session setting; enables usage of multi-column stats in the optimizer by default |
sql.defaults.override_multi_region_zone_config.enabled | boolean | false | default value for override_multi_region_zone_config; allows for overriding the zone configs of a multi-region table or database |
sql.defaults.prefer_lookup_joins_for_fks.enabled | boolean | false | default value for prefer_lookup_joins_for_fks session setting; causes foreign key operations to use lookup joins when possible |
sql.defaults.primary_region | string |
| if not empty, all databases created without a PRIMARY REGION will implicitly have the given PRIMARY REGION |
sql.defaults.reorder_joins_limit | integer | 8 | default number of joins to reorder |
sql.defaults.require_explicit_primary_keys.enabled | boolean | false | default value for requiring explicit primary keys in CREATE TABLE statements |
sql.defaults.results_buffer.size | byte size | 16 KiB | default size of the buffer that accumulates results for a statement or a batch of statements before they are sent to the client. This can be overridden on an individual connection with the 'results_buffer_size' parameter. Note that auto-retries generally only happen while no results have been delivered to the client, so reducing this size can increase the number of retriable errors a client receives. On the other hand, increasing the buffer size can increase the delay until the client receives the first result row. Updating the setting only affects new connections. Setting to 0 disables any buffering. |
sql.defaults.serial_normalization | enumeration | rowid | default handling of SERIAL in table definitions [rowid = 0, virtual_sequence = 1, sql_sequence = 2, sql_sequence_cached = 3] |
sql.defaults.statement_timeout | duration | 0s | default value for the statement_timeout; default value for the statement_timeout session setting; controls the duration a query is permitted to run before it is canceled; if set to 0, there is no timeout |
sql.defaults.stub_catalog_tables.enabled | boolean | true | default value for stub_catalog_tables session setting |
sql.defaults.transaction_rows_read_err | integer | 0 | the limit for the number of rows read by a SQL transaction which - once exceeded - will fail the transaction (or will trigger a logging event to SQL_INTERNAL_PERF for internal transactions); use 0 to disable |
sql.defaults.transaction_rows_read_log | integer | 0 | the threshold for the number of rows read by a SQL transaction which - once exceeded - will trigger a logging event to SQL_PERF (or SQL_INTERNAL_PERF for internal transactions); use 0 to disable |
sql.defaults.transaction_rows_written_err | integer | 0 | the limit for the number of rows written by a SQL transaction which - once exceeded - will fail the transaction (or will trigger a logging event to SQL_INTERNAL_PERF for internal transactions); use 0 to disable |
sql.defaults.transaction_rows_written_log | integer | 0 | the threshold for the number of rows written by a SQL transaction which - once exceeded - will trigger a logging event to SQL_PERF (or SQL_INTERNAL_PERF for internal transactions); use 0 to disable |
sql.defaults.vectorize | enumeration | on | default vectorize mode [on = 0, on = 2, experimental_always = 3, off = 4] |
sql.defaults.zigzag_join.enabled | boolean | true | default value for enable_zigzag_join session setting; allows use of zig-zag join by default |
sql.distsql.max_running_flows | integer | -128 | the value - when positive - used as is, or the value - when negative - multiplied by the number of CPUs on a node, to determine the maximum number of concurrent remote flows that can be run on the node |
sql.distsql.temp_storage.workmem | byte size | 64 MiB | maximum amount of memory in bytes a processor can use before falling back to temp storage |
sql.guardrails.max_row_size_err | byte size | 512 MiB | maximum size of row (or column family if multiple column families are in use) that SQL can write to the database, above which an error is returned; use 0 to disable |
sql.guardrails.max_row_size_log | byte size | 64 MiB | maximum size of row (or column family if multiple column families are in use) that SQL can write to the database, above which an event is logged to SQL_PERF (or SQL_INTERNAL_PERF if the mutating statement was internal); use 0 to disable |
sql.hash_sharded_range_pre_split.max | integer | 16 | max pre-split ranges to have when adding hash sharded index to an existing table |
sql.log.slow_query.experimental_full_table_scans.enabled | boolean | false | when set to true, statements that perform a full table/index scan will be logged to the slow query log even if they do not meet the latency threshold. Must have the slow query log enabled for this setting to have any effect. |
sql.log.slow_query.internal_queries.enabled | boolean | false | when set to true, internal queries which exceed the slow query log threshold are logged to a separate log. Must have the slow query log enabled for this setting to have any effect. |
sql.log.slow_query.latency_threshold | duration | 0s | when set to non-zero, log statements whose service latency exceeds the threshold to a secondary logger on each node |
sql.metrics.index_usage_stats.enabled | boolean | true | collect per index usage statistics |
sql.metrics.max_mem_reported_stmt_fingerprints | integer | 100000 | the maximum number of reported statement fingerprints stored in memory |
sql.metrics.max_mem_reported_txn_fingerprints | integer | 100000 | the maximum number of reported transaction fingerprints stored in memory |
sql.metrics.max_mem_stmt_fingerprints | integer | 100000 | the maximum number of statement fingerprints stored in memory |
sql.metrics.max_mem_txn_fingerprints | integer | 100000 | the maximum number of transaction fingerprints stored in memory |
sql.metrics.statement_details.dump_to_logs | boolean | false | dump collected statement statistics to node logs when periodically cleared |
sql.metrics.statement_details.enabled | boolean | true | collect per-statement query statistics |
sql.metrics.statement_details.gateway_node.enabled | boolean | true | save the gateway node for each statement fingerprint. If false, the value will be stored as 0. |
sql.metrics.statement_details.plan_collection.enabled | boolean | true | periodically save a logical plan for each fingerprint |
sql.metrics.statement_details.plan_collection.period | duration | 5m0s | the time until a new logical plan is collected |
sql.metrics.statement_details.threshold | duration | 0s | minimum execution time to cause statement statistics to be collected. If configured, no transaction stats are collected. |
sql.metrics.transaction_details.enabled | boolean | true | collect per-application transaction statistics |
sql.multiple_modifications_of_table.enabled | boolean | false | if true, allow statements containing multiple INSERT ON CONFLICT, UPSERT, UPDATE, or DELETE subqueries modifying the same table, at the risk of data corruption if the same row is modified multiple times by a single statement (multiple INSERT subqueries without ON CONFLICT cannot cause corruption and are always allowed) |
sql.multiregion.drop_primary_region.enabled | boolean | true | allows dropping the PRIMARY REGION of a database if it is the last region |
sql.notices.enabled | boolean | true | enable notices in the server/client protocol being sent |
sql.optimizer.uniqueness_checks_for_gen_random_uuid.enabled | boolean | false | if enabled, uniqueness checks may be planned for mutations of UUID columns updated with gen_random_uuid(); otherwise, uniqueness is assumed due to near-zero collision probability |
sql.spatial.experimental_box2d_comparison_operators.enabled | boolean | false | enables the use of certain experimental box2d comparison operators |
sql.stats.automatic_collection.enabled | boolean | true | automatic statistics collection mode |
sql.stats.automatic_collection.fraction_stale_rows | float | 0.2 | target fraction of stale rows per table that will trigger a statistics refresh |
sql.stats.automatic_collection.min_stale_rows | integer | 500 | target minimum number of stale rows per table that will trigger a statistics refresh |
sql.stats.cleanup.recurrence | string | @hourly | cron-tab recurrence for SQL Stats cleanup job |
sql.stats.flush.enabled | boolean | true | if set, SQL execution statistics are periodically flushed to disk |
sql.stats.flush.interval | duration | 10m0s | the interval at which SQL execution statistics are flushed to disk, this value must be less than or equal to sql.stats.aggregation.interval |
sql.stats.histogram_collection.enabled | boolean | true | histogram collection mode |
sql.stats.multi_column_collection.enabled | boolean | true | multi-column statistics collection mode |
sql.stats.persisted_rows.max | integer | 1000000 | maximum number of rows of statement and transaction statistics that will be persisted in the system tables |
sql.stats.post_events.enabled | boolean | false | if set, an event is logged for every CREATE STATISTICS job |
sql.stats.response.max | integer | 20000 | the maximum number of statements and transaction stats returned in a CombinedStatements request |
sql.telemetry.capture_index_usage_stats.enabled | boolean | true | enable/disable capturing index usage statistics to the telemetry logging channel |
sql.telemetry.query_sampling.enabled | boolean | false | when set to true, executed queries will emit an event on the telemetry logging channel |
sql.temp_object_cleaner.cleanup_interval | duration | 30m0s | how often to clean up orphaned temporary objects |
sql.temp_object_cleaner.wait_interval | duration | 30m0s | how long after creation a temporary object will be cleaned up |
sql.trace.log_statement_execute | boolean | false | set to true to enable logging of executed statements |
sql.trace.session_eventlog.enabled | boolean | false | set to true to enable session tracing; note that enabling this may have a negative performance impact |
sql.trace.stmt.enable_threshold | duration | 0s | enables tracing on all statements; statements executing for longer than this duration will have their trace logged (set to 0 to disable); note that enabling this may have a negative performance impact; this setting applies to individual statements within a transaction and is therefore finer-grained than sql.trace.txn.enable_threshold |
sql.trace.txn.enable_threshold | duration | 0s | enables tracing on all transactions; transactions open for longer than this duration will have their trace logged (set to 0 to disable); note that enabling this may have a negative performance impact; this setting is coarser-grained than sql.trace.stmt.enable_threshold because it applies to all statements within a transaction as well as client communication (e.g. retries) |
timeseries.storage.enabled | boolean | true | if set, periodic timeseries data is stored within the cluster; disabling is not recommended unless you are storing the data elsewhere |
timeseries.storage.resolution_10s.ttl | duration | 240h0m0s | the maximum age of time series data stored at the 10 second resolution. Data older than this is subject to rollup and deletion. |
timeseries.storage.resolution_30m.ttl | duration | 2160h0m0s | the maximum age of time series data stored at the 30 minute resolution. Data older than this is subject to deletion. |
trace.datadog.agent | string |
| if set, traces will be sent to this DataDog agent; use |
trace.datadog.project | string | CockroachDB | the project under which traces will be reported to the DataDog agent if trace.datadog.agent is set. Only one tracer can be configured at a time. |
trace.debug.enable | boolean | false | if set, traces for recent requests can be seen at https:// |
trace.lightstep.token | string |
| if set, traces go to Lightstep using this token |
trace.zipkin.collector | string |
| if set, traces go to the given Zipkin instance (example: '127.0.0.1:9411'). Only one tracer can be configured at a time. |
version | version | 21.2 | set the active cluster version in the format ' |
View current cluster settings
Use the SHOW CLUSTER SETTING
statement.
Change a cluster setting
Use the SET CLUSTER SETTING
statement.
Before changing a cluster setting, please note the following:
Changing a cluster setting is not instantaneous, as the change must be propagated to other nodes in the cluster.
Do not change cluster settings while upgrading to a new version of CockroachDB. Wait until all nodes have been upgraded before you make the change.