Skip to main content

Configuration

SereneDB has a number of configuration options that can be used to change the behavior of the system. The defaults listed here are a server's; serened shell has other defaults for some options, such as integer_division (false), ieee_floating_point_ops (true), preserve_identifier_case (preserve_case) and the default schema (main).

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 the pg_settings view. For example:

SQL
SELECT current_setting('memory_limit') AS memlimit;
 memlimit
----------
 (varies)

Or:

SQL
SELECT setting AS memlimitFROM pg_settingsWHERE name = 'memory_limit';

Examples​

Set the memory limit of the system to 10 GB.

SQL
SET memory_limit = '10GB';

Run the queries of the current session on 1 thread:

SQL
SET threads TO 1;

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

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

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

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

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

SQL
SELECT write_log(        'A new client has connected to SereneDB.',        level := 'debug',        scope := 'connection',        log_type := 'serenedb.docs.example'    );
 write_log
-----------
 NULL

Check logs with the DEBUG log level:

SQL
SELECT * FROM sdb_logs WHERE log_level = 'DEBUG';

Check logs with the QueryLog type:

SQL
SELECT * FROM sdb_logs WHERE type = 'QueryLog';

Check current logging settings:

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

Set the server's default null order to NULLS LAST:

SQL
SET default_null_order = 'nulls_last';

Return the current value of a specific setting:

SQL
SELECT current_setting('threads') AS threads;
 threads
----------
 (varies)

Query a specific setting:

SQL
SELECT *FROM sdb_settings()WHERE name = 'threads';

Show a list of all available settings:

SQL
SELECT *FROM sdb_settings();

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

SQL
RESET memory_limit;

Secrets Manager​

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

Configuration Reference​

The Scope column gives the scope a plain SET changes: a GLOBAL option changes for every session on the server, a SESSION option only for the current session. SET GLOBAL, SET SESSION and SET LOCAL name the scope explicitly, for the options that take it. The options are grouped by the part of the system they affect.

To search the reference rather than read it, query the catalog -- every option on this page is a setting object:

sql
SELECT name, summary FROM sdb_docs.objects
WHERE kind = 'setting' AND name LIKE 'compaction%';

Search and indexing​

Background maintenance of inverted indexes, and the knobs the search and vector operators read.

NameDescriptionTypeScopeDefault value
cleanup_interval_stepNumber of automatic refreshes between background unreferenced-file cleanup passes for newly created inverted indexes and search tables. WITH (cleanup_interval_step = ...) overrides it per index or table. 0 disables the periodic passes: cleanup then follows only background compaction and, on a search table, VACUUM, and a search table keeps more write-ahead logs (see Durability). Default: 1.UINTEGERSESSION1
compaction_floor_segment_bytesInverted-index segments below this size count as equal-sized for compaction candidate selection. Per-index WITH (compaction_floor_segment_bytes = ...) overrides. Default 2097152 (2MB).UBIGINTSESSION2097152
compaction_intervalBackground compaction interval (ms) for newly created inverted indexes. Per-index WITH (compaction_interval = ...) overrides. 0 disables the compaction task. Default: 1000.UINTEGERSESSION1000
compaction_max_segmentsMaximum inverted-index segments merged by one background compaction. Per-index WITH (compaction_max_segments = ...) overrides. Default 10.UINTEGERSESSION10
compaction_max_segments_bytesByte budget of one background inverted-index compaction (the tier target size). Per-index WITH (compaction_max_segments_bytes = ...) overrides. Default 5368709120 (5GB).UBIGINTSESSION5368709120
refresh_intervalBackground refresh interval (ms) for newly created inverted indexes. Per-index WITH (refresh_interval = ...) overrides. 0 disables the refresh task. Default: 1000.UINTEGERSESSION1000
reindex_intervalPeriodic reindex interval (ms) for newly created VIEW-backed inverted indexes: a non-zero value creates a job named after the index that reindexes it, each pass starting that long after the previous one finished. Per-index WITH (reindex_interval = ...) overrides; ALTER INDEX SET retunes, creates or drops the job, and ALTER INDEX RESET applies this setting. 0 creates no job. Hint-less iceberg sources refresh from the background only when the GLOBAL unsafe_enable_version_guessing is set. Default: 0.UINTEGERSESSION0
sdb_ann_force_exactWhen true, a vector search (ORDER BY <distance> LIMIT k, or a distance range) returns the exact answer instead of walking the ANN index, split across the scan's workers. Every row with a vector is considered; where an hnsw index stores 8-bit codes, a row's stored vector is read only if its code leaves it a chance at the top k. Default false, which leaves the choice to the engine.BOOLEANSESSIONoff
sdb_ann_rescore_widthRescore width z for a quantized vector-similarity query, HNSW and IVF alike: the search runs on quantized codes, and a candidate from any segment is read back at full precision while its code score plus z times the code's estimated error could still beat the k-th best full-precision score found so far, so a segment holding many of the nearest neighbours gets more of them rescored and a segment holding none gets none. A larger z rescores more and misses fewer: a neighbour sitting exactly at the k-th score is missed with the probability that a normal error exceeds z standard deviations. 0 disables the rescore: the query answers from the codes, which is faster and caps recall at whatever the codes can tell apart. -1 (the default) uses 2 for sq8 and 1-bit rabitq, 3 for tq and multi-bit rabitq, 4 for usq8, 5 for sq4, 6 for usq4, 7 for osq at 4 or more bits, and 0 for fp16 and bf16, which answer from their codes; pq uses 2 on an ivf index and 3 on an hnsw index, bq 1 and 3, and osq at 1 or 2 bits 3 and 2. Unquantized (quant = 'none') indexes are never rescored.DOUBLESESSION-1
sdb_compact_target_segmentsHow many segments VACUUM (COMPACT_*) leaves in a search table. 0 or 1 merges every segment into one; a larger N splits the segments into N groups and merges each group into one segment, so no single merge holds the whole table. A table with N segments or fewer is left as it is.UINTEGERSESSION1
sdb_disable_top_k_optimizationWhen true, an ORDER BY <scorer>(...) DESC LIMIT k query over an inverted index scores every matching document instead of skipping those that cannot reach the top k, so it runs slower. Useful to compare plans or to work around a plan regression. Default: false (optimization on).BOOLEANSESSIONoff
sdb_lookup_join_source_hopWhen true, a query over an inverted index that keeps k rows and returns only columns the index does not store reads the rows' pk from the index in one LOOKUP_JOIN and the columns from the source in a second one, instead of one LOOKUP_JOIN that does both. Useful to compare plans. Default: false.BOOLEANSESSIONoff
sdb_hnsw_column_filterHow an HNSW graph walk answers a predicate the columnstore can evaluate: 'fold' evaluates one only the columnstore answers over the whole segment before the walk, and takes one the index answers from the index; 'read' reads the columns of each row the walk reaches, including for predicates the index answers; 'auto' reads while the walk is expected to reach few enough rows for that to cost less than the fold, or than the index where the index answers the predicate, weighing what one read costs in the columns' encodings. Default 'auto'.VARCHARSESSIONauto
sdb_hnsw_ef_searchSearch-time beam width (ef) of each segment's HNSW search. Higher values improve recall at the cost of latency. A value is used as written, floored only at what a segment must return for the query's LIMIT. -1 (the default) lets the engine choose: the index's ef_construction or the LIMIT, whichever is larger, so an untuned query keeps its recall at any LIMIT. With a quantized index every hit of the beam is rescored exactly.INTEGERSESSION-1
sdb_hnsw_filter_modeHow an HNSW vector index answers a query with a WHERE: 'auto' picks by the predicate's estimated selectivity, and walks as 'twohop' where a vector's code is long enough that crossing a rejected row costs less than scoring it; 'scan' scores every row the predicate admits; 'walk' walks the graph scoring every neighbour and passing through rejected rows; 'prune' walks scoring and expanding admitted rows only; 'twohop' walks expanding a rejected row's neighbours in its place; 'bridge' walks scoring every neighbour but expanding a rejected row into admitted ones only. Default 'auto'.VARCHARSESSIONauto
sdb_ivf_max_search_fanoutUpper bound on the beam of the descent through a multi-level IVF centroid tree, where each level keeps the beam's worth of its nearest centroids and scores only their children. The beam follows sdb_ivf_search_nprobe as the query resolves it; a narrower one scores fewer centroids at some recall cost. Applied after sdb_ivf_min_search_fanout. -1 (the default) leaves the beam unbounded.INTEGERSESSION-1
sdb_ivf_min_search_fanoutLower bound on the beam of the descent through a multi-level IVF centroid tree, where each level keeps the beam's worth of its nearest centroids and scores only their children. The beam follows sdb_ivf_search_nprobe as the query resolves it; a wider one reaches clusters a narrow descent misses, and one as wide as the segment's list count makes the descent exact. -1 (the default) leaves the beam unbounded.INTEGERSESSION-1
sdb_ivf_posting_sizeTarget IVF posting-list size (leaf cap t), captured into the index config at CREATE INDEX. Smaller values force deeper multi-level centroid trees (useful for testing). Default 1024.INTEGERSESSION1024
sdb_ivf_sample_factorFraction of rows used to train the IVF centroid tree (sample_size = sample_factor * N), captured into the index config at CREATE INDEX. Any value in (0, 1]. Default 0.2.DOUBLESESSION0.2
sdb_ivf_search_nprobeNumber of IVF cluster lists each segment scans per vector-similarity query. Higher values improve recall at the cost of latency. A value is used as written. -1 (the default) lets the engine choose per segment: 1.3 * log10(max(LIMIT, 10)) * sqrt(lists), where lists is the segment's rows over the index's posting size, which keeps recall near 0.95 at any LIMIT and segment size.INTEGERSESSION-1
sdb_levenshtein_max_termsThe maximum number of dictionary terms a fuzzy predicate (ts_levenshtein) expands to per index segment. Terms closest to the query survive; the rest neither match nor contribute to scoring. Higher values improve recall on wide expansions at the cost of per-query work. 0 removes the cap, so every term within the edit distance matches. Default 50.INTEGERSESSION50
sdb_pattern_cache_sizeBytes of compiled search patterns (ts_regexp, ts_like, LIKE and fused alternations over an inverted index) kept across queries, so a pattern is compiled once per server rather than once per query. The least recently used patterns are dropped first; a pattern in use by a running query stays alive until it finishes. 0, the default, keeps nothing: each query compiles its own patterns. Server-global.UBIGINTGLOBAL0
sdb_scan_no_split_row_groupsA segment with at most this many row groups is always scanned whole by one worker of an inverted-index scan.INTEGERSESSION1
sdb_scan_orderThe order in which an inverted-index scan takes its segments: largest_first and smallest_first order them by live document count; order takes them best first by the ORDER BY column's row-group statistics when the query has a scan order; auto is order under a scan order and largest_first otherwise.VARCHARSESSIONauto
sdb_scan_splitHow an inverted-index scan shares a segment between workers: tail gives each worker a segment of its own and lets an idle worker join the segment with the most row groups left only once no segment is unclaimed; always puts every worker on the same segment until all its row groups are claimed; never scans each segment whole on one worker; auto is always when the query has an ORDER BY ... LIMIT scan order and tail otherwise. See Session settings.VARCHARSESSIONauto
search_backfill_group_bytesHow many bytes of a search table's existing segments CREATE INDEX rewrites before it swaps them in and moves on to the next group. The build needs extra disk of about twice one group; a value above the table's size, or 0, rewrites the whole table in one swap.UBIGINTSESSION1073741824
segment_docs_maxDocument count at which an inverted-index segment writer rolls over to a new on-disk segment. Per-index WITH (segment_docs_max = ...) overrides. 0 = unlimited (memory limit governs).UINTEGERSESSION0
segment_memory_maxIn-memory bytes an inverted-index or search-table segment writer fills before rolling over to a new on-disk segment (also the CREATE INDEX backfill commit cadence). Per-object WITH (segment_memory_max = ...) overrides. Default 268435456 (256MB). A serial write to a search table also buffers up to checkpoint_threshold of rows; see Write memory.UBIGINTSESSION268435456

