Configuration File Reference (v3.5)
Configuration File Reference (v3.5)
Overview
HeliosDB Nano uses TOML configuration files for server-wide settings. This document provides comprehensive reference for all configuration options in config.toml.
Version: 3.5.8
Quick Start
# Copy example configurationcp config.example.toml config.toml
# Edit configurationnano config.toml
# Start server with configurationheliosdb-nano start --config config.toml
# Start REPL with configurationheliosdb-nano repl --config config.tomlConfiguration Sections
- Storage
- Encryption
- Server
- Performance
- Audit
- Optimizer
- Authentication
- Compression
- Materialized Views
- Vector Indexes
- Session
- Locks
- Dump
- Resource Quotas
Storage Section
Controls database storage, WAL, and persistence.
[storage]path = "./heliosdb-data"memory_only = falsewal_enabled = truewal_sync_mode = "sync"cache_size = 536870912compression = "Zstd"time_travel_enabled = truequery_timeout_ms = 0statement_timeout_ms = 0transaction_isolation = "READ_COMMITTED"Options
| Option | Type | Default | Description |
|---|---|---|---|
path | String | "./heliosdb-data" | Database directory path |
memory_only | Boolean | false | Use in-memory database |
wal_enabled | Boolean | true | Enable write-ahead log |
wal_sync_mode | String | "sync" | WAL sync mode: sync, async, group_commit |
cache_size | Integer | 536870912 | Cache size in bytes (512MB) |
compression | String | "Zstd" | Default compression: None, Zstd, Lz4 |
time_travel_enabled | Boolean | true | Enable automatic versioning |
query_timeout_ms | Integer | 0 | Query timeout (0 = unlimited) |
statement_timeout_ms | Integer | 0 | Statement timeout (0 = unlimited) |
transaction_isolation | String | "READ_COMMITTED" | Isolation level |
Examples
# Development: In-memory database[storage]memory_only = truewal_enabled = false
# Production: Durable, fast[storage]path = "/var/lib/heliosdb"wal_sync_mode = "group_commit"query_timeout_ms = 30000cache_size = 2147483648 # 2GB
# Write-heavy: Async WAL[storage]wal_sync_mode = "async"time_travel_enabled = falseEncryption Section
Transparent data encryption (TDE) configuration.
[encryption]enabled = falsealgorithm = "Aes256Gcm"rotation_interval_days = 90
[encryption.key_source]Environment = "HELIOSDB_ENCRYPTION_KEY"Options
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | false | Enable encryption at rest |
algorithm | String | "Aes256Gcm" | Encryption algorithm |
rotation_interval_days | Integer | 90 | Key rotation interval |
key_source | Object | Environment variable | Key source configuration |
Key Source Options
# Option 1: Environment variable[encryption.key_source]Environment = "HELIOSDB_ENCRYPTION_KEY"
# Option 2: File[encryption.key_source]File = "/secure/path/to/key"
# Option 3: Cloud KMS[encryption.key_source.Kms]provider = "aws"key_id = "arn:aws:kms:us-east-1:123:key/abc"Server Section
Network server configuration.
[server]listen_addr = "127.0.0.1"port = 5432oracle_port = 1521max_connections = 100tls_enabled = falsetls_cert_path = "/path/to/cert.pem"tls_key_path = "/path/to/key.pem"Options
| Option | Type | Default | Description |
|---|---|---|---|
listen_addr | String | "127.0.0.1" | Listen address (0.0.0.0 for all) |
port | Integer | 5432 | PostgreSQL protocol port |
oracle_port | Integer | 1521 | Oracle TNS port (null to disable) |
max_connections | Integer | 100 | Maximum connections |
tls_enabled | Boolean | false | Enable TLS/SSL |
tls_cert_path | String | None | TLS certificate path |
tls_key_path | String | None | TLS private key path |
Examples
# Local development[server]listen_addr = "127.0.0.1"port = 5432max_connections = 10
# Production[server]listen_addr = "0.0.0.0"port = 5432max_connections = 1000tls_enabled = truetls_cert_path = "/etc/heliosdb/ssl/cert.pem"tls_key_path = "/etc/heliosdb/ssl/key.pem"Performance Section
Performance tuning parameters.
[performance]worker_threads = 0query_timeout_secs = 300simd_enabled = trueparallel_query = trueOptions
| Option | Type | Default | Description |
|---|---|---|---|
worker_threads | Integer | CPU count | Worker threads (0 = auto) |
query_timeout_secs | Integer | 300 | Legacy timeout setting |
simd_enabled | Boolean | true | Enable SIMD optimizations |
parallel_query | Boolean | true | Enable parallel execution |
Optimizer Section
Query optimizer configuration.
[optimizer]enabled = trueenable_seqscan = trueenable_indexscan = trueenable_hashjoin = trueenable_mergejoin = trueenable_nestloop = trueseq_page_cost = 1.0random_page_cost = 4.0cpu_tuple_cost = 0.01cpu_index_tuple_cost = 0.005Options
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | true | Enable optimizer |
enable_seqscan | Boolean | true | Allow sequential scans |
enable_indexscan | Boolean | true | Allow index scans |
enable_hashjoin | Boolean | true | Allow hash joins |
enable_mergejoin | Boolean | true | Allow merge joins |
enable_nestloop | Boolean | true | Allow nested loop joins |
seq_page_cost | Float | 1.0 | Sequential page cost |
random_page_cost | Float | 4.0 | Random page cost |
cpu_tuple_cost | Float | 0.01 | CPU tuple cost |
cpu_index_tuple_cost | Float | 0.005 | CPU index tuple cost |
Examples
# SSD optimized[optimizer]random_page_cost = 1.1 # Low for SSDs
# Force index usage[optimizer]enable_seqscan = false
# Disable specific joins[optimizer]enable_hashjoin = falseenable_mergejoin = falseAuthentication Section
User authentication configuration.
[authentication]enabled = falsemethod = "trust"jwt_secret = "secret-key"jwt_expiration_secs = 86400password_hash_algorithm = "argon2"users_file = "/etc/heliosdb/users.json"Options
| Option | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | false | Enable authentication |
method | String | "trust" | Auth method: trust, password, jwt, ldap |
jwt_secret | String | None | JWT secret key |
jwt_expiration_secs | Integer | 86400 | JWT expiration (24h) |
password_hash_algorithm | String | "argon2" | Hash: argon2, bcrypt, pbkdf2 |
users_file | String | None | Users database file |
Examples
# Development: No auth[authentication]method = "trust"
# Production: JWT auth[authentication]enabled = truemethod = "jwt"jwt_secret = "CHANGE-THIS-IN-PRODUCTION"jwt_expiration_secs = 3600 # 1 hour
# Password auth[authentication]enabled = truemethod = "password"password_hash_algorithm = "argon2"users_file = "/etc/heliosdb/users.json"Compression Section
Data compression configuration.
[compression]default_type = "Zstd"level = 3enable_alp = trueenable_fsst = truemin_size_bytes = 1024Options
| Option | Type | Default | Description |
|---|---|---|---|
default_type | String | "Zstd" | Default compression type |
level | Integer | 3 | Compression level (1-22) |
enable_alp | Boolean | true | Enable ALP for numerics |
enable_fsst | Boolean | true | Enable FSST for strings |
min_size_bytes | Integer | 1024 | Minimum size to compress |
Examples
# Maximum compression[compression]default_type = "Zstd"level = 19
# Fast compression[compression]default_type = "Lz4"level = 1
# No compression[compression]default_type = "None"Materialized Views Section
Materialized view refresh configuration.
[materialized_views]auto_refresh_default = falsedefault_max_cpu_percent = 15refresh_check_interval_secs = 60max_concurrent_refreshes = 2Options
| Option | Type | Default | Description |
|---|---|---|---|
auto_refresh_default | Boolean | false | Default auto-refresh |
default_max_cpu_percent | Integer | 15 | Max CPU for refresh |
refresh_check_interval_secs | Integer | 60 | Check interval |
max_concurrent_refreshes | Integer | 2 | Concurrent refreshes |
Vector Section
Vector index configuration.
[vector]default_index_type = "hnsw"hnsw_ef_construction = 200hnsw_m = 16enable_pq = truepq_subvectors = 8pq_bits = 8Options
| Option | Type | Default | Description |
|---|---|---|---|
default_index_type | String | "hnsw" | Index type: flat, hnsw, ivf |
hnsw_ef_construction | Integer | 200 | HNSW construction param |
hnsw_m | Integer | 16 | HNSW connections |
enable_pq | Boolean | true | Enable product quantization |
pq_subvectors | Integer | 8 | PQ subvector count |
pq_bits | Integer | 8 | PQ bits per subvector |
Examples
# High quality index[vector]hnsw_ef_construction = 400hnsw_m = 32
# Fast, low memory[vector]hnsw_ef_construction = 100hnsw_m = 8enable_pq = trueSession Section
Session management configuration.
[session]timeout_secs = 3600max_sessions_per_user = 10cleanup_interval_secs = 300Options
| Option | Type | Default | Description |
|---|---|---|---|
timeout_secs | Integer | 3600 | Session timeout in seconds (1 hour) |
max_sessions_per_user | Integer | 10 | Maximum concurrent sessions per user |
cleanup_interval_secs | Integer | 300 | Cleanup check interval (5 minutes) |
Examples
# Short-lived sessions (API use)[session]timeout_secs = 900max_sessions_per_user = 100
# Long-lived sessions (interactive)[session]timeout_secs = 86400max_sessions_per_user = 5Locks Section
Lock management and deadlock detection configuration.
[locks]timeout_ms = 30000deadlock_check_interval_ms = 100max_lock_holders = 10000Options
| Option | Type | Default | Description |
|---|---|---|---|
timeout_ms | Integer | 30000 | Lock acquisition timeout (30 seconds) |
deadlock_check_interval_ms | Integer | 100 | Deadlock detection interval |
max_lock_holders | Integer | 10000 | Maximum concurrent lock holders |
Examples
# High-concurrency workload[locks]timeout_ms = 60000deadlock_check_interval_ms = 50max_lock_holders = 50000
# Low-latency requirements[locks]timeout_ms = 5000deadlock_check_interval_ms = 10Dump Section
Database backup and dump scheduling configuration.
[dump]auto_dump_enabled = falseschedule = ""compression = "zstd"max_dump_size_mb = 10000keep_dumps = 10dump_dir = ".dumps"Options
| Option | Type | Default | Description |
|---|---|---|---|
auto_dump_enabled | Boolean | false | Enable scheduled dumps |
schedule | String | "" | Cron-style schedule (e.g., "0 */6 * * *") |
compression | String | "zstd" | Compression: zstd, gzip, none |
max_dump_size_mb | Integer | 10000 | Max dump file size before rolling |
keep_dumps | Integer | 10 | Number of old dumps to keep (0 = all) |
dump_dir | String | ".dumps" | Directory to store dump files |
Examples
# Hourly automated dumps[dump]auto_dump_enabled = trueschedule = "0 * * * *"compression = "zstd"keep_dumps = 24
# Daily dumps with maximum compression[dump]auto_dump_enabled = trueschedule = "0 2 * * *"compression = "zstd"max_dump_size_mb = 50000keep_dumps = 30dump_dir = "/var/backups/heliosdb"
# No auto-dump, manual only[dump]auto_dump_enabled = falsecompression = "gzip"Cron Schedule Format
┌───────────── minute (0 - 59)│ ┌───────────── hour (0 - 23)│ │ ┌───────────── day of month (1 - 31)│ │ │ ┌───────────── month (1 - 12)│ │ │ │ ┌───────────── day of week (0 - 6, Sunday = 0)│ │ │ │ │* * * * *
Examples: "0 */6 * * *" - Every 6 hours "0 2 * * *" - Daily at 2:00 AM "0 0 * * 0" - Weekly on Sunday at midnight "*/15 * * * *" - Every 15 minutesResource Quotas Section
Per-user resource limits and quotas.
[resource_quotas]memory_limit_per_user_mb = 1024max_concurrent_queries = 100query_timeout_secs = 300Options
| Option | Type | Default | Description |
|---|---|---|---|
memory_limit_per_user_mb | Integer | 1024 | Memory limit per user (1 GB) |
max_concurrent_queries | Integer | 100 | Maximum concurrent queries per user |
query_timeout_secs | Integer | 300 | Query execution timeout (5 minutes) |
Examples
# Multi-tenant with strict limits[resource_quotas]memory_limit_per_user_mb = 256max_concurrent_queries = 10query_timeout_secs = 60
# Analytics workload (generous limits)[resource_quotas]memory_limit_per_user_mb = 8192max_concurrent_queries = 20query_timeout_secs = 3600Complete Configuration Examples
Development
[storage]memory_only = truewal_enabled = false
[server]listen_addr = "127.0.0.1"port = 5432
[authentication]method = "trust"
[performance]worker_threads = 2Production
[storage]path = "/var/lib/heliosdb"wal_sync_mode = "group_commit"query_timeout_ms = 30000cache_size = 2147483648
[encryption]enabled = true[encryption.key_source]Environment = "HELIOSDB_KEY"
[server]listen_addr = "0.0.0.0"max_connections = 1000tls_enabled = truetls_cert_path = "/etc/heliosdb/ssl/cert.pem"tls_key_path = "/etc/heliosdb/ssl/key.pem"
[authentication]enabled = truemethod = "jwt"jwt_secret = "CHANGE-THIS"
[audit]enabled = truelog_path = "/var/log/heliosdb/audit.log"High-Performance SSD
[storage]cache_size = 4294967296 # 4GB
[optimizer]random_page_cost = 1.1
[performance]worker_threads = 0simd_enabled = true
[compression]default_type = "Lz4"level = 1See Also
- REPL Command Reference - Interactive commands
- SQL Settings Reference - Runtime settings
- Deployment Guide - Production deployment