MoodengSQL

Production

v0.1 is a Production MVP for controlled single-node deployments. Not a full PostgreSQL replacement.

Go-live checklist

  1. CI green on GitHub Actions
  2. [auth].password_scram + [server].require_tls
  3. Real TLS cert (tls_cert / tls_key)
  4. [storage].max_cached_pages for large tables
  5. Scheduled backup + tested restore
  6. Prometheus on metrics_port
  7. SIGTERM for deploys

Security

[auth]
password_scram = "..."

[server]
tls_cert = "/path/to/cert.pem"
tls_key = "/path/to/key.pem"
require_tls = true
metrics_port = 9090

[storage]
max_cached_pages = 64
  • moodengsql hash-password --scram "secret" for libpq / psql
  • moodengsql hash-password "secret" for Argon2 cleartext fallback
  • MD5 auth is not supported

Backup & restore

moodengsql backup --output backup.tar.gz --data-dir ./moodeng_data
moodengsql restore --from backup.tar.gz --data-dir ./moodeng_data
moodengsql check --data-dir ./moodeng_data

Backup takes a gzip tar snapshot while the server is running. Always test restore on staging.

Monitoring

# scrape moodeng_connections_active, moodeng_queries_total, etc.
curl http://127.0.0.1:9090/metrics

Prometheus series exposed:

  • moodeng_up
  • moodeng_connections_active
  • moodeng_queries_total
  • moodeng_query_errors_total
  • moodeng_slow_queries_total
  • moodeng_tables

Graceful shutdown

SIGTERM or Ctrl+C → drain active connections (shutdown_timeout_secs, default 30) → final checkpoint. Docker and Kubernetes send SIGTERM by default — avoid kill -9.