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-modeoccfast, occ, serializable
--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
ModeDurable when COMMIT returns?Batching policy
syncYesfsync forced at the commit site
groupsync (default)YesConcurrent commits share one fsync
nosyncNono fsync

--txn-mode sets the server-wide default transaction mode. There are three supported modes:

ModeIsolation level
fastNo isolation guarantee — writes apply in place, concurrent writers overwrite each other silently. Bulk load / single-writer ingest only.
occ (default)Snapshot Isolation — commit-time read-set validation also catches item write skew; allows predicate anti-dependency cycles (G2)
serializableStrict Serializable — allows nothing

These are the only three accepted values. The earlier spellings — occ-v3, zero-copy-occ, serializable-ssi, ssi, strict-serializable, table-2pl, and 2pl — have been removed, not deprecated: the server refuses to start and names the replacement. See CLI Reference for the full mapping, and Transaction Engine for the engine detail.

If --txn-mode is omitted the mode is occ, whatever the WAL sync mode. A durability flag does not change your isolation level.

The one exception is --wal-sync-mode sync with --txn-mode omitted. That combination used to select a serializable engine through an inference that no longer exists, so defaulting it to occ would quietly weaken an existing deployment to snapshot isolation. The server refuses to start and asks you to state the isolation level.

Individual sessions can override the default with SET TRANSACTION ISOLATION LEVEL; see Transaction Engine.

[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