Skip to main content

Configuration

Goose has a number of configuration options that can be used to change the behavior of the system.

The configuration options can be set using either the SET statement or the PRAGMA statement. They can be reset to their original values using the RESET statement.

The values of configuration options can be queried via the current_setting() scalar function or using the goose_settings() table function. For example:

SELECT current_setting('memory_limit') AS memlimit;

Or:

SELECT value AS memlimit
FROM goose_settings()
WHERE name = 'memory_limit';

Examples

Set the memory limit of the system to 10 GB.

SET memory_limit = '10GB';

Configure the system to use 1 thread.

SET threads TO 1;

Turn logging on and set the logging level to debug. For additional details on logging levels, see Log Level.

SET enable_logging = true;
SET logging_level = 'debug';

Write a single log message with the debug level and a connection scope:

SELECT write_log('A new client has connected.', level := 'debug', scope := 'connection');

Write a single log message with a debug level and a connection scope and a custom log_type:

SELECT write_log(
'A new duck has connected to the lake.',
level := 'debug',
scope := 'connection',
log_type := 'goose.docs.example.quack'
);

Check logs with the DEBUG log level:

SELECT * FROM goose_logs WHERE log_level = 'DEBUG';

Check logs with the QueryLog type:

SELECT * FROM goose_logs WHERE type = 'QueryLog';

Check current logging settings:

SELECT * FROM goose_settings() WHERE name LIKE '%logging%';

Enable printing of a progress bar during long-running queries:

SET enable_progress_bar = true;

Set the default null order to NULLS LAST:

SET default_null_order = 'nulls_last';

Return the current value of a specific setting:

SELECT current_setting('threads') AS threads;
threads
10

Query a specific setting:

SELECT *
FROM goose_settings()
WHERE name = 'threads';
namevaluedescriptioninput_typescope
threads1The number of total threads used by the system.BIGINTGLOBAL

Show a list of all available settings:

SELECT *
FROM goose_settings();

Reset the memory limit of the system back to the default:

RESET memory_limit;

Secrets Manager

Goose has a Secrets manager, which provides a unified user interface for secrets across all backends (e.g., AWS S3) that use them.

Configuration Reference

Configuration options come with different default scopes: GLOBAL and LOCAL. Below is a list of all available configuration options by scope.

Global Configuration Options

