MoodengSQL

Configuration

Pass a TOML file to moodengsql serve --config, or copy moodeng.toml.example and let the server auto-discover it.

Example

[server]
host = "0.0.0.0"
port = 5432
max_connections = 100
metrics_port = 9090
# tls_cert / tls_key / require_tls

[storage]
data_dir = "./moodeng_data"

[log]
level = "info"
slow_query_ms = 1000

[auth]
password_scram = ""

[server]

  • host / port — bind address (default 127.0.0.1:5432)
  • max_connections — hard cap; excess clients rejected immediately (default 100)
  • shutdown_timeout_secs — graceful drain before checkpoint (default 30)
  • metrics_host / metrics_port — Prometheus HTTP endpoint (/metrics)
  • tls_cert / tls_key — PEM paths for TLS
  • require_tls — reject plaintext; clients must send SSLRequest first

[auth]

  • password_scram — SCRAM-SHA-256 secret from moodengsql hash-password --scram
  • password_hash — Argon2 hash from moodengsql hash-password (cleartext fallback)
  • Or set MOODENG_PASSWORD env at runtime (hashed on startup)

[storage]

  • data_dir — WAL, meta.bin, and table files (default ./moodeng_data)
  • max_cached_pages — LRU page cache per table (0 = legacy in-memory mode; use 64+ in production)
  • rows_per_page — rows per on-disk page when cache is enabled (default 16)

[log]

  • level — tracing filter (default info)
  • slow_query_ms — WARN threshold for slow queries (default 1000)
  • format — text (default) or json