Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration Reference

AngaraBase configuration knobs are managed through the SETTINGS_REGISTRY in engine-utils. Knobs can be set via SET <name> = <value> (session scope) or in the server config file (global scope).

How to Apply Settings

-- Session scope (immediate, affects current connection only):
SET max_connections = 200;

-- View current value:
SHOW max_connections;

For global (persistent) settings, edit the server configuration file (angarabase.toml):

# angarabase.toml — server configuration file
max_connections = 200
storage.data_directory = "/var/lib/angarabase/data"
transaction_log.durability = "strict"
tls.enabled = true
tls.cert_path = "/etc/angarabase/server.crt"
tls.key_path  = "/etc/angarabase/server.key"

Dynamic vs. Static settings:

  • Dynamic: true — takes effect immediately via SET without server restart
  • Dynamic: false — requires server restart to take effect (instance-scope settings)

Typical Production Configuration

# Minimal production-ready angarabase.toml
max_connections = 200
server.addr = "0.0.0.0:5432"

storage.data_directory = "/var/lib/angarabase/data"
storage.transaction_log_directory = "/var/lib/angarabase/wal"

transaction_log.durability = "strict"        # fsync on every commit
transaction_log.wal_compression = "lz4"     # reduce WAL disk usage

tls.enabled = true
tls.require_on_remote_bind = true
auth.mode = "scram_sha256"

security.dev_mode = false

Configuration Knobs

Dynamic: false means the setting requires a server restart to take effect. Has Validator: yes means invalid values are rejected at SET time with SQLSTATE 22023.