NameDescriptionTypeDefault value
CalendarThe current calendarVARCHARSystem (locale) calendar
TimeZoneThe current time zoneVARCHARSystem (locale) timezone
access_modeAccess mode of the database (AUTOMATIC, READ_ONLY or READ_WRITE)VARCHARautomatic
allocator_background_threadsWhether to enable the allocator background thread.BOOLEANfalse
allocator_bulk_deallocation_flush_thresholdIf a bulk deallocation larger than this occurs, flush outstanding allocations.VARCHAR512.0 MiB
allocator_flush_thresholdPeak allocation threshold at which to flush the allocator after completing a task.VARCHAR128.0 MiB
allow_asterisks_in_http_pathsAllow '*' character in URLs users can queryBOOLEANfalse
allow_community_extensionsAllow to load community built extensionsBOOLEANtrue
allow_extensions_metadata_mismatchAllow to load extensions with not compatible metadataBOOLEANfalse
allow_parser_override_extensionAllow extensions to override the current parserVARCHARDEFAULT
allow_persistent_secretsAllow the creation of persistent secrets, that are stored and loaded on restartsBOOLEANtrue
allow_unredacted_secretsAllow printing unredacted secretsBOOLEANfalse
allow_unsigned_extensionsAllow to load extensions with invalid or missing signaturesBOOLEANfalse
allowed_directoriesList of directories/prefixes that are ALWAYS allowed to be queried - even when enable_external_access is falseVARCHAR[][]
allowed_pathsList of files that are ALWAYS allowed to be queried - even when enable_external_access is falseVARCHAR[][]
arrow_large_buffer_sizeWhether Arrow buffers for strings, blobs, uuids and bits should be exported using large buffersBOOLEANfalse
arrow_lossless_conversionWhenever a Goose type does not have a clear native or canonical extension match in Arrow, export the types with a goose.type_name extension name.BOOLEANfalse
arrow_output_list_viewWhether export to Arrow format should use ListView as the physical layout for LIST columnsBOOLEANfalse
arrow_output_versionWhether strings should be produced by Goose in Utf8View format instead of Utf8VARCHAR1.0
asof_loop_join_thresholdThe maximum number of rows we need on the left side of an ASOF join to use a nested loop joinUBIGINT64
auto_checkpoint_skip_wal_thresholdThe estimated WAL write size at which point we will skip writing to the WAL and only checkpoint. Skipping writing to the WAL means concurrent commits are blocked while the checkpoint is happening.UBIGINT100000
auto_fallback_to_full_downloadAllows automatically falling back to full file downloads when possible.BOOLEANtrue
autoinstall_extension_repositoryOverrides the custom endpoint for extension installation on autoloadingVARCHAR
autoinstall_known_extensionsWhether known extensions are allowed to be automatically installed when a query depends on themBOOLEANtrue
autoload_known_extensionsWhether known extensions are allowed to be automatically loaded when a query depends on themBOOLEANtrue
binary_as_stringIn Parquet files, interpret binary data as a string.BOOLEANfalse
block_allocator_memoryPhysical memory that the block allocator is allowed to use (this memory is never freed and cannot be reduced).VARCHAR0 bytes
ca_cert_filePath to a custom certificate file for self-signed certificates.VARCHAR
catalog_error_max_schemasThe maximum number of schemas the system will scan for "did you mean..." style errors in the catalogUBIGINT100
checkpoint_threshold, wal_autocheckpointThe WAL size threshold at which to automatically trigger a checkpoint (e.g., 1GB)VARCHAR16.0 MiB
custom_extension_repositoryOverrides the custom endpoint for remote extension installationVARCHAR
custom_user_agentMetadata from Goose callersVARCHAR
default_block_sizeThe default block size for new goose database files (new as-in, they do not yet exist).UBIGINT262144
default_collationThe collation setting used when none is specifiedVARCHAR
default_null_order, null_orderNULL ordering used when none is specified (NULLS_FIRST or NULLS_LAST)VARCHARNULLS_LAST
default_orderThe order type used when none is specified (ASC or DESC)VARCHARASCENDING
default_secret_storageAllows switching the default storage for secretsVARCHARlocal_file
deprecated_using_key_syntaxConfigures the use of the deprecated union syntax for USING KEY CTEs.VARCHARDEFAULT
disable_database_invalidationDisables invalidating the database instance when encountering a fatal error. Should be used with great care, as Goose cannot guarantee correct behavior after a fatal error.BOOLEANfalse
disable_parquet_prefetchingDisable the prefetching mechanism in ParquetBOOLEANfalse
disable_timestamptz_castsDisable casting from timestamp to timestamptzBOOLEANfalse
disabled_compression_methodsDisable a specific set of compression methods (comma separated)VARCHAR
disabled_filesystemsDisable specific file systems preventing access (e.g., LocalFileSystem)VARCHAR
disabled_log_typesSets the list of disabled loggersVARCHAR
goose_apiGoose API surfaceVARCHARcli
dynamic_or_filter_thresholdThe maximum amount of OR filters we generate dynamically from a hash joinUBIGINT50
enable_curl_server_cert_verificationEnable server side certificate verification for CURL backend.BOOLEANtrue
enable_external_accessAllow the database to access external state (through e.g., loading/installing modules, COPY TO/FROM, CSV readers, pandas replacement scans, etc)BOOLEANtrue
enable_external_file_cacheAllow the database to cache external files (e.g., Parquet) in memory.BOOLEANtrue
enable_fsst_vectorsAllow scans on FSST compressed segments to emit compressed vectors to utilize late decompressionBOOLEANfalse
enable_geoparquet_conversionAttempt to decode/encode geometry data in/as GeoParquet files if the spatial extension is present.BOOLEANtrue
enable_global_s3_configurationAutomatically fetch AWS credentials from environment variables.BOOLEANtrue
enable_http_metadata_cacheWhether or not the global http metadata is used to cache HTTP metadataBOOLEANfalse
enable_loggingEnables the loggerBOOLEAN1
enable_macro_dependenciesEnable created MACROs to create dependencies on the referenced objects (such as tables)BOOLEANfalse
enable_object_cache[PLACEHOLDER] Legacy setting - does nothingBOOLEANfalse
enable_server_cert_verificationEnable server side certificate verification.BOOLEANfalse
enable_view_dependenciesEnable created VIEWs to create dependencies on the referenced objects (such as tables)BOOLEANfalse
enabled_log_typesSets the list of enabled loggersVARCHAR
errors_as_jsonOutput error messages as structured JSON instead of as a raw stringBOOLEANfalse
experimental_metadata_reuseEXPERIMENTAL: Re-use row group and table metadata when checkpointing.BOOLEANtrue
explain_outputOutput of EXPLAIN statements (ALL, OPTIMIZED_ONLY, PHYSICAL_ONLY)VARCHARPHYSICAL_ONLY
extension_directoriesSet the directories to store extensions inVARCHAR[][]
extension_directorySet the directory to store extensions inVARCHAR
external_threadsThe number of external threads that work on Goose tasks.UBIGINT1
file_search_pathA comma separated list of directories to search for input filesVARCHAR
force_downloadForces upfront download of fileBOOLEANfalse
force_mbedtls_unsafeEnable mbedtls for encryption (WARNING: unsafe to use)BOOLEANfalse
force_variant_shreddingForces the VARIANT shredding that happens at checkpoint to use the provided schema for the shredding.VARCHARINVALID
geometry_minimum_shredding_sizeMinimum size of a rowgroup to enable GEOMETRY shredding, or set to -1 to disable entirely. Defaults to 1/4th of a rowgroupBIGINT30000
home_directorySets the home directory used by the systemVARCHAR
http_keep_aliveKeep alive connections. Setting this to false can help when running into connection failuresBOOLEANtrue
http_proxy_passwordPassword for HTTP proxyVARCHAR
http_proxy_usernameUsername for HTTP proxyVARCHAR
http_proxyHTTP proxy hostVARCHAR
http_retriesHTTP retries on I/O errorUBIGINT3
http_retry_backoffBackoff factor for exponentially increasing retry wait timeFLOAT4
http_retry_wait_msTime between retriesUBIGINT100
http_timeoutHTTP timeout read/write/connection/retry (in seconds)UBIGINT30
httpfs_client_implementationSelect which is the HTTPUtil implementation to be usedVARCHARdefault
ieee_floating_point_opsUse IEE754-compliant floating point operations (returning NAN instead of errors/NULL).BOOLEANtrue
ignore_unknown_crsIgnore unknown Coordinate Reference Systems (CRS) when creating geometry types or importing geospatial data.BOOLEANfalse
immediate_transaction_modeWhether transactions should be started lazily when needed, or immediately when BEGIN TRANSACTION is calledBOOLEANfalse
index_scan_max_countThe maximum index scan count sets a threshold for index scans. If fewer than MAX(index_scan_max_count, index_scan_percentage * total_row_count) rows match, we perform an index scan instead of a table scan.UBIGINT2048
index_scan_percentageThe index scan percentage sets a threshold for index scans. If fewer than MAX(index_scan_max_count, index_scan_percentage * total_row_count) rows match, we perform an index scan instead of a table scan.DOUBLE0.001
integer_divisionWhether or not the / operator defaults to integer division, or to floating point divisionBOOLEANfalse
lambda_syntaxConfigures the use of the deprecated single arrow operator (->) for lambda functions.VARCHARDEFAULT
late_materialization_max_rowsThe maximum amount of rows in the LIMIT/SAMPLE for which we trigger late materializationUBIGINT50
lock_configurationWhether or not the configuration can be alteredBOOLEANfalse
log_query_pathSpecifies the path to which queries should be logged (default: NULL, queries are not logged)VARCHAR
logging_levelThe log level which will be recorded in the logVARCHARWARNING
logging_modeDetermines which types of log messages are loggedVARCHARLEVEL_ONLY
logging_storageSet the logging storage (memory/stdout/file/<custom>)VARCHARshell_log_storage
max_expression_depthThe maximum expression depth limit in the parser. WARNING: increasing this setting and using very deep expressions might lead to stack overflow errors.UBIGINT1000
max_memory, memory_limitThe maximum memory of the system (e.g., 1GB)VARCHAR80% of RAM
max_temp_directory_sizeThe maximum amount of data stored inside the 'temp_directory' (when set) (e.g., 1GB)VARCHAR90% of available disk space
max_vacuum_tasksThe maximum vacuum tasks to schedule during a checkpoint.UBIGINT100
merge_http_secret_into_s3_requestMerges http secret params into S3 requestsBOOLEANtrue
merge_join_thresholdThe maximum number of rows on either table to choose a merge joinUBIGINT1000
nested_loop_join_thresholdThe maximum number of rows on either table to choose a nested loop joinUBIGINT5
old_implicit_castingAllow implicit casting to/from VARCHARBOOLEANfalse
order_by_non_integer_literalAllow ordering by non-integer literals - ordering by such literals has no effect.BOOLEANfalse
ordered_aggregate_thresholdThe number of rows to accumulate before sorting, used for tuningUBIGINT262144
parquet_metadata_cacheCache Parquet metadata - useful when reading the same files multiple timesBOOLEANfalse
partitioned_write_flush_thresholdThe threshold in number of rows after which we flush a thread state when writing using PARTITION_BYUBIGINT524288
partitioned_write_max_open_filesThe maximum amount of files the system can keep open before flushing to disk when writing using PARTITION_BYUBIGINT100
passwordThe password to use. Ignored for legacy compatibility.VARCHAR
perfect_ht_thresholdThreshold in bytes for when to use a perfect hash tableUBIGINT12
pin_threadsWhether to pin threads to cores (Linux only, default AUTO: on when there are more than 64 cores)VARCHARauto
pivot_filter_thresholdThe threshold to switch from using filtered aggregates to LIST with a dedicated pivot operatorUBIGINT20
pivot_limitThe maximum number of pivot columns in a pivot statementUBIGINT100000
prefer_range_joinsForce use of range joins with mixed predicatesBOOLEANfalse
prefetch_all_parquet_filesUse the prefetching mechanism for all types of parquet filesBOOLEANfalse
preserve_identifier_caseWhether or not to preserve the identifier case, instead of always lowercasing all non-quoted identifiersBOOLEANtrue
preserve_insertion_orderWhether or not to preserve insertion order. If set to false the system is allowed to re-order any results that do not contain ORDER BY clauses.BOOLEANtrue
produce_arrow_string_viewWhether Arrow strings should be produced by Goose in Utf8View format instead of Utf8BOOLEANfalse
s3_access_key_idS3 Access Key IDVARCHARNULL
s3_allow_recursive_globbingWhether globs on S3-like storage are optimized with recursive strategy (alterative is listing)BOOLEANtrue
s3_endpointS3 EndpointVARCHARNULL
s3_kms_key_idS3 KMS Key IDVARCHARNULL
s3_regionS3 RegionVARCHARNULL
s3_requester_paysS3 use requester pays modeBOOLEANfalse
s3_secret_access_keyS3 Access KeyVARCHARNULL
s3_session_tokenS3 Session TokenVARCHARNULL
s3_uploader_max_filesizeS3 Uploader max filesize (between 50GB and 5TB)VARCHAR800GB
s3_uploader_max_parts_per_fileS3 Uploader max parts per file (between 1 and 10000)UBIGINT10000
s3_uploader_thread_limitS3 Uploader global thread limitUBIGINT50
s3_url_compatibility_modeDisable Globs and Query Parameters on S3 URLsBOOLEANfalse
s3_url_styleS3 URL styleVARCHARvhost
s3_use_sslS3 use SSLBOOLEANtrue
s3_version_id_pinningPin S3 reads to a specific object version for consistencyBOOLEANfalse
scalar_subquery_error_on_multiple_rowsWhen a scalar subquery returns multiple rows - return a random row instead of returning an error.BOOLEANtrue
scheduler_process_partialPartially process tasks before rescheduling - allows for more scheduler fairness between separate queriesBOOLEANfalse
secret_directorySet the directory to which persistent secrets are storedVARCHAR~/.goose/stored_secrets
storage_block_prefetchIn which scenarios to use storage block prefetchingVARCHARREMOTE_ONLY
storage_compatibility_versionSerialize on checkpoint with compatibility for a given goose versionVARCHARv0.10.2
temp_directorySet the directory to which to write temp filesVARCHAR⟨database_name⟩.tmp or .tmp (in in-memory mode)
temp_file_encryptionEncrypt all temporary files if database is encryptedBOOLEANfalse
threads, worker_threadsThe number of total threads used by the system.BIGINT# CPU cores
unsafe_disable_etag_checksDisable checks on ETag consistencyBOOLEANfalse
user, usernameThe username to use. Ignored for legacy compatibility.VARCHAR
validate_external_file_cacheCache validation mode: VALIDATE_ALL (default, validate all cache entries), VALIDATE_REMOTE (validate only remote cache entries), or NO_VALIDATION (disable cache validation).VARCHARVALIDATE_ALL
variant_minimum_shredding_sizeMinimum size of a rowgroup to enable VARIANT shredding, or set to -1 to disable entirely. Defaults to 1/4th of a rowgroupBIGINT30000
wal_autocheckpoint_entriesTrigger automatic checkpoint when WAL entry count reaches or exceeds N (0 = disabled)UBIGINT0
warnings_as_errorsEscalate all warnings to errors.BOOLEANfalse
write_buffer_row_group_countThe amount of row groups to buffer in bulk ingestion prior to flushing them together. Reducing this setting can reduce memory consumption.UBIGINT5
zstd_min_string_lengthThe (average) length at which to enable ZSTD compression, defaults to 4096UBIGINT4096