AI functions​

Secrets, retries and quotas of the AI functions.

NameDescriptionTypeScopeDefault value
sdb_ai_allow_insecure_endpointWhen false, AI functions refuse a secret whose base_url sends requests over plain http:// to a host other than localhost, 127.0.0.0/8 or ::1, because the prompts and the API key would travel unencrypted. Default: false.BOOLEANSESSIONfalse
sdb_ai_embedding_default_secretName of the openai secret used by ai_embed and ai_similarity when the call does not pass secret_name. Default: '' (no default).VARCHARSESSION
sdb_ai_embedding_max_batch_sizeMaximum number of texts ai_embed and ai_similarity send in one embeddings request. Default: 100.UINTEGERSESSION100
sdb_ai_max_api_calls_per_queryMaximum number of AI provider requests a single query may send. 0 = unlimited. Default: 0.UINTEGERSESSION0
sdb_ai_max_concurrent_requestsMaximum number of AI provider requests a query has in flight, across all of its AI calls and threads. Requests are sent by async tasks (async_threads) and by the threads that evaluate the calls. Default: 16.UINTEGERSESSION16
sdb_ai_max_output_tokens_per_queryMaximum number of output tokens, as reported by the provider, a single query may consume; checked before each request, so requests already in flight may exceed it. 0 = unlimited. Default: 0.UINTEGERSESSION0
sdb_ai_max_retriesHow many times an AI provider request is retried after a connection error or HTTP 408, 429, 5xx or 529. Default: 3.UINTEGERSESSION3
sdb_ai_request_timeoutTimeout of a single AI provider request, in seconds. Default: 120.UINTEGERSESSION120
sdb_ai_retry_initial_delay_msDelay before the first AI provider retry, in milliseconds; each further retry doubles it, up to 60 seconds. A Retry-After response header overrides it, up to 60 seconds. Default: 500.UINTEGERSESSION500
sdb_ai_system_one_default_secretName of the typesafe secret used by ai_system_one when the call does not pass secret_name. Default: '' (no default).VARCHARSESSION
sdb_ai_text_default_secretName of the openai secret used by ai_generate, ai_classify, ai_classify_labels, ai_extract, ai_filter, ai_translate, ai_redact, ai_score, ai_rerank, ai_agg and ai_summarize_agg when the call does not pass secret_name. Default: '' (no default).VARCHARSESSION
sdb_ai_throw_on_errorWhen true, a row whose AI function request fails fails the query; when false, that row returns NULL. Authentication, not-found, validation (422) and exhausted-quota (429 insufficient_quota) errors always fail the query. Default: true.BOOLEANSESSIONtrue
sdb_ai_throw_on_quota_exceededWhen true, exceeding sdb_ai_max_api_calls_per_query or sdb_ai_max_output_tokens_per_query fails the query; when false, the remaining rows return NULL. Default: true.BOOLEANSESSIONtrue

