Reviews, audits, and modifies CockroachDB cluster settings. Self-Hosted has full control over all settings and start flags. Advanced/BYOC can modify most SQL-level settings but infrastructure settings are managed by CRL. Standard has limited settings access — session variables are the primary tuning mechanism. Basic has minimal settings — use session variables and Cloud Console. Use when auditing configuration, tuning performance, or troubleshooting settings-related issues.
94
92%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Reviews, audits, and modifies CockroachDB cluster settings. Before providing procedures, this skill gathers context to determine which settings are available and which modification approach to recommend for the operator's tier.
For version management: Use upgrading-cluster-version — do not change settings during an upgrade. For health checks: Use reviewing-cluster-health.
| Question | Options | Why It Matters |
|---|---|---|
| Deployment tier? | Self-Hosted, Advanced, BYOC, Standard, Basic | Determines which settings are viewable and modifiable |
| Goal? | Audit/review, Tune performance, Fix specific issue, Post-upgrade verification | Directs which queries and procedures to use |
If Self-Hosted:
| Question | Options | Why It Matters |
|---|---|---|
| SQL access level? | admin, MODIFYCLUSTERSETTING, VIEWCLUSTERSETTING | Determines available operations |
| Specific setting or area? | e.g., "timeout", "replication", "gc" | Narrows search to relevant settings |
| Currently mid-upgrade? | Yes, No | Settings must NOT be changed during rolling upgrades |
If Advanced or BYOC:
| Question | Options | Why It Matters |
|---|---|---|
| SQL access level? | admin, limited | Determines available operations |
| Specific setting or area? | e.g., "timeout", "rangefeed" | Narrows search |
If Standard or Basic: No additional context needed — settings access is limited. Session variables are the primary tuning mechanism.
| Tier | Settings Access | Go To |
|---|---|---|
| Self-Hosted | Full | Self-Hosted Settings |
| Advanced / BYOC | Most (some restricted) | Advanced / BYOC Settings |
| Standard | Limited | Standard Settings |
| Basic | Minimal | Basic Settings |
These read-only queries work on Self-Hosted and Advanced/BYOC. Standard and Basic may have restricted visibility — see tier-specific sections below.
SELECT variable, value, setting_type, description
FROM [SHOW ALL CLUSTER SETTINGS]
WHERE value != default_value ORDER BY variable;SELECT variable, value FROM [SHOW ALL CLUSTER SETTINGS]
WHERE variable IN (
'kv.rangefeed.enabled', 'sql.stats.automatic_collection.enabled',
'server.time_until_store_dead', 'admission.kv.enabled',
'gc.ttlseconds', 'cluster.preserve_downgrade_option',
'sql.defaults.idle_in_transaction_session_timeout'
) ORDER BY variable;SELECT variable, value, description FROM [SHOW ALL CLUSTER SETTINGS]
WHERE variable LIKE '%<keyword>%' OR description LIKE '%<keyword>%'
ORDER BY variable;See sql-queries reference for additional audit queries. See recommended-values reference for production-recommended settings.
Applies when: Tier = Self-Hosted
Full control over all cluster settings and node-level start flags.
SHOW CLUSTER SETTING <name>; -- Document current value first
SET CLUSTER SETTING <name> = <value>; -- Apply
SHOW CLUSTER SETTING <name>; -- VerifyRESET CLUSTER SETTING <name>;Node-level settings are cockroach start flags and cannot be changed at runtime. To change: drain the node, stop the process, update flags, restart. See performing-cluster-maintenance.
See node-level-settings reference for the complete list of start flags.
CockroachDB Self-Hosted requires an enterprise license for features like backup/restore, changefeeds, encryption at rest, and multi-region capabilities. The license is stored as a cluster setting.
Check current license:
SHOW CLUSTER SETTING cluster.organization;
SHOW CLUSTER SETTING enterprise.license;Install or renew a license:
SET CLUSTER SETTING cluster.organization = '<organization-name>';
SET CLUSTER SETTING enterprise.license = '<license-key>';Verify license is active:
SELECT * FROM [SHOW CLUSTER SETTING enterprise.license];License expiry: Expired licenses do not cause data loss or cluster unavailability. Enterprise features (backups, CDC, EAR) stop working until renewed. Core features remain available. Monitor license expiry proactively.
CockroachDB Core (free): If running without an enterprise license, no license management is needed. Core features are always available.
Applies when: Tier = Advanced or BYOC
Most SQL-level cluster settings are modifiable. Infrastructure-level settings are managed by Cockroach Labs.
SET CLUSTER SETTING sql.defaults.idle_in_transaction_session_timeout = '300s';
SET CLUSTER SETTING sql.defaults.statement_timeout = '30s';
SET CLUSTER SETTING kv.rangefeed.enabled = true;
-- gc.ttlseconds is a zone configuration parameter, not a cluster setting
ALTER RANGE default CONFIGURE ZONE USING gc.ttlseconds = 86400;Settings managed by Cockroach Labs that cannot be modified:
server.time_until_store_deadkv.snapshot_rebalance.max_ratecluster.preserve_downgrade_option (use Cloud Console for upgrades)--cache, --max-sql-memory) — managed by CRLIf a modification is rejected, the error will indicate the setting is managed by CockroachDB Cloud. Use Cloud Console or contact support.
License: Enterprise license is managed automatically by Cockroach Labs on Advanced/BYOC. No customer action needed.
See cloud-restricted-settings reference for the full list.
Applies when: Tier = Standard
Standard is a multi-tenant managed service. Most cluster settings are not modifiable because changes could affect other tenants. Use session variables as the primary tuning mechanism.
-- Per-session
SET statement_timeout = '30s';
-- Default for all sessions (preferred over sql.defaults.*)
ALTER ROLE ALL SET statement_timeout = '30s';
ALTER ROLE ALL SET idle_in_transaction_session_timeout = '300s';SET and ALTER ROLENote: SHOW ALL CLUSTER SETTINGS may return a limited set of settings on Standard.
Applies when: Tier = Basic
Basic is a serverless offering with minimal settings access. Infrastructure is fully managed and auto-scales. Use session variables for SQL-level tuning.
SET statement_timeout = '30s';
ALTER ROLE ALL SET statement_timeout = '30s';All other configuration is managed by Cockroach Labs. If more control over settings is needed, consider upgrading to Standard or Advanced.
Read-only queries are safe on all tiers.
Before modifying any setting:
description field)Risk levels:
sql.defaults.statement_timeout, diagnostics.reporting.enabledgc.ttlseconds, kv.snapshot_rebalance.max_ratecluster.preserve_downgrade_option, admission.kv.enabledCritical: Never change settings during a rolling upgrade. Cluster settings affect ALL workloads on the cluster — prefer session variables for narrower scope when possible.
See safety-guide reference for detailed risk assessments per setting.
| Issue | Tier | Fix |
|---|---|---|
| "permission denied" on SET | SH/ADV/BYOC | Grant MODIFYCLUSTERSETTING or use admin role |
| "managed by Cloud" error | ADV/BYOC | Setting restricted on this tier; use Cloud Console or contact support |
| Setting not visible | STD/BAS | Expected — limited settings visibility on multi-tenant/serverless tiers |
| No visible effect | SH/ADV/BYOC | Check for session variable override; verify with SHOW |
| Setting reverted after upgrade | SH | Re-apply; document in operational runbook |
| Enterprise features stopped working | SH | License expired; renew with SET CLUSTER SETTING enterprise.license |
| "enterprise license required" error | SH | Install license or use core-only alternative |
Skill references:
Related skills:
Official CockroachDB Documentation:
84bc1e4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.