Local Configuration Options

NameDescriptionTypeDefault value
custom_profiling_settingsAccepts a JSON enabling custom metricsVARCHAR{"ATTACH_LOAD_STORAGE_LATENCY": "true", "ATTACH_REPLAY_WAL_LATENCY": "true", "BLOCKED_THREAD_TIME": "true", "CHECKPOINT_LATENCY": "true", "COMMIT_LOCAL_STORAGE_LATENCY": "true", "CPU_TIME": "true", "CUMULATIVE_CARDINALITY": "true", "CUMULATIVE_ROWS_SCANNED": "true", "EXTRA_INFO": "true", "LATENCY": "true", "OPERATOR_CARDINALITY": "true", "OPERATOR_NAME": "true", "OPERATOR_ROWS_SCANNED": "true", "OPERATOR_TIMING": "true", "OPERATOR_TYPE": "true", "QUERY_NAME": "true", "RESULT_SET_SIZE": "true", "ROWS_RETURNED": "true", "SYSTEM_PEAK_BUFFER_MEMORY": "true", "SYSTEM_PEAK_TEMP_DIR_SIZE": "true", "TOTAL_BYTES_READ": "true", "TOTAL_BYTES_WRITTEN": "true", "TOTAL_MEMORY_ALLOCATED": "true", "WAITING_TO_ATTACH_LATENCY": "true", "WAL_REPLAY_ENTRY_COUNT": "true", "WRITE_TO_WAL_LATENCY": "true"}
enable_http_logging(deprecated) Enables HTTP loggingBOOLEANtrue
enable_profilingEnables profiling, and sets the output format (JSON, QUERY_TREE, QUERY_TREE_OPTIMIZER)VARCHARNULL
enable_progress_bar_printControls the printing of the progress bar, when 'enable_progress_bar' is trueBOOLEANtrue
enable_progress_barEnables the progress bar, printing progress to the terminal for long queriesBOOLEANtrue
http_logging_output(deprecated) The file to which HTTP logging output should be saved, or empty to print to the terminalVARCHAR
profile_output, profiling_outputThe file to which profile output should be saved, or empty to print to the terminalVARCHAR
profiling_coverageThe profiling coverage (SELECT or ALL)VARCHARSELECT
profiling_modeThe profiling mode (STANDARD or DETAILED)VARCHARNULL
progress_bar_timeSets the time (in milliseconds) how long a query needs to take before we start printing a progress barBIGINT2000
schemaSets the default search schema. Equivalent to setting search_path to a single value.VARCHARmain
search_pathSets the default catalog search path as a comma-separated list of valuesVARCHAR
streaming_buffer_sizeThe maximum memory to buffer between fetching from a streaming result (e.g., 1GB)VARCHAR976.5 KiB