Memory and threads​

How much memory the engine may use and how many threads it runs.

NameDescriptionTypeScopeDefault value
allocator_background_threadsWhether to enable the allocator background thread.BOOLEANGLOBALfalse
allocator_bulk_deallocation_flush_thresholdIf a bulk deallocation larger than this occurs, flush outstanding allocations.VARCHARGLOBAL512.0 MiB
allocator_flush_thresholdPeak allocation threshold at which to flush the allocator after completing a task.VARCHARGLOBAL134217728B
async_threadsThe number of async tasks, such as I/O, a query runs at once. -1 = automatic, four times the number of CPU cores, at most 256; 0 runs the I/O on the threads that run the query (see SET).BIGINTSESSION-1
block_allocator_memoryPhysical memory that the block allocator is allowed to use (this memory is never freed and cannot be reduced).VARCHARGLOBAL0 bytes
max_memoryThe maximum memory of the system (e.g. 1GB).VARCHARGLOBAL80% of RAM
max_temp_directory_sizeThe maximum amount of data stored inside the 'temp_directory' (when set) (e.g., 1GB)VARCHARGLOBAL90% of available disk space
memory_limitAlias of max_memory.VARCHARGLOBAL80% of RAM
operator_memory_limitThe maximum memory for query intermediates (sorts, hash tables) per connection (e.g. 256MB).VARCHARSESSION
temp_file_encryptionEncrypt all temporary files if database is encryptedBOOLEANGLOBALfalse
threadsCaps the threads the queries of the session run on (with SET LOCAL, of the transaction). SET GLOBAL threads sets the size of the thread pool of the whole server. See SET.BIGINTSESSIONthe number of CPU cores
worker_threadsAlias of threads.BIGINTSESSIONthe number of CPU cores
write_buffer_row_group_memory_limitThe maximum data (in bytes) to buffer in row groups before flushing them together. When either this limit or write_buffer_row_group_count is reached, the data is flushed to disk.VARCHARGLOBAL20% of memory_limit divided by threads

Storage and checkpointing​

Durability, the write-ahead log, and how rows are laid out on disk.

NameDescriptionTypeScopeDefault value
checkpoint_on_detachWhether DETACH checkpoints the database: ENABLED checkpoints it, DISABLED does not, and DEFAULT checkpoints it unless PRAGMA disable_checkpoint_on_shutdown has turned checkpointing on shutdown off. The checkpoint is skipped while another connection still uses the database.VARCHARSESSIONDEFAULT
checkpoint_thresholdThe WAL size threshold at which to automatically trigger a checkpoint (e.g. 1GB). Also the size of the row buffer a serial write to a search table fills before it writes the rows to the table's index; see Write memory.VARCHARGLOBAL16.0 MiB
default_block_sizeThe block size of newly created database files.UBIGINTGLOBAL262144
disabled_compression_methodsDisable a specific set of compression methods (comma separated)VARCHARGLOBAL
enable_optimistic_writeWhether or not to optimistically write large appends to disk before committing. Disable this to keep bulk appends in memory.BOOLEANGLOBALtrue
fsync_modeHow to synchronize database file changes to stable storage (STANDARD, NONE or FULL). NONE may cause database corruption after an operating system or hardware crash.VARCHARGLOBALSTANDARD
initial_column_segment_sizeThe initial memory (in bytes) reserved for the first transient column segment. Must be a power of two. Subsequent segments double in size until reaching the block size.UBIGINTGLOBAL2048
recovery_replay_depthMaximum number of write-ahead-log chunks each inverted index holds while recovery replays it; a larger value uses more memory during recovery. 0 = 4 x the number of threads. Recovery reads the server's global value: set it at start with the --recovery_replay_depth flag.UINTEGERSESSION0
row_group_sizeDefault columnstore row-group size for newly created inverted indexes. Per-index WITH (row_group_size = ...) overrides it. Reads from existing indexes are unaffected. Default: 122'880.UINTEGERSESSION122880
storage_block_prefetchIn which scenarios to use storage block prefetchingVARCHARGLOBALREMOTE_ONLY
storage_compatibility_versionSerialize on checkpoint with compatibility for a given duckdb versionVARCHARGLOBALlatest
wal_autocheckpointAlias of checkpoint_threshold.VARCHARGLOBAL16.0 MiB
wal_autocheckpoint_entriesTrigger automatic checkpoint when WAL entry count reaches or exceeds N (0 = disabled)UBIGINTGLOBAL0
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.UBIGINTGLOBAL5

Query execution and the optimizer​

Planning, rewriting and the shape of query output.

NameDescriptionTypeScopeDefault value
approximate_join_order_thresholdThe minimum number of tables in a join to determine the optimal join order approximately instead of exactly.UBIGINTSESSION12
asof_loop_join_thresholdThe maximum number of rows we need on the left side of an ASOF join to use a nested loop joinUBIGINTSESSION64
default_null_orderNULL ordering used when none is specified (NULLS_FIRST or NULLS_LAST).VARCHARGLOBALNULLS_LAST
delim_join_as_cteDeprecated. Rewrite delim joins to materialized CTEs during dependent join flattening.BOOLEANSESSIONon
disabled_optimizersDEBUG SETTING: disable a specific set of optimizers (comma separated).VARCHARSESSION
dynamic_or_filter_thresholdThe maximum amount of OR filters we generate dynamically from a hash joinUBIGINTSESSION50
enable_caching_operatorsEnables caching operators that cache intermediate results.BOOLEANSESSIONon
enable_optimizerWhether or not query optimization is enabled.BOOLEANGLOBALon
explain_outputOutput of EXPLAIN statements (ALL, OPTIMIZED_ONLY, PHYSICAL_ONLY)VARCHARSESSIONPHYSICAL_ONLY
explain_output_formatColumn shape of EXPLAIN output (DUCKDB_NATIVE = native two-column key/value, PG = single QUERY PLAN column with one row per line of a text or compact plan and one row per plan in other formats).VARCHARSESSIONPG
filter_reorderHow far filter reordering may move conditions that can fail (never, safe, fast or always)VARCHARSESSIONfast
late_materialization_lookup_max_rowsThe maximum amount of rows in the LIMIT/TOP_N/SAMPLE for which a scan that can look up rows by their row id is late materialized through a LOOKUP_JOIN. 0 disables the LOOKUP_JOIN: late materialization then joins on the row ids, up to late_materialization_max_rows.UBIGINTSESSION2048
late_materialization_max_rowsThe maximum amount of rows in the LIMIT/SAMPLE for which we trigger late materializationUBIGINTSESSION50
match_recognize_max_statesThe maximum number of pattern states MATCH_RECOGNIZE explores for a single match before it refuses the pattern (0 = no limit).UBIGINTSESSION1000000
max_streaming_buffer_sizeThe maximum number of bytes a streaming query result buffers (e.g. 1GB).VARCHARSESSION10.0 MiB
merge_join_thresholdThe maximum number of rows on either table to choose a merge joinUBIGINTSESSION1000
nested_loop_join_thresholdThe maximum number of rows on either table to choose a nested loop joinUBIGINTSESSION5
null_orderAlias of default_null_order.VARCHARGLOBALNULLS_LAST
order_by_non_integer_literalAllow ordering by non-integer literals - ordering by such literals has no effect.BOOLEANSESSIONfalse
ordered_aggregate_thresholdThe number of rows to accumulate before sorting, used for tuningUBIGINTSESSION262144
partitioned_write_flush_thresholdThe threshold in number of rows after which we flush a thread state when writing using PARTITION_BYUBIGINTSESSION524288
partitioned_write_max_open_filesThe maximum amount of files the system can keep open before flushing to disk when writing using PARTITION_BYUBIGINTSESSION100
prefer_range_joinsForce use of range joins with mixed predicatesBOOLEANSESSIONfalse
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.BOOLEANGLOBALtrue
read_ahead_depthThe number of scan jobs prefetched ahead of decoding (-1 = automatic, bounded by a memory budget; 0 = disabled).BIGINTGLOBAL-1
scalar_subquery_error_on_multiple_rowsDeprecated. When true, a scalar subquery that returns more than one row raises an error; when false, it returns an arbitrary one of those rows.BOOLEANSESSIONtrue
sdb_job_max_depthMaximum number of job runs in one chain of EXECUTE JOB calls, where a job's body executes another job; a run that would go deeper fails. Default 16. Server-global.UINTEGERGLOBAL16
standard_vector_sizeThe vector size the server was built with (read-only).UBIGINTGLOBAL2048

