SHOW {session variable}

On this page Carat arrow pointing down

Use the SHOW statement to display the value of one or all of the session variables. You configure session variables using SET.

Required privileges

No privileges are required to display the session variables.

Synopsis

SHOW SESSION session_var
Note:

The SHOW statement for session variables is unrelated to the other SHOW statements like SHOW CLUSTER SETTING, SHOW CREATE, and SHOW DATABASES.

Parameters

Parameter Description
var_name The session variable name to show.
The variable name is case-insensitive and can be enclosed in double quotes.

Supported variables

Read-only indicates whether the variable can be changed in a session with SET. Cluster Setting identifies the cluster setting that supplies the default value, when applicable.

Variable Name Description Default Value Read-only Cluster Setting
allow_ordinal_column_referencesControls whether the deprecated ordinal column reference syntax (e.g., SELECT @1 FROM t) is allowed.offNo-
allow_role_memberships_to_change_during_transactionControls whether operations consulting role membership cache retain their lease throughout the transaction.offNo-
allow_unsafe_internalsControls access to unsafe internals in the system database and the crdb_internal schema. When off, queries to those namespaces will fail. Usage of unsafe internals is audited via the SENSITIVE_ACCESS logging channel.offNo-
alter_primary_region_super_region_overrideControls whether the user can modify a primary region that is part of a super region.offNosql.defaults.override_alter_primary_region_in_super_region.enabled
always_distribute_full_scansControls whether full table scans always force the plan to be distributed, regardless of the estimated row count.offNo-
application_nameSets the name of the application running the current session. Used for logging and per-application statistics.-No-
authentication_methodThe authentication method used for the session.-Yes-
autocommit_before_ddlCauses any DDL statement received during an explicit transaction to auto-commit before executing the schema change. This is useful because CockroachDB does not fully support multiple schema changes in a single transaction.onNosql.defaults.autocommit_before_ddl.enabled
avoid_bufferingIndicates that the returned data should not be buffered by conn executor. This is currently used by replication primitives to ensure the data is flushed to the consumer immediately.offNo-
avoid_full_table_scans_in_mutationsControls whether mutation queries that plan full table scans should be avoided.onNo-
backslash_quoteControls whether backslash can be used as a quote escape character (compatibility setting).safe_encodingNo-
buffered_writes_implicit_txns_enabledControls whether buffered writes are enabled for implicit transactions.offNo-
buffered_writes_use_locking_on_non_unique_indexesControls whether buffered writes use locking on non-unique indexes.offNo-
bypass_pcr_reader_catalog_aostDisables the AOST used by all user queries on the PCR reader catalog.offNo-
bytea_outputControls how to encode byte arrays when converting to string.hexNo-
canary_stats_modeControls which table statistics are used for query planning: 'force_canary' always uses the newest stats, 'force_stable' always uses the second-newest stats, and 'auto' (default) defers to the sql.stats.canary_fraction cluster setting to decide probabilistically.autoNo-
check_function_bodiesControls whether functions are validated during function creation.onNo-
client_encodingControls the client-side character encoding. Only UTF8 is supported.UTF8No-
client_min_messagesControls which message levels are sent to the client.noticeNo-
close_cursors_at_commitDetermines whether cursors remain open after their parent transaction closes.onNo-
copy_fast_path_enabledControls whether the optimized copy mode is enabled.onNo-
copy_from_atomic_enabledWhen enabled, implicit transaction COPY FROM operations are committed atomically, matching PostgreSQL behavior. When disabled, rows are segmented into batches unless issued within an explicit transaction.onNo-
copy_from_retries_enabledControls whether retries should be internally attempted for retriable errors in COPY FROM operations.onNo-
copy_num_retries_per_batchDetermines the number of times a single batch of rows can be retried for non-atomic COPY operations.5No-
copy_transaction_quality_of_serviceSets the admission control priority of the transactions used to evaluate COPY commands.backgroundNo-
copy_write_pipelining_enabledControls whether write pipelining is enabled for implicit transactions used by COPY.offNo-
cost_scans_with_default_col_sizeControls whether the optimizer should cost scans and joins using a default number of bytes per column instead of column sizes from statistics.offNosql.defaults.cost_scans_with_default_col_size.enabled
crdb_versionThe version of CockroachDB.-Yes-
create_table_with_schema_lockedControls whether CREATE TABLE acquires a schema lock on the parent schema.onNosql.defaults.create_table_with_schema_locked
databaseSets the current database for resolving names in queries.-No-
datestyleControls the display format for date and time values as well as the rules for interpreting ambiguous date inputs.ISO, MDYNosql.defaults.datestyle
deadlock_timeoutSets the amount of time to wait on a lock before checking for deadlock. If set to 0, there is no timeout.0sNo-
declare_cursor_statement_timeout_enabledControls whether statement timeouts apply during DECLARE CURSOR operations.onNo-
default_int_sizeSpecifies the size in bits or bytes (preferred) of how the INT type should be parsed.8Nosql.defaults.default_int_size
default_table_access_methodSets the default table access method (compatibility setting).heapNo-
default_tablespaceSupported only for pg compatibility - CockroachDB has no notion of tablespaces.-No-
default_text_search_configSets the default text search configuration used for builtins like `to_tsvector` and `to_tsquery`.pg_catalog.englishNo-
default_transaction_isolationSets the transaction isolation level of new transactions.serializableNo-
default_transaction_prioritySets the default priority of newly created transactions.normalNo-
default_transaction_quality_of_serviceSets the default admission control priority of newly created transactions.regularNo-
default_transaction_read_onlySets whether new transactions are read-only by default.offNo-
default_transaction_use_follower_readsWhen enabled, all read-only transactions use `AS OF SYSTEM TIME follower_read_timestamp()` to allow follower reads. When disabled, read-only transactions only use follower reads if an explicit `AS OF SYSTEM TIME` clause is specified.offNo-
default_with_oidsControls whether new tables are created with OIDs by default (compatibility setting).offNo-
descriptor_validationControls whether schema object descriptors are validated at read and write time, read time only, or never.onNo-
direct_columnar_scans_enabledControls whether the COL_BATCH_RESPONSE scan format should be used for ScanRequests and ReverseScanRequests whenever possible.offNosql.distsql.direct_columnar_scans.enabled
disable_changefeed_replicationDisables changefeed events from being emitted for data changes made in a session, applying to new transactions only.offNo-
disable_hoist_projection_in_join_limitationDisables the restrictions placed on projection hoisting during query planning in the optimizer.offNo-
disable_optimizer_rulesAllows disabling specific optimizer transformation rules by name, specified as a comma-separated list.-No-
disable_partially_distributed_plansControls whether partially distributed plans are disabled.offNo-
disable_plan_gistsControls whether plan gists are disabled.offNo-
disable_vec_union_eager_cancellationDisables the eager cancellation that is performed by the vectorized engine when transitioning into the draining state in some cases.offNo-
disable_wait_for_jobs_noticeControls whether the notice about waiting for jobs to complete is suppressed.offNo-
disallow_full_table_scansWhen enabled, queries on tables with a row count greater than large_full_scan_rows will not use full table or index scans. If no other query plan is possible, queries will return an error. This setting does not apply to internal queries.offNosql.defaults.disallow_full_table_scans.enabled
distribute_group_by_row_count_thresholdSets the minimum number of rows estimated to be processed by the GroupBy operator to distribute the plan.1000No-
distribute_join_row_count_thresholdSets the minimum number of rows estimated to be processed from both inputs by the hash or merge join to distribute the plan.1000No-
distribute_scan_row_count_thresholdSets the minimum number of rows estimated to be read by the Scan operator to distribute the plan.10000No-
distribute_sort_row_count_thresholdSets the minimum number of rows estimated to be processed by the Sort operator to distribute the plan.1000No-
distsqlControls the query distribution mode for the session. By default, CockroachDB determines which queries benefit from distributed execution. Distribution thresholds for specific operations are controlled by `distribute_group_by_row_count_threshold`, `distribute_scan_row_count_threshold`, and `distribute_sort_row_count_threshold`.autoNosql.defaults.distsql
distsql_plan_gateway_biasControls how many more partition spans the gateway node can be assigned compared to other nodes when distributing SQL execution.2No-
distsql_prevent_partitioning_soft_limited_scansControls whether the DistSQL planner prevents partitioning of soft-limited scans across multiple nodes.onNo-
distsql_use_reduced_leaf_write_setsControls whether distributed SQL uses reduced write sets for leaf transactions.onNo-
distsql_workmemDetermines how much RAM (in bytes) a single operation of a single query can use before it has to spill to disk.64 MiBNosql.distsql.temp_storage.workmem
enable_auto_rehomingControls whether auto-rehoming is enabled for REGIONAL BY ROW tables.offNosql.defaults.experimental_auto_rehoming.enabled
enable_create_stats_using_extremesControls whether CREATE STATISTICS using the EXTREMES method is enabled.onNo-
enable_create_stats_using_extremes_bool_enumControls whether CREATE STATISTICS using the EXTREMES method is enabled for boolean and enum types.offNo-
enable_durable_locking_for_serializableControls whether FOR UPDATE and FOR SHARE locks are replicated via Raft under serializable isolation, allowing locks to be preserved across lease transfers. Enabling this adds latency to locking statements. This matches the default READ COMMITTED behavior.offNo-
enable_experimental_alter_column_type_generalControls whether ALTER TABLE ... ALTER COLUMN ... TYPE can be used for general conversions requiring online schema changes.offNosql.defaults.experimental_alter_column_type.enabled
enable_implicit_fk_locking_for_serializableControls whether shared locks are used to perform foreign key checks under serializable isolation. Requires enable_shared_locking_for_serializable to also be enabled.offNo-
enable_implicit_select_for_updateControls whether `FOR UPDATE` locking may be used during the row-fetch phase of mutation statements.onNosql.defaults.implicit_select_for_update.enabled
enable_implicit_transaction_for_batch_statementsControls whether a batch of statements sent in one query is executed as an implicit transaction.onNo-
enable_insert_fast_pathControls whether the fast path for INSERT operations with VALUES input may be used.onNosql.defaults.insert_fast_path.enabled
enable_multiple_modifications_of_tableAllows statements with multiple modification subqueries for the same table, risking data corruption if rows are modified multiple times.offNo-
enable_multiregion_placement_policyControls whether placement can be used in multi-region contexts.offNosql.defaults.multiregion_placement_policy.enabled
enable_seqscanenable_seqscan is included for compatibility with Postgres; changing it has no effect.onNo-
enable_shared_locking_for_serializableControls whether SELECT FOR SHARE statements acquire shared locks under serializable isolation. When off, FOR SHARE statements are still permitted but silently do not lock.offNo-
enable_zigzag_joinControls whether the optimizer should try to plan a zigzag join.offNosql.defaults.zigzag_join.enabled
enforce_home_regionWhen enabled, queries return an error if they cannot run entirely in the gateway's home region, such as when reading from multiple home regions in a REGIONAL BY ROW table. Only tables with ZONE survivability can be scanned without error when this is enabled.offNo-
escape_string_warningControls whether warnings are issued for escape string syntax.onNo-
expect_and_ignore_not_visible_columns_in_copyChanges behavior for COPY FROM to expect and ignore not visible column fields.offNo-
experimental_enable_implicit_column_partitioningControls whether implicit column partitioning can be created.offNosql.defaults.experimental_implicit_column_partitioning.enabled
experimental_enable_temp_tablesControls whether temporary tables can be created.offNosql.defaults.experimental_temporary_tables.enabled
experimental_enable_unique_without_index_constraintsControls whether creating unique constraints without an index is allowed.offNosql.defaults.experimental_enable_unique_without_index_constraints.enabled
experimental_hash_group_join_enabledControls whether the physical planner will convert a hash join followed by hash aggregator into a single hash group-join.offNo-
extra_float_digitsSets the number of digits beyond the standard number to use for float conversions.1No-
force_savepoint_restartOverrides the default SAVEPOINT behavior for compatibility with certain ORMs.offNo-
foreign_key_cascades_limitSets the maximum number of cascading operations for foreign key actions.10000Nosql.defaults.foreign_key_cascades_limit
idle_in_transaction_session_timeoutSets the maximum allowed duration for an idle transaction session. The session is terminated if it exceeds this limit.0sNosql.defaults.idle_in_transaction_session_timeout
idle_session_timeoutSets the maximum allowed duration for an idle session. The session is terminated if it exceeds this limit.0sNosql.defaults.idle_in_session_timeout
index_join_streamer_batch_sizeSets the size limit on input rows to the ColIndexJoin operator when using the Streamer API for a single lookup KV batch.8.0 MiBNosql.distsql.index_join_streamer.batch_size
index_recommendations_enabledControls whether index recommendations are enabled.onNo-
initial_retry_backoff_for_read_committedSets the initial backoff duration for automatic retries of statements in explicit READ COMMITTED transactions that encounter retry errors.2msNo-
inject_retry_errors_enabledCauses statements (except SET) inside explicit transactions to return a transaction retry error for testing application retry logic. If the client retries using the cockroach_restart savepoint, the transaction proceeds normally after the 3rd retry error.offNo-
inject_retry_errors_on_commit_enabledCauses statements inside explicit transactions to return a retry error just before transaction commit for testing retry logic.offNo-
integer_datetimesReports whether integer datetime representation is used (always on).onYes-
intervalstyleControls the display format for `INTERVAL` values.postgresNosql.defaults.intervalstyle
is_superuserIndicates whether the current user has superuser privileges.offYes-
join_reader_index_join_strategy_batch_sizeSets the size limit on input rows to the joinReader processor when performing index joins for a single lookup KV batch.4.0 MiBNosql.distsql.join_reader_index_join_strategy.batch_size
join_reader_no_ordering_strategy_batch_sizeSets the size limit on input rows to the joinReader processor (when ordering is not maintained) for a single lookup KV batch.2.0 MiBNosql.distsql.join_reader_no_ordering_strategy.batch_size
join_reader_ordering_strategy_batch_sizeSets the size limit on input rows to the joinReader processor (when ordering must be maintained) for a single lookup KV batch.100 KiBNosql.distsql.join_reader_ordering_strategy.batch_size
kv_transaction_buffered_writes_enabledControls whether the buffered writes KV transaction protocol is used for user queries on the current session. Changes made in an explicit transaction apply only to later transactions.onNokv.transaction.write_buffering.enabled
large_full_scan_rowsSets the estimated row count at which a full scan is considered large and worthy of logging or disabling.0Nosql.defaults.large_full_scan_rows
lc_collateReports the database collation locale.C.UTF-8Yes-
lc_ctypeReports the database character classification locale.C.UTF-8Yes-
lc_messagesSets the language in which messages are displayed (compatibility setting).C.UTF-8No-
lc_monetarySets the locale for formatting monetary amounts (compatibility setting).C.UTF-8No-
lc_numericSets the locale for formatting numbers (compatibility setting).C.UTF-8No-
lc_timeSets the locale for formatting dates and times (compatibility setting).C.UTF-8No-
legacy_varchar_typingControls the legacy behavior of allowing some invalid mix-typed comparisons with VARCHAR types.offNo-
localityThe locality of the current node, as set by `cockroach start --locality`.-Yes-
locality_optimized_partitioned_index_scanControls whether locality-optimized partitioned index scans are enabled.onNosql.defaults.locality_optimized_partitioned_index_scan.enabled
lock_timeoutSets the maximum amount of time a query can spend acquiring or waiting for a single row-level lock. Unlike in PostgreSQL, non-locking reads in CockroachDB also wait for conflicting locks, so this timeout applies to writes as well as locking and non-locking reads. If set to 0, queries do not time out due to lock acquisitions.0sNosql.defaults.lock_timeout
log_timezoneThe timezone used for logging (always UTC).UTCNo-
max_connectionsReports the maximum number of concurrent connections.-Yes-
max_identifier_lengthThe maximum length allowed for identifiers.-Yes-
max_index_keysReports the maximum number of index keys (always 32).32Yes-
max_prepared_transactionsReports the maximum number of prepared transactions (always maximum int32).2147483647Yes-
max_retries_for_read_committedSets the maximum number of automatic retries for statements in explicit READ COMMITTED transactions that encounter retry errors.100No-
multiple_active_portals_enabledDetermines if pgwire portal execution for certain queries can be paused, allowing interleaved execution with local plans.offNo-
node_idThe ID of the current node.-Yes-
null_ordered_lastControls whether NULL values are ordered last. When true, NULL values appear after non-NULL values in ordered results.offNo-
on_update_rehome_row_enabledControls whether the ON UPDATE rehome_row() will actually trigger on row updates.onNosql.defaults.on_update_rehome_row.enabled
opt_split_scan_limitSets the maximum number of UNION ALL statements a Scan may be split into during query optimization to avoid a sort.2048No-
optimizerControls whether the cost-based optimizer is enabled.onNo-
optimizer_always_use_histogramsEnsures that the optimizer always uses histograms to calculate statistics if available.onNo-
optimizer_check_input_min_row_countSets a lower bound on row count estimates for the buffer scan of foreign key and uniqueness checks.1No-
optimizer_clamp_inequality_selectivityControls whether the optimizer clamps selectivity estimates for inequality predicates to improve cardinality estimation accuracy.onNo-
optimizer_clamp_low_histogram_selectivityControls whether the optimizer clamps low selectivity estimates from histogram statistics to prevent overly optimistic cardinality estimates.onNo-
optimizer_disable_cross_region_cascade_fast_path_for_rbr_tablesControls whether the optimizer disables the cross-region cascade fast path optimization for REGIONAL BY ROW tables.onNo-
optimizer_enable_lock_elisionControls whether the optimizer can eliminate unnecessary locking operations.onNo-
optimizer_hoist_uncorrelated_equality_subqueriesControls whether the optimizer hoists uncorrelated subqueries in equality expressions with columns, potentially producing more efficient plans.onNo-
optimizer_inline_any_unnest_subqueryControls whether the optimizer inlines subqueries containing ANY expressions combined with UNNEST.onNo-
optimizer_merge_joins_enabledControls whether the optimizer should explore query plans with merge joins.onNo-
optimizer_min_row_countSets a lower bound on row count estimates during query planning, except for expressions with zero cardinality.1No-
optimizer_plan_lookup_joins_with_reverse_scansControls whether the optimizer can plan lookup joins using reverse index scans.onNo-
optimizer_prefer_bounded_cardinalityInstructs the optimizer to prefer query plans where every expression has a bounded cardinality over plans with unbounded cardinality expressions.onNo-
optimizer_prove_implication_with_virtual_computed_columnsControls whether the optimizer should use virtual computed columns to prove partial index implication.onNo-
optimizer_push_limit_into_project_filtered_scanControls whether the optimizer should push limit expressions into projects of filtered scans.onNo-
optimizer_push_offset_into_index_joinControls whether the optimizer should push offset expressions into index joins.onNo-
optimizer_span_limitSets the maximum number of constraint spans allowed in a scan during query optimization. 0 means no limit.0No-
optimizer_use_conditional_hoist_fixPrevents the optimizer from hoisting volatile expressions that are conditionally executed by CASE, COALESCE, or IFERR expressions.onNo-
optimizer_use_delete_range_fast_pathControls whether the optimizer uses the fast path for DELETE operations using range deletions.onNo-
optimizer_use_exists_filter_hoist_ruleControls whether the optimizer hoists filters out of EXISTS subqueries.onNo-
optimizer_use_forecastsControls whether the optimizer should use statistics forecasts for cardinality estimation.onNo-
optimizer_use_histogramsControls whether the optimizer should use histogram statistics for cardinality estimation.onNosql.defaults.optimizer_use_histograms.enabled
optimizer_use_improved_computed_column_filters_derivationEnables the optimizer to derive filters on computed columns in more cases beyond simple single-column equations.onNo-
optimizer_use_improved_disjunction_statsControls whether the optimizer should use improved statistics calculations for disjunctive filters.onNo-
optimizer_use_improved_distinct_on_limit_hint_costingControls whether the optimizer should use an improved costing estimate for DistinctOn operators with limit hints.onNo-
optimizer_use_improved_hoist_join_projectControls whether the optimizer uses an improved rule for hoisting projections out of joins.onNo-
optimizer_use_improved_join_eliminationAllows the optimizer to eliminate joins in more cases by remapping columns from eliminated joins to equivalent columns.onNo-
optimizer_use_improved_multi_column_selectivity_estimateControls whether the optimizer should use an improved selectivity estimate for multi-column predicates.onNo-
optimizer_use_improved_split_disjunction_for_joinsEnables the optimizer to split more disjunctions (OR expressions) in join conditions by building a UNION of join expressions.onNo-
optimizer_use_improved_trigram_similarity_selectivityControls whether the optimizer should use an improved selectivity estimate for trigram similarity filters.onNo-
optimizer_use_improved_zigzag_join_costingControls whether the optimizer should use improved logic in the cost model for zigzag joins.onNo-
optimizer_use_limit_ordering_for_streaming_group_byEnables optimization for 'SELECT ... GROUP BY ... ORDER BY ... LIMIT n' queries by using the limit ordering to inform group-by requirements.onNo-
optimizer_use_lock_elision_multiple_familiesControls whether the optimizer enables lock elision for operations involving multiple column families.offNo-
optimizer_use_lock_op_for_serializableControls whether the optimizer implements SELECT FOR UPDATE and FOR SHARE using the Lock operator under serializable isolation.offNo-
optimizer_use_max_frequency_selectivityControls whether the optimizer uses the maximum frequency value for selectivity estimation.onNo-
optimizer_use_merged_partial_statisticsControls whether the optimizer should use statistics merged from partial and full statistics for cardinality estimation.onNo-
optimizer_use_min_row_count_anti_join_fixControls whether the optimizer uses a fix for minimum row count estimation in anti-join operations.onNo-
optimizer_use_multicol_statsControls whether the optimizer should use multi-column statistics for cardinality estimation.onNosql.defaults.optimizer_use_multicol_stats.enabled
optimizer_use_not_visible_indexesControls whether the optimizer can still choose to use not visible indexes for query plans.offNo-
optimizer_use_polymorphic_parameter_fixControls whether the optimizer validates routine polymorphic parameters during overload resolution and type-checking.onNo-
optimizer_use_provided_ordering_fixControls whether the optimizer reconciles provided orderings with required ordering choices to prevent internal errors.onNo-
optimizer_use_trigram_similarity_optimizationControls whether the optimizer should generate improved plans for queries with trigram similarity filters.onNo-
optimizer_use_virtual_computed_column_statsControls whether the optimizer should use statistics on virtual computed columns for cardinality estimation.onNo-
override_multi_region_zone_configControls whether zone configurations can be modified for multi-region databases and their objects.offNosql.defaults.override_multi_region_zone_config.enabled
parallelize_multi_key_lookup_joins_avg_lookup_ratioSets the average lookup ratio threshold for parallelizing multi-key lookup joins.10No-
parallelize_multi_key_lookup_joins_avg_lookup_row_sizeSets the average lookup row size threshold for parallelizing multi-key lookup joins.100 KiBNo-
parallelize_multi_key_lookup_joins_enabledControls whether the join reader should parallelize lookup batches. When enabled, this increases the speed of lookup joins with multiple looked up rows at the cost of increased memory usage.offNosql.distsql.parallelize_multi_key_lookup_joins.enabled
parallelize_multi_key_lookup_joins_max_lookup_ratioSets the maximum lookup ratio threshold for parallelizing multi-key lookup joins.10000No-
parallelize_multi_key_lookup_joins_only_on_mr_mutationsControls whether parallelization of multi-key lookup joins is restricted to multi-row mutations only.onNo-
password_encryptionThe encryption method used for passwords.scram-sha-256No-
pg_trgm.similarity_thresholdSets the value used to compare trigram similarities for the string % string overload.0.3No-
plan_cache_modeControls the method that the optimizer should use to choose between a custom and generic query plan.autoNosql.defaults.plan_cache_mode
plpgsql_use_strict_intoCauses PL/pgSQL "SELECT ... INTO" and "RETURNING INTO" syntax to always behave as if specified with STRICT option.offNo-
prefer_lookup_joins_for_fksCauses foreign key operations to prefer lookup joins.offNosql.defaults.prefer_lookup_joins_for_fks.enabled
prepared_statements_cache_sizeCauses the LRU prepared statements in a session to be automatically deallocated when total prepared statement memory usage exceeds this value.0 BNo-
prevent_update_set_column_dropControls whether columns referenced in an UPDATE SET clause are prevented from being dropped.onNo-
propagate_admission_header_to_leaf_transactionsControls whether admission control headers are propagated to leaf transactions in distributed queries.onNo-
propagate_input_orderingControls whether to propagate inner ordering to the outer scope when planning subqueries or CTEs if the outer scope is unordered.offNosql.defaults.propagate_input_ordering.enabled
recursion_depth_limitSets the maximum depth that nested trigger function calls can reach.1000No-
register_latch_wait_contention_eventsControls whether contention events are registered for latch wait operations.offNo-
reorder_joins_limitSets the number of joins at which the optimizer should stop attempting to reorder.8Nosql.defaults.reorder_joins_limit
require_explicit_primary_keysControls whether CREATE TABLE statements should error out if no primary key is provided.offNosql.defaults.require_explicit_primary_keys.enabled
results_buffer_sizeSpecifies the size at which the pgwire results buffer will self-flush.-Yes-
roleThe current role for the session.noneNo-
row_securityControls whether row level security is enabled.onNo-
search_pathSets the list of namespaces to search when resolving unqualified names."$user", publicNo-
serial_normalizationControls how `SERIAL` columns are normalized.rowidNosql.defaults.serial_normalization
server_encodingReports the database encoding (always UTF8). This cannot be changed.UTF8Yes-
server_versionReports the server version string.13.0.0Yes-
server_version_numReports the server version as an integer.130000Yes-
session_idThe unique identifier for the current session.-Yes-
show_primary_key_constraint_on_not_visible_columnsControls whether SHOW CONSTRAINTS and pg_catalog.pg_constraint include primary key constraints with only hidden columns.onNo-
sql_safe_updatesWhen enabled, disallows potentially unsafe SQL statements: `DROP DATABASE` of a non-empty database, `DELETE` and `UPDATE` without a `WHERE` clause (unless a `LIMIT` clause is included), `SELECT ... FOR UPDATE`/`FOR SHARE` without a `WHERE` or `LIMIT` clause, `ALTER TABLE ... DROP COLUMN`, and converting an existing table to `REGIONAL BY ROW` unless a region column has already been added.offNo-
sslControls whether SSL is enabled.-Yes-
standard_conforming_stringsControls whether strings conform to SQL standard.onNo-
statement_timeoutSets the maximum allowed duration for a statement. The query is cancelled if it exceeds this limit.0sNosql.defaults.statement_timeout
streamer_always_maintain_orderingControls whether the SQL users of the DistSQL Streamer should always maintain ordering, even when not strictly necessary.offNo-
streamer_enabledControls whether the DistSQL Streamer API can be used.onNosql.distsql.use_streamer.enabled
streamer_head_of_line_only_fractionControls the fraction of the DistSQL streamer's memory budget used for the head-of-the-line request when the eager memory usage limit has been exceeded.0.8No-
streamer_in_order_eager_memory_usage_fractionControls the fraction of the DistSQL streamer's memory budget that might be used for issuing requests eagerly in the InOrder mode.0.5No-
streamer_out_of_order_eager_memory_usage_fractionControls the fraction of the DistSQL streamer's memory budget that might be used for issuing requests eagerly in the OutOfOrder mode.0.8No-
strict_ddl_atomicityWhen enabled, causes errors when DDL operations inside an explicit transaction cannot be guaranteed to be performed atomically, preventing partial transaction commits.offNo-
stub_catalog_tablesControls whether catalog tables are stubbed out.onNosql.defaults.stub_catalog_tables.enabled
synchronize_seqscansControls whether synchronized sequential scans are enabled (compatibility setting).onNo-
synchronous_commitsynchronous_commit is included for compatibility with Postgres; changing it has no effect.onNo-
system_identityIndicates the original name of the client presented to pgwire before it was mapped to a SQL identifier.-Yes-
tcp_keepalives_countSets the number of TCP keepalive probes to send before giving up on the connection.0No-
tcp_keepalives_idleSets the time interval in seconds before TCP keepalive probes are sent on idle connections.0No-
tcp_keepalives_intervalSets the time interval in seconds between TCP keepalive probes.0No-
tcp_user_timeoutSets the time in milliseconds before a connection is forcibly closed if data is not acknowledged.0No-
testing_optimizer_cost_perturbationControls the random cost perturbation factor for producing non-optimal query plans during testing.0No-
testing_optimizer_disable_rule_probabilitySets the probability of randomly disabling non-essential optimizer transformation rules for testing.0No-
testing_optimizer_inject_panicsControls whether random panics are injected during optimization to test error-propagation.offNo-
testing_optimizer_random_seedSets a random seed for the optimizer for testing by initializing an RNG with the given integer.0No-
testing_vectorize_inject_panicsControls whether random panics are injected into vectorized execution to test error propagation.offNo-
timezoneSets the timezone used for parsing timestamps.UTCNo-
tracingControls whether tracing is enabled for the session.-Yes-
transaction_isolationThe isolation level of the current transaction. Possible values are `SERIALIZABLE` and `READ COMMITTED`. Also allows the isolation level to change as long as queries have not been executed yet.serializableNo-
transaction_priorityThe priority level of the current transaction. Possible values are `LOW`, `NORMAL`, and `HIGH`.-Yes-
transaction_read_onlyControls whether the current transaction is read-only.offNo-
transaction_rows_read_errSets the limit for the number of rows read by a SQL transaction which - once exceeded - will fail the transaction (0 means disabled).0Nosql.defaults.transaction_rows_read_err
transaction_rows_read_logSets the threshold for the number of rows read by a SQL transaction which - once exceeded - will trigger a logging event.0Nosql.defaults.transaction_rows_read_log
transaction_rows_written_errThe limit for the number of rows written by a SQL transaction which - once exceeded - will fail the transaction (0 means disabled).0Nosql.defaults.transaction_rows_written_err
transaction_rows_written_logSets the threshold for the number of rows written by a SQL transaction which - once exceeded - will trigger a logging event.0Nosql.defaults.transaction_rows_written_log
transaction_statusReports the current transaction status.-Yes-
transaction_timeoutSets the maximum duration a transaction is permitted to run before cancellation.0sNo-
troubleshooting_modeWhen enabled, avoids performing additional work on queries such as collecting and emitting telemetry data. This is particularly useful when the cluster is experiencing issues, unavailability, or failure.offNo-
unbounded_parallel_scansControls whether the TableReader DistSQL processors should parallelize scans across ranges.offNo-
unconstrained_non_covering_index_scan_enabledControls whether unconstrained non-covering index scan access paths are explored by the optimizer.offNo-
unsafe_allow_triggers_modifying_cascadesWhen enabled, allows row-level BEFORE triggers to modify or filter rows that are being updated or deleted as part of a cascading foreign key action. This is unsafe because it can lead to constraint violations.offNo-
use_backups_with_idsControls whether backup operations use backup IDs.offNo-
use_cputs_on_non_unique_indexesControls whether conditional puts (CPuts) at the KV layer are used on non-unique indexes.offNo-
use_declarative_schema_changerControls whether the declarative schema changer is used.onNosql.defaults.use_declarative_schema_changer
use_improved_routine_dependency_trackingControls whether improved dependency tracking is used for stored procedures and routines.onNo-
use_improved_routine_deps_triggers_and_computed_colsControls whether improved dependency tracking is used for routines involving triggers and computed columns.onNo-
use_pre_25_2_variadic_builtinsControls whether pre-25.2 variadic built-in function behavior is used.offNo-
use_proc_txn_control_extended_protocol_fixControls whether a fix for procedure transaction control with the extended protocol is enabled.onNo-
use_soft_limit_for_distribute_scanControls whether soft limits are used for distributing scans across nodes.onNo-
use_swap_mutationsControls whether swap mutations are used as an alternative mutation strategy.offNo-
variable_inequality_lookup_join_enabledControls whether the optimizer should consider lookup joins with inequality conditions.onNo-
vector_search_beam_sizeSets the beam width for vector search operations.32No-
vector_search_rerank_multiplierSets the multiplier for re-ranking candidates in vector search results.50No-
vectorizeControls if and when the Executor executes queries using the columnar execution engine. Can be 'off', 'on', or 'experimental_always'.onNosql.defaults.vectorize
xmloptionSets how XML data is to be implicitly parsed (compatibility setting).contentNo-

For session variables on features in preview, see Features in Preview.

Special syntax cases supported for compatibility:

Syntax Equivalent to
SHOW TRANSACTION PRIORITY SHOW "transaction priority"
SHOW TRANSACTION ISOLATION LEVEL SHOW "transaction isolation level"
SHOW TIME ZONE SHOW "timezone"
SHOW TRANSACTION STATUS SHOW "transaction status"

Examples

Showing the value of a single session variable

icon/buttons/copy
> SHOW DATABASE;
  database
------------
  movr
(1 row)

Showing the value of all session variables

icon/buttons/copy
> SHOW ALL;
       variable       |      value
----------------------+-------------------
  application_name    | $ cockroach demo
  bytea_output        | hex
  client_encoding     | UTF8
  client_min_messages | notice
...

See also

×