NameDefaultScopeDynamicHas ValidatorDescription
max_connections100instancefalseyesMaximum number of concurrent client connections (0 = unlimited).
server.addr127.0.0.1:5152instancefalsenopgwire bind address in host:port format (e.g. 127.0.0.1:5152 or 0.0.0.0:5432)
server.host``instancefalsenoDEPRECATED: use server.addr instead. pgwire bind host
server.port``instancefalsenoDEPRECATED: use server.addr instead. pgwire bind port
storage.data_directory``instancefalsenostorage data dir (immutable)
storage.transaction_log_directory``instancefalsenotxlog dir (immutable)
transaction_log.backendfileinstancefalsenotransaction log backend (noop/file/file_bin)
transaction_log.durabilitystrictinstancefalsenotransaction log durability (strict/relaxed/group_commit)
transaction_log.fsynctrueinstancefalseyestransaction log fsync (strict mode; dev override)
transaction_log.group_commit_v2falseinstancefalseyesgroup_commit waiter batching toggle
transaction_log.wal_compressionoffinstancefalsenoWAL compression mode: off|lz4|zstd
transaction_log.wal_compression_min_bytes256instancefalseyesminimum payload bytes for compression attempt
transaction_log.wal_archive_enablefalseinstancefalseyesappend durable WAL bytes to archive stream
transaction_log.wal_archive_dir/tmp/angarabase-dev/wal_archiveinstancefalsenoWAL archive directory path
security.dev_modefalseinstancefalseyesdevelopment mode preset
security.allow_insecurefalseinstancefalseyesallow insecure combinations (explicit override)
security.tde_enabledfalseinstancefalseyestransparent data encryption toggle
security.tde_master_key_id``instancefalsenonon-secret TDE master key identifier
security.tde_last_rotation_unix0instancefalseyeslast TDE key rotation time (unix seconds)
tls.enabledfalseinstancefalseyesenable pgwire TLS
tls.cert_path``instancefalsenoTLS cert path (PEM)
tls.key_path``instancefalsenoTLS key path (PEM)
tls.require_on_remote_bindfalseinstancetrueyesrefuse remote bind without TLS
tls.gost_enabledfalseinstancefalseyesenable GOST crypto profiles (opt-in, fail-closed)
tls.gost_cipher_suites``instancefalsenoGOST cipher suites preference (TLS 1.2 + GOST ciphers)
auth.modetrustinstancefalsenopgwire auth mode
rbac.admin_users``instancetruenoseed list of RBAC admins
audit.log_path``instancetruenoaudit JSONL sink path
audit.dml_modeoffinstancetruenoaudit DML policy mode: off|allowlist|denylist
audit.dml_allowlist``instancetruenoaudit DML allowlist (comma-separated table refs)
audit.dml_denylist``instancetruenoaudit DML denylist (comma-separated table refs)
audit.export_json_enabledfalseinstancetrueyesenable JSON audit export worker
audit.export_syslog_enabledfalseinstancetrueyesenable Syslog audit export worker
audit.export_rate_limit_rps10instancetrueyesaudit export max events per second
ops.allow_sql_shutdownfalseinstancetrueyesenable SQL shutdown trigger
ops.shutdown_timeout_ms1000instancetrueyesgraceful shutdown timeout (ms)
ops.metrics_addr``instancefalsenometrics bind addr
ops.admin_addr``instancefalsenoadmin API bind addr
lock_timeout0sessiontrueyessession lock timeout (ms); 0=off
statement_timeout0sessiontrueyesstatement execution timeout (ms); 0=off
angara.consumer_id``sessiontruenooptional logical consumer identifier for the session
sql.execution_modeautoinstancetruenoSQL execution mode: ir_auto|ir_only|ir_strict|force_vector|force_row
sql.parallel.dop_cap_global4instancetrueyesglobal cap for parallel workers available to SQL runtime
sql.parallel.dop_cap_query2instancetrueyesper-query cap for SQL parallel workers
aqp_enabledtrueinstancetrueyesadaptive query processing global enable flag
aqp_modeconservativeinstancetruenoadaptive mode: conservative|aggressive
aqp_min_query_time_ms100instancetrueyesminimum query latency for learning
aqp_learning_rate0.1instancetruenoAQP EMA learning rate
aqp_max_correction100.0instancetruenomax correction multiplier
aqp_memory_feedback_limit_mb1024instancetrueyesglobal memory feedback cap in MB
aqp_variance_threshold10.0instancetruenovariance threshold to disable unstable corrections
aqp_correction_cache_mb64instancetrueyesin-memory correction cache budget in MB
aqp_store_capacity_mb1024instancetrueyesAQP advisory store capacity budget in MB
learned_optimizer_enabledfalseinstancetrueyeslearned optimizer master switch
learned_optimizer_modeactiveinstancetruenolearned optimizer mode: active|shadow
learned_optimizer_timeout_us50instancetrueyeslearned predict timeout per operator in microseconds
learned_optimizer_memory_limit_mb64instancetrueyeslearned model in-memory budget in MB
learned_optimizer_confidence_threshold0.5instancetruenoglobal confidence floor for learned predictions
learned_optimizer_max_nodes_per_query20instancetrueyesmaximum learned inference calls per query
learned_optimizer_regression_window1000instancetrueyesrolling window size for regression detection
txn.max_write_set_pages65536instancefalseyesmax pages modified by one txn
txn.max_write_set_bytes536870912instancefalseyesmax bytes modified by one txn
buffer_pool.uncommitted_pages_ratio_hard0.5instancefalsenohard limit for buffer-pool fraction of frames carrying uncommitted page-image deltas
buffer_pool.backpressure.modeblockinstancefalsenobackpressure mode: block|fail_fast
buffer_pool.backpressure.timeout_ms5000instancefalseyesmax wait time in block mode
wal.vlf_enablefalseinstancetrueyesenable Variable Length Files for WAL
wal.max_size_mb1024instancetrueyesmaximum WAL file size in MB
wal.vlf_size_mb64instancetrueyesVLF segment size in MB
wal.init_vlfs4instancetrueyesinitial number of VLF segments
execution.modeautoinstancetruenoSQL execution mode (auto/force_vector/force_row)
execution.vector_batch_size4096instancetrueyesvector execution batch size
execution.query_memory_limit_mb256instancetrueyesper-query memory limit in MB
aqp.enabledtrueinstancetrueyesenable Adaptive Query Processing
aqp.modeconservativeinstancetruenoAQP mode (conservative/aggressive)
aqp.min_query_time_ms100instancetrueyesminimum query time for AQP feedback
aqp.learning_rate0.1instancetruenoAQP EMA learning rate
aqp.max_correction100.0instancetruenomaximum AQP correction multiplier
aqp.variance_threshold10.0instancetruenovariance threshold for unstable corrections
aqp.correction_cache_mb64instancetrueyesAQP correction cache size in MB
aqp.store_capacity_mb1024instancetrueyesAQP store capacity in MB
diagnostics.log_min_duration_ms-1instancetrueyesslow query log threshold in ms (-1=disabled)
diagnostics.log_query_textfalseinstancetrueyesinclude query text in slow log
diagnostics.stat_statements_max1024instancetrueyesmax stat_statements entries (0=disabled)
checkpoint.dirty_track_enabledtrueinstancefalseyesEnable dirty-page bitmap for O(dirty) checkpoint scans instead of O(total) full scan. When true (default) the checkpoint worker uses BufferPool.checkpoint_dirty to skip checkpoints entirely when no pages have been written since the last flush.
logging.log_levelinfoinstancetrueyesstructured logging level (error/warn/info/debug/trace)

Deprecated Settings

Settings with deprecated_since set will log a warning when used. Migrate away before upgrading.

Validation

Settings with validators reject invalid values with SQLSTATE 22023 (invalid_parameter_value):

SET max_connections = 'abc';
-- ERROR:  invalid value for parameter "max_connections": "abc" (SQLSTATE 22023)