Session and PostgreSQL compatibility​

Wire-protocol and session state that PostgreSQL clients read or set.

NameDescriptionTypeScopeDefault value
access_modeAccess mode of the database (AUTOMATIC, READ_ONLY or READ_WRITE)VARCHARGLOBALautomatic
application_nameSets the application name to be reported in statistics and logs.VARCHARSESSION
archive_commandNot used. Added for PostgreSQL compatibility only.VARCHARSESSION
archive_modeNot used. Added for PostgreSQL compatibility only.VARCHARSESSIONoff
bytea_outputSets the output format for bytea.VARCHARSESSIONhex
CalendarThe current calendarVARCHARSESSIONgregorian
checkpoint_timeoutNot used. Added for PostgreSQL compatibility only.INTEGERSESSION300
client_encodingSets the client's character set encoding.VARCHARSESSIONUTF8
client_min_messagesSets the message levels that are sent to the client.VARCHARSESSIONnotice
current_transaction_invalidation_policyWhich types of exceptions invalidate the database for the current transactionVARCHARGLOBALSTANDARD_POLICY
custom_user_agentMetadata from SereneDB callersVARCHARGLOBAL
data_directoryShows the data directory. Read-only.VARCHARSESSIONThe directory the server was started with
DateStyleSets the display format for date and time values.VARCHARSESSIONISO, MDY
default_transaction_invalidation_policyWhen to invalidate transactions when errors occur (SYNTACTIC_ERRORS_DO_NOT_INVALIDATE, i.e. parser and binder exceptions do not invalidate, or ALL_ERRORS_INVALIDATE_TRANSACTION).VARCHARGLOBALALL_ERRORS_INVALIDATE_TRANSACTION
default_transaction_isolationSets the transaction isolation level of each new transaction.VARCHARSESSIONrepeatable read
default_transaction_read_onlySets the default read-only status of new transactions.BOOLEANSESSIONoff
dialect_compatibility_modeEnable SQL dialect compatibility for a certain engine (e.g. SET dialect_compatibility_mode='spark').VARCHARSESSIONNONE
duckdb_apiThe API name the server reports in its user agent (see PRAGMA user_agent).VARCHARGLOBALcpp
error_on_division_by_zeroDeprecated. Throw an error instead of returning NULL when dividing by zero.BOOLEANSESSIONtrue
errors_as_jsonOutput error messages as structured JSON instead of as a raw stringBOOLEANSESSIONfalse
extra_float_digitsSets the number of digits displayed for floating-point values.INTEGERSESSION1
immediate_transaction_modeWhether transactions should be started lazily when needed, or immediately when BEGIN TRANSACTION is calledBOOLEANGLOBALfalse
in_hot_standbyShows whether hot standby is currently active.BOOLEANSESSIONoff
integer_datetimesShows whether datetimes are integer based.BOOLEANSESSIONon
IntervalStyleSets the display format for interval values.VARCHARSESSIONpostgres
is_superuserShows whether the current session's user is a superuser.BOOLEANSESSIONon
lock_configurationWhether or not configurations can be alteredBOOLEANGLOBALfalse
max_execution_timeThe maximum execution time per query in milliseconds (0 = no limit).BIGINTSESSION0
max_identifier_lengthShows the maximum identifier length. SereneDB keeps longer identifiers in full. Read-only.INTEGERSESSION63
max_index_keysShows the maximum number of index keys. Clients read it as the bound of index and constraint key arrays, such as pg_index.indkey and pg_constraint.conkey. Read-only.INTEGERSESSION32
max_parallel_workers_per_gatherNot used. Added for PostgreSQL compatibility only.INTEGERSESSION2
regex_match_operator_semanticsDeprecated. Configures whether regex match operators use partial or full string matching.VARCHARSESSIONpartial
roleSets the current role.VARCHARSESSIONnone
search_pathSets the default catalog search path as a comma-separated list of valuesVARCHARSESSION"$user", public
server_encodingShows the server (database) character set encoding.VARCHARSESSIONUTF8
server_versionShows the server version.VARCHARSESSION18.6
server_version_numShows the server version as an integer.INTEGERSESSION180006
session_authorizationSets the current session's user name.VARCHARSESSIONthe session's user
session_replication_roleSets the session's behavior for triggers, as in PostgreSQL: origin (the default) and local fire the triggers enabled with ENABLE TRIGGER, replica fires only those enabled with ENABLE REPLICA TRIGGER and skips foreign key checks; ENABLE ALWAYS triggers fire in every role. Only superusers may change it. The apply worker of a subscription runs as replica.VARCHARSESSIONorigin
show_behaviorConfigures how SHOW resolves a bare identifier: auto describes a table if one exists, else a setting (deprecated); table always describes a table; setting always describes a setting.VARCHARSESSIONSETTING
standard_conforming_stringsCauses '...' strings to treat backslashes literally.BOOLEANSESSIONon
statement_timeoutAborts any statement that takes more than the specified amount of time (milliseconds without a unit; units us, ms, s, min, h, d) with SQLSTATE 57014, as in PostgreSQL. 0 disables the timeout. Sets max_execution_time for the same scope.VARCHARSESSION0
table_function_identifier_conversionDeprecated. Configures the use of deprecated implicit conversion of unbound identifiers to strings in table function arguments.VARCHARSESSIONDISABLE_IMPLICIT_STRING
TimeZoneSets the time zone for displaying and interpreting time stamps.VARCHARSESSIONEtc/UTC
transaction_isolationSets the current transaction's isolation level.VARCHARSESSIONrepeatable read
xmloptionWhether text read as xml, and the argument of xml_is_well_formed, must be an XML document or may be content.VARCHARSESSIONcontent

PostgreSQL settings that are not listed here, such as work_mem, lock_timeout or shared_buffers, do not exist in SereneDB: SET and SHOW fail with unrecognized configuration parameter. This includes several of the SET lines at the top of a pg_dump script.

Logical replication​

Server-wide settings of subscriptions. Only a superuser may set them, and a change applies to running subscriptions too.

NameDescriptionTypeScopeDefault value
max_sync_workers_per_subscriptionHow many tables one subscription copies at the same time during its initial synchronization, each over its own publisher connection (a walsender on the publisher).UINTEGERGLOBAL2
wal_receiver_status_intervalHow often a subscription reports its position to the publisher (seconds without a unit; units us, ms, s, min, h, d). 0 disables the periodic reports.VARCHARGLOBAL10s
wal_receiver_timeoutA subscription whose publisher sends nothing for this long drops the connection and reconnects (milliseconds without a unit). 0 disables the timeout.VARCHARGLOBAL1min
wal_retrieve_retry_intervalHow long a failed subscription waits before it reconnects (milliseconds without a unit).VARCHARGLOBAL5s

