Skip to content

Configuration

Terminal window
particledb start [OPTIONS]

These examples use the installed release binary name, particledb. If you are running directly from a local Cargo build in this repo, the executable is target/release/spanner.

FlagDefaultDescription
--configconfig.tomlPath to configuration file
--data-dir./dataData directory
--pg-addr0.0.0.0:5432PostgreSQL wire listener
--pg-unix-socketconfig default (/tmp/.s.PGSQL.5433)Unix socket path; pass an empty string to disable
--http-addr0.0.0.0:8080HTTP/status/API listener
--grpc-addr0.0.0.0:26257gRPC listener
--metrics-port9090Prometheus metrics port
--health-port8080Health-check port
--max-connections100Max PG + Redis connections
--connection-timeout300Idle timeout in seconds (0 disables)
--auth-methodtrusttrust, password, or md5
--pg-password(none)PG/role password bootstrap
--tls-cert(none)TLS certificate file
--tls-key(none)TLS private key file
--wal-sync-modegroupsyncsync, groupsync, nosync
--txn-mode(inferred)fast, occ, row-2pl, table-2pl
--oltp-partitions0OLTP partition workers
--snapshot-enabledfalseEnable periodic snapshots
--snapshot-interval3600Snapshot interval (seconds)
--snapshot-max10Max retained snapshots
--snapshot-retention-days(none)Age-based pruning
--snapshot-dir./snapshotsSnapshot directory
--audit-logfalseEnable __pdb_audit_log
--audit-log-selectsfalseAlso log SELECT statements

If --txn-mode is omitted:

  • --wal-sync-mode sync defaults to occ
  • --wal-sync-mode groupsync or nosync defaults to fast
[network]
pg_addr = "0.0.0.0:5432"
pg_unix_path = "/tmp/.s.PGSQL.5433"
http_addr = "0.0.0.0:8080"
grpc_addr = "0.0.0.0:26257"
redis_port = 6379
metrics_port = 9090
health_port = 8080
max_connections = 100
tls_cert_path = "/path/to/cert.pem"
tls_key_path = "/path/to/key.pem"
[security]
auth_method = "trust"
audit_logging = false
[wal]
sync_mode = "groupsync"

There is not a broad PDB_* configuration mirror for the network flags today. The stable configuration surfaces are:

  • CLI flags such as --pg-addr, --http-addr, and --grpc-addr
  • config.toml
  • diagnostic environment variables documented below
VariableValuesDescription
PDB_WIRE_TRACE1Log PG wire message flow with timing
PDB_WIRE_DUMP1Dump raw PG wire frames
PDB_REDIS_PROFILE1 or NProfile Redis commands; N = sample every Nth
PDB_OLTP_PROFILE1 or NProfile OLTP operations
PDB_PARTITION_PROFILE1 or NProfile OLTP partition workers when partition mode is enabled
Terminal window
PDB_WIRE_TRACE=1 particledb start
PDB_REDIS_PROFILE=100 particledb start