Security​

Authentication, authorization and what the server is allowed to reach.

NameDescriptionTypeScopeDefault value
allow_asterisks_in_http_pathsAllow '*' character in URLs users can queryBOOLEANSESSIONfalse
allow_community_extensionsAllow to load community built extensionsBOOLEANGLOBALtrue
allow_extensions_metadata_mismatchAllow to load extensions with not compatible metadataBOOLEANGLOBALfalse
allow_persistent_secretsAllow the creation of persistent secrets, that are stored and loaded on restartsBOOLEANGLOBALtrue
allow_unredacted_secretsAllow printing unredacted secretsBOOLEANGLOBALfalse
allow_unsigned_extensionsAllow to load extensions with invalid or missing signaturesBOOLEANGLOBALfalse
enable_external_accessAllow the database to access external state (through e.g., loading/installing modules, COPY TO/FROM, CSV readers, pandas replacement scans, etc)BOOLEANGLOBALtrue
enable_macro_dependenciesEnable created MACROs to create dependencies on the referenced objects (such as tables)BOOLEANGLOBALtrue
hbaHost-based authentication ruleset (pg_hba.conf syntax) as a single string: one rule per line, first match wins, applied to connections opened after the SET. A rule that lets the postgres superuser in without a password over local and loopback (127.0.0.1, ::1) connections always comes first, so a bad ruleset cannot lock the superuser out; other roles follow the ruleset. An empty value restores the default (SCRAM for every role). Server-global.VARCHARGLOBAL
scram_iterationsSets the iteration count for SCRAM secret generation.INTEGERSESSION4096
secret_directorySet the directory to which persistent secrets are storedVARCHARGLOBAL<datadir>/secrets

Logging, metrics and profiling​

What the server records about itself.

NameDescriptionTypeScopeDefault value
enable_loggingEnables the loggerBOOLEANGLOBAL1
enable_profilingEnables profiling, and sets the output format (query_tree, query_tree_optimizer, json, text, html, graphviz, yaml, mermaid, compact or no_output)VARCHARSESSIONNULL
enable_progress_barTracks the progress of long queries, so that enable_progress_bar_print can print it. On in every server session.BOOLEANSESSIONtrue
enable_progress_bar_printPrints a progress bar for long queries, when enable_progress_bar is on. The bar goes to the standard output of the serened process, not to the client.BOOLEANSESSIONfalse
log_query_pathSpecifies the path to which queries should be logged (default: NULL, queries are not logged). Queries are appended to the file, also when the session sets its own path again; a file another session logs to is refused.VARCHARSESSION
logging_levelThe log level which will be recorded in the logVARCHARGLOBALINFO
logging_modeDetermines which types of log messages are loggedVARCHARGLOBALLEVEL_ONLY
logging_storageSet the logging storage (memory/stdout/file/<custom>)VARCHARGLOBALstdout
profile_outputAlias of profiling_output.VARCHARSESSION
profiling_coverageThe profiling coverage (SELECT or ALL)VARCHARSESSIONSELECT
profiling_modeDeprecated: use enable_profiling and profiling_coverage instead. Any of STANDARD, DETAILED or ALL turns profiling on.VARCHARSESSIONNULL
profiling_outputThe file to which profile output is written. Empty writes it to the standard error of the serened process; the client receives nothing.VARCHARSESSION
profiling_renderer_settingsA map of settings passed to the renderer of the profiler output (e.g. {'max_extra_lines': 100}) - settings not recognized by the active renderer are ignored.MAP(VARCHAR, VARCHAR)SESSION{}
progress_bar_timeHow long (in milliseconds) a query runs before its progress bar is printed.BIGINTSESSION2000
sdb_job_history_sizeNumber of recent job runs, across all jobs, that sdb_job_runs() returns; the oldest run is dropped first. 0 keeps none. Default 1024. Server-global.UBIGINTGLOBAL1024
tracked_metricsA list of metric glob patterns to enable for collection (e.g. ['query.', 'optimizer.']).VARCHAR[]SESSION[*]

Files, object stores and caching​

Local paths, remote object stores and the external file cache.

NameDescriptionTypeScopeDefault value
azure_account_nameAzure storage account name. When set, credentials are detected automatically.VARCHARSESSIONNULL
azure_context_cachingKeep some request context per connection between queries. Turn it off if you suspect the cache causes problems.BOOLEANSESSIONtrue
azure_credential_chainOrdered list of Azure credential providers, separated by ;, for example 'cli;workload_identity;managed_identity;env'.VARCHARSESSIONNULL
azure_endpointThe Azure endpoint used with the Azure credential providers.VARCHARSESSIONblob.core.windows.net
azure_http_proxyProxy for Azure requests, login included.VARCHARSESSIONthe server's HTTP_PROXY environment variable, if set
azure_http_statsInclude HTTP statistics of Azure Storage requests in EXPLAIN ANALYZE.BOOLEANSESSIONfalse
azure_proxy_passwordPassword for the Azure HTTP proxy.VARCHARSESSIONNULL
azure_proxy_user_nameUser name for the Azure HTTP proxy.VARCHARSESSIONNULL
azure_read_buffer_sizeSize of the read buffer for Azure reads, in bytes.UBIGINTSESSION8388608
azure_storage_connection_stringAzure connection string, used to authenticate and configure Azure requests.VARCHARSESSIONNULL
azure_write_block_sizeSize in bytes of each block of a Blob or DFS write; 0 restores the default (8 MiB), at most 4000 MiB. A blob holds at most 50,000 blocks, so raise it to write files larger than 50,000 x this size.UBIGINTSESSION8388608
azure_write_staged_blocks_per_commitHow many blocks a write stages before it commits the blocks written so far; 0 commits only when the file is closed. Non-zero values make partial writes visible sooner at the cost of extra requests.UBIGINTSESSION0
ca_cert_filePath to a custom certificate file for self-signed certificates.VARCHARSESSION
cache_local_filesWhether the external file cache also caches local files (remote files are always cached).BOOLEANGLOBALoff
enable_fsst_vectorsAllow scans on FSST compressed segments to emit compressed vectors to utilize late decompressionBOOLEANGLOBALfalse
enable_server_cert_verificationEnable server side certificate verification.BOOLEANSESSIONfalse
extension_directoryDeprecated: use extension_directories instead. The directory to store extensions in.VARCHARGLOBAL<datadir>/extensions
external_file_cache_local_max_block_sizeMaximum size in bytes of an external file cache block for local (non-remote) files. Larger reads are split into blocks of this size, which are fetched in parallel.UBIGINTGLOBAL16384
external_file_cache_remote_max_block_sizeMaximum size in bytes of an external file cache block for remote files (e.g. HTTP/S3). Larger reads are split into blocks of this size, which are fetched in parallel.UBIGINTGLOBAL2097152
external_file_cache_remote_min_block_sizeReads of remote files are rounded out to aligned blocks of this size, so tiny reads do not each cost a request.UBIGINTGLOBAL4096
external_file_cache_spillWhether evicted external file cache blocks of remote files spill to the temporary directory instead of being dropped, so they are re-read from there rather than re-fetched.BOOLEANGLOBALfalse
extra_http_headersExtra HTTP headers added to every request.MAP(VARCHAR, VARCHAR)GLOBAL{}
file_search_pathA comma separated list of directories to search for input filesVARCHARSESSION
force_downloadForces upfront download of fileBOOLEANSESSIONfalse
gcs_user_projectGCS billing project for Requester Pays.VARCHARSESSION
hf_max_per_pageDebug option to limit number of items returned in list requests.UBIGINTSESSION0
home_directorySets the home directory used by the systemVARCHARSESSION
http_client_pool_capacityCapacity of the HTTP client pool. Unless set, the larger of twice the number of CPU cores (at least 16) and the number of async I/O threads (async_threads), at most an eighth of the server's open-file limit.BIGINTGLOBALautomatic
http_keep_aliveKeep alive connections. Setting this to false can help when running into connection failuresBOOLEANSESSIONtrue
http_proxyHTTP proxy hostVARCHARGLOBAL
http_proxy_passwordPassword for HTTP proxyVARCHARGLOBAL
http_proxy_usernameUsername for HTTP proxyVARCHARGLOBAL
http_retriesHTTP retries on I/O errorUBIGINTSESSION3
http_retry_backoffBackoff factor for exponentially increasing retry wait timeFLOATSESSION4
http_retry_wait_msTime between retriesUBIGINTSESSION100
http_timeoutHTTP timeout read/write/connection/retry (in seconds)UBIGINTSESSION30
httpfs_enable_credential_refreshWhen S3 refuses a request for its credentials, reload them, refreshing the secret where it supports refresh, and retry the request once.BOOLEANSESSIONtrue
s3_access_key_idS3 Access Key IDVARCHARSESSIONNULL
s3_allow_recursive_globbingWhether globs on S3-like storage are optimized with recursive strategy (alterative is listing)BOOLEANSESSIONtrue
s3_endpointS3 EndpointVARCHARSESSIONNULL
s3_kms_key_idS3 KMS Key IDVARCHARSESSIONNULL
s3_list_concurrencyMaximum number of concurrent LIST requests issued while expanding an S3 glob. The window is also bounded by async_threads + 1 and shrinks automatically when the server throttles.UBIGINTSESSION256
s3_regionS3 RegionVARCHARSESSIONNULL
s3_requester_paysS3 use requester pays modeBOOLEANSESSIONfalse
s3_secret_access_keyS3 Access KeyVARCHARSESSIONNULL
s3_session_tokenS3 Session TokenVARCHARSESSIONNULL
s3_uploader_max_filesizeMaximum size of a file written to S3. It must be above zero, fit in s3_uploader_max_parts_per_file parts and stay within the provider's largest object size.VARCHARSESSION80GB
s3_uploader_max_parts_per_fileS3 Uploader max parts per file (between 1 and 10000)UBIGINTSESSION10000
s3_url_compatibility_modeDisable Globs and Query Parameters on S3 URLsBOOLEANSESSIONfalse
s3_url_scheme_aliasesAdditional URL schemes routed to the S3-compatible filesystem (e.g. ['oss', 'cos']). Can only be set globally; secrets for aliased schemes need an explicit SCOPE.VARCHAR[]GLOBAL[]
s3_url_styleS3 URL styleVARCHARSESSIONvhost
s3_use_sslS3 use SSLBOOLEANSESSIONtrue
s3_version_id_pinningPin S3 reads to a specific object version for consistencyBOOLEANSESSIONfalse
temp_directorySet the directory to which to write temp filesVARCHARGLOBAL<datadir>/tmp

Database connectors​

Settings for the PostgreSQL and ClickHouse connectors. The pg_pool_* and ch_pool_* settings apply to databases attached after the change; postgres_configure_pool() and clickhouse_configure_pool() change the pool of a database that is already attached.

NameDescriptionTypeScopeDefault value
ch_binary_as_blobRead ClickHouse String and FixedString columns as BLOB instead of VARCHAR.BOOLEANSESSIONoff
ch_connection_cacheReuse pooled ClickHouse connections across statements; false bypasses the connection pool. The change applies to the queries of every session, although other sessions keep showing their own value.BOOLEANGLOBALon
ch_experimental_filter_pushdownPush filters down to ClickHouse.BOOLEANSESSIONon
ch_order_pushdownPush ORDER BY and LIMIT down to ClickHouse.BOOLEANSESSIONon
ch_pool_acquire_modeHow a query gets a connection from the pool: force always connects, ignoring the pool limit; wait blocks until one is free; try fails at once when none is free.VARCHARGLOBALforce
ch_pool_enable_reaper_threadPeriodically close pooled connections that exceed ch_pool_max_lifetime_millis or ch_pool_idle_timeout_millis.BOOLEANGLOBALon
ch_pool_enable_thread_local_cacheCache connections per thread: such a connection serves only its thread but still takes a place in the pool.BOOLEANGLOBALoff
ch_pool_idle_timeout_millisMaximum milliseconds a connection may sit idle in the pool; checked when a connection is taken and, with the reaper thread on, in the background.UBIGINTGLOBAL60000
ch_pool_max_connectionsMaximum number of connections cached in the pool of each attached ClickHouse database.UBIGINTGLOBAL1.5 x the number of CPU threads, from 4 to 32
ch_pool_max_lifetime_millisMaximum milliseconds a connection is kept open; checked when it is taken or returned and, with the reaper thread on, in the background. 0 = no limit.UBIGINTGLOBAL0
ch_pool_wait_timeout_millisMaximum milliseconds to wait for a connection when every pooled connection is taken.UBIGINTGLOBAL30000
ch_statement_timeout_millisMaximum milliseconds a ClickHouse query may run; NULL or 0 = no limit.UBIGINTSESSIONNULL
pg_array_as_varcharRead Postgres arrays as varchar - enables reading mixed dimensional arrays.BOOLEANSESSIONoff
pg_connection_cacheDeprecated: use pg_pool_max_connections (0 turns pooling off) for databases attached later, or postgres_configure_pool() for one already attached. false sets the pool limit of every attached PostgreSQL database to 0, and true back to its default.BOOLEANGLOBALon
pg_connection_limitDeprecated: use pg_pool_max_connections for databases attached later, or postgres_configure_pool() for one already attached. Sets the connection limit of the pool of every attached PostgreSQL database.UBIGINTGLOBAL1.5 x the number of CPU threads, from 4 to 32
pg_experimental_filter_pushdownWhether or not to use filter pushdown.BOOLEANSESSIONon
pg_idle_in_transaction_timeout_millisPostgres idle in transaction timeout in milliseconds to set on scan connections.UINTEGERSESSION
pg_null_byte_replacementWhen writing NULL bytes to Postgres, replace them with the given character.VARCHARSESSION
pg_numeric_as_varcharRead PostgreSQL numeric columns without precision and scale, or with a precision above 38, as VARCHAR instead of DOUBLE.BOOLEANSESSIONoff
pg_numeric_nan_as_nullRead a PostgreSQL numeric NaN as NULL instead of failing.BOOLEANSESSIONon
pg_oauth_tokenOAuth bearer token for PostgreSQL OAUTHBEARER authentication. Takes priority over the PGOAUTHTOKEN environment variable.VARCHARSESSION
pg_order_pushdownPush ORDER BY and LIMIT clauses to Postgres (default: true).BOOLEANSESSIONon
pg_pages_per_taskThe amount of pages per task.UBIGINTSESSION1000
pg_pool_acquire_modeHow a query gets a connection from the pool: force always connects, ignoring the pool limit; wait blocks until one is free; try fails at once when none is free.VARCHARGLOBALforce
pg_pool_enable_reaper_threadPeriodically close pooled connections that exceed pg_pool_max_lifetime_millis or pg_pool_idle_timeout_millis; one of them must be non-zero for this to have an effect.BOOLEANGLOBALon
pg_pool_enable_thread_local_cacheCache connections per thread: such a connection serves only its thread but still takes a place in the pool.BOOLEANGLOBALoff
pg_pool_health_check_queryThe query that checks a pooled connection is healthy; an empty string disables the check.VARCHARGLOBALSELECT 1
pg_pool_idle_timeout_millisMaximum milliseconds a connection may sit idle in the pool; checked when a connection is taken and, with the reaper thread on, in the background.UBIGINTGLOBAL60000
pg_pool_max_connectionsMaximum number of connections cached in the pool of each attached PostgreSQL database; parallel scans can exceed it for a while.UBIGINTGLOBAL1.5 x the number of CPU threads, from 4 to 32
pg_pool_max_lifetime_millisMaximum milliseconds a connection is kept open; checked when it is taken or returned and, with the reaper thread on, in the background. 0 = no limit.UBIGINTGLOBAL0
pg_pool_wait_timeout_millisMaximum milliseconds to wait for a connection when every pooled connection is taken.UBIGINTGLOBAL30000
pg_staleness_queryA query that replaces the built-in check for DDL changes made in PostgreSQL when pg_staleness_query_enabled is on. It must contain a ${SCHEMA} placeholder and return at least 3 columns (identity, name, revision marker). Empty uses the built-in query.VARCHARGLOBALNULL
pg_staleness_query_enabledCheck PostgreSQL for DDL changes made outside SereneDB before using the cached table catalog of an attached database.BOOLEANGLOBALoff
pg_statement_timeout_millisPostgres statement timeout in milliseconds to set on scan connections.UINTEGERSESSION
pg_use_binary_copyWhether or not to use BINARY copy to read data.BOOLEANSESSIONon
pg_use_ctid_scanWhether or not to parallelize scanning using table ctids.BOOLEANSESSIONon
pg_use_information_schema_introspectionDiscover the schema of an attached database through the SQL-standard information_schema views instead of pg_catalog, for databases that speak the PostgreSQL protocol without its catalog, such as Spanner, CockroachDB or Redshift.BOOLEANSESSIONoff
pg_use_text_protocolWhether or not to use TEXT protocol to read data. This is slower, but provides better compatibility with non-Postgres systems.BOOLEANSESSIONoff

File formats​

Defaults for the CSV, Parquet, JSON, Arrow and Iceberg readers and writers.

NameDescriptionTypeScopeDefault value
arrow_large_buffer_sizeWhether Arrow buffers for strings, blobs, uuids and bits should be exported using large buffersBOOLEANGLOBALfalse
arrow_lossless_conversionWhenever a SereneDB type does not have a clear native or canonical extension match in Arrow, export the types with a duckdb.type_name extension name.BOOLEANGLOBALfalse
arrow_output_list_viewWhether export to Arrow format should use ListView as the physical layout for LIST columnsBOOLEANGLOBALfalse
arrow_output_versionWhether strings should be produced by SereneDB in Utf8View format instead of Utf8VARCHARGLOBAL1.0
binary_as_stringIn Parquet files, interpret binary data as a string.BOOLEANSESSIONfalse
copy_csv_header_defaultWhether COPY ... TO a CSV file writes a header line when HEADER is not specified.BOOLEANSESSIONoff
iceberg_default_format_versionThe Iceberg format version of a new table created without a format-version property: 2 or 3.UBIGINTSESSION2
iceberg_equality_delete_fast_filterUse the fast path for Iceberg equality deletes on byte-comparable column types; other types, and every type when off, use the general path.BOOLEANGLOBALon
iceberg_logging_post_body_truncate_limitMaximum number of characters of a REST catalog POST body included in Iceberg log messages; longer bodies end in ... (truncated). 0 omits the body.UBIGINTSESSION10000
iceberg_metadata_log_clock_skew_msClock-skew allowance in milliseconds when iceberg_use_metadata_log is on: table metadata up to this far after the transaction start counts as visible. 0 compares the timestamps strictly.BIGINTGLOBAL0
iceberg_use_metadata_logRead each Iceberg table as of the transaction start, using the table's metadata log, for snapshot isolation; a table whose metadata has no metadata log then fails to read at an older start. Off, a transaction reads the latest table metadata it resolves.BOOLEANGLOBALoff
iceberg_use_server_side_scan_planningLet the REST catalog plan Iceberg scans, where it supports it.BOOLEANSESSIONoff
json_geometry_formatHow GEOMETRY values are written to JSON: wkt for Well-Known Text, geojson for GeoJSON geometry objects. COPY ... TO ... (FORMAT GEOJSON) always writes GeoJSON.VARCHARSESSIONwkt
parquet_metadata_cacheCache Parquet metadata - useful when reading the same files multiple timesBOOLEANSESSIONfalse
parquet_prefetch_column_gapByte gap under which Parquet prefetch I/O ranges are coalesced (NULL lets the cost model adapt it).UBIGINTSESSION
produce_arrow_string_viewDeprecated. Whether Arrow strings should be produced by SereneDB in Utf8View format instead of Utf8BOOLEANGLOBALfalse
unsafe_enable_version_guessingFind the latest metadata version of an Iceberg table without a version hint by listing its files. This can read an uncommitted version.BOOLEANSESSIONoff

Extensions​

Installing and loading extensions.

NameDescriptionTypeScopeDefault value
allow_extension_repositoriesWhether custom trusted extension repositories are allowed, forbidden (which also distrusts existing repositories) or undecided (blocks adding new repositories but keeps trusting existing ones). While the server runs, it can only move from undecided to allowed or forbidden, or from allowed to forbidden.VARCHARGLOBALundecided
autoinstall_extension_repositoryOverrides the custom endpoint for extension installation on autoloadingVARCHARGLOBAL
autoinstall_known_extensionsWhether known extensions are allowed to be automatically installed when a query depends on themBOOLEANGLOBALfalse
autoload_known_extensionsWhether known extensions are allowed to be automatically loaded when a query depends on themBOOLEANGLOBALfalse
custom_extension_repositoryOverrides the custom endpoint for remote extension installationVARCHARGLOBAL
extension_directoriesSet the directories to store extensions inVARCHAR[]GLOBAL[]
extension_repository_directoryThe directory that stores trusted extension repositories. While signature checking is on (allow_unsigned_extensions = false), it can only be set at start.VARCHARGLOBAL

Debugging and unsafe options​

Not for production. These exist to reproduce and diagnose engine behaviour, and several can corrupt data.

NameDescriptionTypeScopeDefault value
__iceberg_unsafe_struct_null_default_interpFor testing only: read a NULL default of an Iceberg STRUCT field as an empty struct whose fields use their own defaults. The only non-NULL value accepted is '{}'.VARCHARGLOBALNULL
debug_checkpoint_scan_sleep_msFor testing: how long (in milliseconds) a checkpoint sleeps after it has written a table's row groups, before it installs them.UBIGINTGLOBAL0
disable_database_invalidationDisables invalidating the database instance when encountering a fatal error. Should be used with great care, as SereneDB cannot guarantee correct behavior after a fatal error.BOOLEANGLOBALtrue
disable_parquet_prefetchingDisable the prefetching mechanism in ParquetBOOLEANSESSIONfalse
disable_timestamptz_castsDisable casting from timestamp to timestamptzBOOLEANSESSIONfalse
enable_view_dependenciesEnable created VIEWs to create dependencies on the referenced objects (such as tables)BOOLEANGLOBALtrue
force_column_metadata_reuseDeprecated. Force the reuse of column metadata when checkpointing in the older storage versions 6 and 7. Files written so cannot be read by older versions.BOOLEANGLOBALoff
force_compressionForces the use of one compression method for new data.VARCHARGLOBALauto
force_dict_fsst_modeFor testing: forces one string compression mode (DICTIONARY, DICT_FSST, FSST_ONLY, DICT_FSST_PLUS or FSST_PLUS) or way of choosing it (AUTO, AUTO_NATIVE); DEFAULT lets the engine choose.VARCHARGLOBALDEFAULT
force_download_thresholdForces upfront download of files smaller than the given size in bytesUBIGINTSESSION0
force_mbedtls_unsafeEnable mbedtls for encryption (WARNING: unsafe to use)BOOLEANGLOBALfalse
force_variant_shreddingForces the VARIANT shredding that happens at checkpoint to use the provided schema for the shredding.VARCHARGLOBALINVALID
iceberg_test_force_token_expiryFor testing: forces OAuth2 tokens of Iceberg catalogs to expire, to exercise their automatic refresh.BOOLEANSESSIONoff
iceberg_unsafe_skip_puffin_verificationSkip the structural check of Puffin deletion-vector files, to read the invalid files some other Iceberg writers produce.BOOLEANGLOBALoff
legacy_disable_null_typeDeprecated. When enabled, prevent the NULL type from leaving the binder (< v2.0 default behavior).BOOLEANSESSIONoff
old_implicit_castingDeprecated. Allow implicit casting to and from VARCHAR.BOOLEANGLOBALfalse
unsafe_disable_etag_checksDisable checks on ETag consistencyBOOLEANSESSIONfalse

Other​

Everything that does not fall into the groups above.

NameDescriptionTypeScopeDefault value
__delta_only_variant_encoding_enabledEnables the Parquet reader to identify a Variant structurally.BOOLEANGLOBALfalse
allowed_configsList of configuration options that are ALWAYS allowed to be changed - even when lock_configuration is trueVARCHAR[]GLOBAL[]
allowed_directoriesList of directories/prefixes that are ALWAYS allowed to be queried - even when enable_external_access is falseVARCHAR[]GLOBAL[]
allowed_pathsList of files that are ALWAYS allowed to be queried - even when enable_external_access is falseVARCHAR[]GLOBAL[]
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.UBIGINTGLOBAL100000
auto_fallback_to_full_downloadAllows automatically falling back to full file downloads when possible.BOOLEANSESSIONtrue
catalog_error_max_schemasThe maximum number of schemas the system will scan for "did you mean..." style errors in the catalogUBIGINTGLOBAL100
default_collationThe collation setting used when none is specifiedVARCHARGLOBAL
default_orderThe order type used when none is specified (ASC or DESC)VARCHARGLOBALASCENDING
default_secret_storageAllows switching the default storage for secretsVARCHARGLOBALlocal_file
disabled_filesystemsDisable specific file systems preventing access (e.g., LocalFileSystem)VARCHARGLOBAL
disabled_log_typesSets the list of disabled loggersVARCHARGLOBAL
enable_curl_server_cert_verificationEnable server side certificate verification for CURL backend.BOOLEANSESSIONtrue
enable_external_file_cacheAllow the database to cache external files (e.g., Parquet) in memory.BOOLEANGLOBALtrue
enable_geoparquet_conversionAttempt to decode/encode geometry data in/as GeoParquet files if the spatial extension is present.BOOLEANSESSIONtrue
enable_global_s3_configurationAutomatically fetch AWS credentials from environment variables.BOOLEANSESSIONtrue
enable_http_metadata_cacheWhether or not the global http metadata is used to cache HTTP metadataBOOLEANGLOBALfalse
enabled_log_typesSets the list of enabled loggersVARCHARGLOBAL
experimental_metadata_reuseDeprecated. EXPERIMENTAL: Re-use row group and table metadata when checkpointing.BOOLEANGLOBALtrue
external_threadsThe number of external threads that work on SereneDB tasks.UBIGINTGLOBAL0
geometry_always_xyIgnore the axis order a coordinate reference system defines and always treat coordinates as (easting, northing) instead of, for example, (latitude, longitude).BOOLEANSESSIONNULL
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 rowgroupBIGINTGLOBAL30000
httpfs_connection_cachingEnable connection caching for HTTP requestsBOOLEANGLOBALtrue
ieee_floating_point_opsUse IEEE 754 floating-point operations: dividing a floating-point number by zero returns Infinity, -Infinity or NaN instead of failing or returning NULL, and math functions such as ln and sqrt return NaN or ±Infinity for an argument outside their domain instead of failing.BOOLEANSESSIONfalse
ignore_unknown_crsIgnore unknown Coordinate Reference Systems (CRS) when creating geometry types or importing geospatial data.BOOLEANSESSIONfalse
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.UBIGINTGLOBAL2048
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.DOUBLEGLOBAL0.001
integer_divisionWhether or not the / operator defaults to integer division, or to floating point divisionBOOLEANSESSIONtrue
integer_overflowWhat integer +, -, * and unary minus do when the result does not fit its type: ERROR raises an error, WRAP keeps the low bits of the result (two's complement wraparound).VARCHARSESSIONERROR
lambda_syntaxDeprecated. Configures the use of the deprecated single arrow operator (->) for lambda functions.VARCHARSESSIONDEFAULT
max_vacuum_tasksThe maximum vacuum tasks to schedule during a checkpoint.UBIGINTGLOBAL100
merge_http_secret_into_s3_requestMerges http secret params into S3 requestsBOOLEANSESSIONtrue
perfect_ht_thresholdThreshold in bytes for when to use a perfect hash tableUBIGINTSESSION12
pin_threadsWhether to pin threads to cores (Linux only, default AUTO: on when there are more than 64 cores)VARCHARGLOBALauto
pivot_filter_thresholdThe threshold to switch from using filtered aggregates to LIST with a dedicated pivot operatorUBIGINTSESSION20
pivot_limitThe maximum number of pivot columns in a pivot statementUBIGINTSESSION100000
preserve_identifier_caseHow unquoted identifiers are folded: lowercase lowercases them, preserve_case keeps the case as written, uppercase uppercases them. false and true are accepted as lowercase and preserve_case.VARCHARSESSIONlowercase
rtree_index_scan_min_rowsHas no effect: SereneDB has no R-tree index.UBIGINTSESSION8192
rtree_index_scan_ratioHas no effect: SereneDB has no R-tree index.DOUBLESESSION0.075
schemaSets the default search schema. Equivalent to setting search_path to a single value.VARCHARSESSIONpublic
streaming_buffer_sizeAlias of max_streaming_buffer_size.VARCHARSESSION10.0 MiB
vacuum_rebuild_indexesDeprecated. Maximum row count of a table whose bound ART indexes are rebuilt when a checkpoint vacuum cannot remap their row IDs; 0 disables the rebuild.UBIGINTGLOBAL0
validate_external_file_cacheCache validation mode: VALIDATE_ALL (validate all cache entries), VALIDATE_REMOTE (validate only remote cache entries) or NO_VALIDATION (disable cache validation).VARCHARGLOBALVALIDATE_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 rowgroupBIGINTGLOBAL30000
warnings_as_errorsEscalate all warnings to errors.BOOLEANGLOBALfalse
zstd_min_string_lengthThe (average) length at which to enable ZSTD compression, defaults to 4096UBIGINTGLOBAL4096