Configuration
The server is configured with command-line flags at start-up, with SET CONFIG while it runs, and with SET per session. This page lists every flag, every SET CONFIG key and the session settings, and says which of them take effect without a restart.
rasterizeddb --help prints the same flag list with longer explanations for the build you have. A flag that belongs to a Cargo feature is absent from a build without that feature; the release builds include every feature listed as default in Install, plus sharding_raft and sharding_2pc.
How settings are applied
A value comes from one of three places, highest first:
- The command line. A flag given at start-up always wins.
- The settings file.
SET CONFIGwrites the values it changes torasterizeddb.confin the--locationdirectory, and every start reads that file back. - The built-in default.
SHOW CONFIG has a source column that says which of the three each running value came from (command line, saved or default), so a value saved under a flag that overrides it is visible as such.
The settings file is one per server, however many databases the location holds. It is plain section.key = value lines, with # starting a comment:
# Settings saved by SET CONFIG, applied at every start.
# A flag given on the command line wins over a value here.
filter.max_f = 14
wal.synchronous_commit = offYou can edit it by hand while the server is stopped. A file that does not parse never stops the server from starting: it starts with none of the file applied and says why, and SET CONFIG refuses to save until the file is fixed. A single value that is not valid is reported and ignored.
Flags take the spelling --flag value or --flag=value. Some older flags also accept an underscore spelling (--batch_size, --log_level).
Command-line flags
Data directory and process
| Flag | Default | What it does |
|---|---|---|
--location <PATH> | none, required | The data directory. It holds the default database, and every other database in a subdirectory. Required unless --in-memory or --restore-to is given. |
--in-memory | off | Run a database that lives in memory only. No files are created, and everything is gone when the process exits. |
--concurrent-threads <N> | 16 | Worker threads of the server's runtime. |
--batch-size <N> | 10000 | Row pointers fetched per batch during a scan. |
--log-level <LEVEL> | error | off, error, warn, info, debug or trace. See Running the server. |
--malloc-arenas <N> | 0 (glibc's own, 8 per core) | glibc malloc arenas. Fewer arenas use less memory and cost throughput under concurrency. Ignored where the allocator refuses it, with a message. |
--tune-allocator <BOOL> | false | Keep large buffers allocated between statements. Helps a single large scan; costs throughput when several clients run large scans at once. |
--simd <LEVEL> | auto | Instruction set for the scan kernels: auto, avx512, avx2 or scalar. A level the CPU cannot run stops the start rather than falling back. |
--scan-prefilter <BOOL> | true | Drop rows a WHERE clause cannot match before fetching them, using SIMD compares on fixed-width columns. |
--settle-status-at-open <BOOL> | true | Compact the record of long-finished transactions at open and while running, so its memory does not grow with every transaction ever run. Answers are identical either way. |
Durability and the write-ahead log
| Flag | Default | What it does |
|---|---|---|
--synchronous-commit <on|off> | on | Whether a commit waits for its fdatasync. off returns once the log records are in the operating system's page cache: the server process dying loses nothing, but an OS crash or power loss can lose the last --wal-writer-delay-ms of commits (whole transactions, never part of one). Live: SET CONFIG wal.synchronous_commit; per session: SET synchronous_commit. |
--wal-writer-delay-ms <MS> | 200 | How long an asynchronous commit may stay unsynced. Ignored while synchronous commit is on. |
--wal-checkpoint-bytes <N> | 67108864 (64 MiB) | Log bytes between checkpoints. A checkpoint flushes the data files and discards the log; larger means fewer checkpoints and a longer replay after a crash. |
--wal-prealloc-kb <KB> | 1024 | KiB of zeros the log is extended by ahead of its appends, which makes each commit's sync cheaper on ext4. 0 turns it off. |
| Flag | Default | What it does |
|---|---|---|
--wal-truncate-damaged | off | Start past a damaged log for this one start: records before the damage are replayed and everything from it on is dropped, with an error saying what was lost. The result is not a clean point in time; prefer restoring a backup when the lost commits matter, and copy the log first. |
Automatic compaction
Plain VACUUM reuses row space but not row pointer slots; only a compaction (VACUUM FULL) gives slots back. The server compacts a table or partition on its own when it has at least --auto-compact-min-slots slots and either rule below says it is due. A busy table is skipped, never waited for. Each flag is the starting value of the SET CONFIG auto_compact.* key of the same name. See Maintenance.
| Flag | Default | What it does |
|---|---|---|
--auto-compact <on|off> | on | Compact mostly-dead tables and partitions without being asked. |
--auto-compact-interval-secs <SECS> | 60 | Seconds between two looks at every table and open partition. |
--auto-compact-min-slots <N> | 2048 | Slots a table or partition needs before it can be due at all. |
--auto-compact-ratio <N> | 8 | Due when the slots are this many times the live rows (an update-heavy table). 0 turns this rule off. |
--auto-compact-dead-fraction <0..1> | 0.25 | Due when this fraction of the slots is dead (a retention table). 0 turns this rule off. |
--auto-compact-dead-fraction-max-slots <N> | 131072 | The dead-fraction rule applies only up to this many slots, which bounds how long a compaction holds a table. 0 is no limit. |
--auto-compact-cooldown-secs <SECS> | 600 | Least seconds between two automatic compactions of one table or partition. |
Query cache
| Flag | Default | What it does |
|---|---|---|
--enable-cache <BOOL> | false | Serve repeated queries from a cache of known row offsets. |
--cache-size <N> | 100000 | Entries the query cache holds when it is on. |
Filter index
The filter index is the bit-sliced index every table scan consults. Each flag is the starting value of the matching SET CONFIG filter.* key.
| Flag | Default | What it does |
|---|---|---|
--filter <BOOL> | true | Master switch for the filter index. |
--filter-backfill <BOOL> | true | Index rows that predate the filter when a table opens. |
--filter-min-pruning-ratio <0..1> | see SHOW CONFIG | Skip the index's candidate mask when it would prune less than this fraction. |
--filter-checkpoint-secs <N> | see SHOW CONFIG | Seconds between filter checkpoints. |
--filter-min-f <N> | see SHOW CONFIG | Floor on fingerprint bits per row (4 to 16). |
--filter-default-f <N> | see SHOW CONFIG | Fingerprint bits used before a column's cardinality is known. |
--filter-max-f <N> | see SHOW CONFIG | Ceiling on fingerprint bits per row (4 to 16). Higher costs storage and lowers the false-positive rate. |
--filter-min-selectivity <0..1> | see SHOW CONFIG | Largest fraction of rows an equality predicate may match and still be worth indexing. |
--filter-min-table-rows <N> | see SHOW CONFIG | Tables smaller than this are scanned without consulting the index. |
--filter-zone-bounds <BOOL> | see SHOW CONFIG | Keep per-zone minimum and maximum values for range pruning. |
--filter-bloom <BOOL> | see SHOW CONFIG | Keep a per-superzone summary that cuts how many index bytes a probe reads. |
Run SHOW CONFIG on a fresh server to see the built-in values of the keys marked "see SHOW CONFIG".
Indexes
| Flag | Default | What it does |
|---|---|---|
--index-residency <memory|hybrid|disk> | memory | Where B-tree, hash and path indexes keep their entries. memory holds every entry in RAM. hybrid and disk keep them in sorted files beside the table behind a block cache, with only recent changes in memory: hybrid with a large cache, disk with a small one. Applies to tables opened after it is set. |
--index-cache-mb <MIB> | 1024 for hybrid, 64 for disk | The paged indexes' block cache, shared by every table. |
--index-delta-mb <MIB> | 256 for hybrid, 16 for disk | Memory each paged index holds before writing it out. |
--index-storage <rebuild|snapshot> | rebuild | What opening a table does with its indexes: rebuild them from the rows, or load the snapshot written at the last clean shutdown or idle checkpoint. Must be set here for the tables opened at start-up to load snapshots. |
See Indexes.
JSON and partitions
| Flag | Default | What it does |
|---|---|---|
--json-shadow-tables <BOOL> | false | Store new JSON/JSONB columns by taking each document apart into a table of its own, so its fields become typed columns. Only worth it when documents share a small, stable set of keys; documents whose keys are data make it slow. Affects columns created from then on. See JSON. |
--partition-max-open <N> | 4096 | The most partitions kept open at once, across tables. At start the server raises its soft open-file limit to fit (ten descriptors a partition over a 2,048 reserve), within the hard limit. The environment variable RDB_PARTITION_MAX_OPEN sets it when the flag is not given. See Partitioning. |
Protocols
| Flag | Default | What it does |
|---|---|---|
--protocol <rastcp|pgwire|both> | rastcp | Which SQL protocol to serve. rastcp is the native protocol only, pgwire the PostgreSQL protocol only, both (also spelled all) both at once on one catalogue. |
The default is the native protocol alone. To reach the server with psql or any PostgreSQL driver, start it with --protocol pgwire or --protocol both. The MySQL, SQL Server and Redis listeners are separate and start whenever their port or socket flag is given. See Connecting.
PostgreSQL listener
These apply when --protocol is pgwire or both.
| Flag | Default | What it does |
|---|---|---|
--pg-addr <ADDR> | 127.0.0.1 | Listen address. Use 0.0.0.0 to accept connections from other hosts. |
--pg-port <PORT> | 5432 | Listen port. |
--pg-tcp <on|off> | on | off serves only the unix socket in --pg-socket-dir, with no TCP port. |
--pg-socket-dir <DIR> | none | Also serve on a unix socket DIR/.s.PGSQL.<pg-port>, the name every PostgreSQL client looks for. No TLS on it. |
--pg-socket-auth <METHOD> | --pg-auth | Authentication on the socket: trust, password, md5, scram-sha-256 or peer. |
--pg-tls <disable|prefer|require> | require | require refuses a cleartext connection; prefer encrypts when the client asks; disable never encrypts. |
--pg-cert <PATH> | none | PEM certificate chain. With neither --pg-cert nor --pg-key, a self-signed certificate is made at every start. |
--pg-key <PATH> | none | PEM private key for --pg-cert. |
--pg-auth <METHOD> | scram-sha-256 | trust, password, md5 or scram-sha-256. |
--pg-default-db <NAME> | postgres | The database a connection reaches when it names none, and the one stored in the --location directory itself. |
--pg-user <NAME> | rasterized | The superuser role created when a database's role catalogue is empty. |
--pg-password <PASSWORD> | none | That role's password. Prefer the RASTERIZEDDB_PG_PASSWORD environment variable: a password on the command line is visible to other users in ps. |
--max-connections <N> | 500 | Most PostgreSQL sessions at once. One more is refused with SQLSTATE 53300. Must be at least 1. The server needs 4 × N + 256 open files and raises its limit, or lowers the cap with a warning. |
--authentication-timeout <TIME> | 60s | How long a connection has to send its startup packet, finish TLS and authenticate. A bare number is seconds; 500ms, 30s and 2min also work. |
--idle-in-transaction-session-timeout <TIME> | 0 (off) | Default for idle_in_transaction_session_timeout: a session idle inside a transaction for longer is ended with SQLSTATE 25P03 and its transaction rolled back. A bare number is milliseconds. |
--idle-session-timeout <TIME> | 0 (off) | Default for idle_session_timeout: a session idle outside a transaction for longer is ended with SQLSTATE 57P05. A bare number is milliseconds. |
Native listener
These apply when --protocol is rastcp or both. The native protocol is what rasterizeddb_client, the .NET client and Studio speak. It is always TLS 1.3 over TCP.
| Flag | Default | What it does |
|---|---|---|
--rdb-addr <IP> | 127.0.0.1 | Listen address. Binding an address other machines can reach is refused unless the listener authenticates: set a password first. |
--rdb-port <PORT> | 61170 | Listen port. |
--rdb-tcp <on|off> | on | off serves only the unix socket in --rdb-socket. |
--rdb-socket <PATH> | none | Also serve on this unix socket. No TLS on it. |
--rdb-socket-auth <METHOD> | --rdb-auth | Authentication on the socket: scram-sha-256, trust or peer. |
--rdb-auth <METHOD> | scram-sha-256 | scram-sha-256 or trust. |
--rdb-user <NAME> | rasterized | The superuser role created when the role catalogue is empty and the native protocol is the only SQL protocol. Under --protocol both the PostgreSQL side's --pg-user is created instead. |
--rdb-password <PASSWORD> | none | That role's password. Prefer the RASTERIZEDDB_PASSWORD environment variable. With no password anywhere, the loopback listener accepts any caller and says so at start-up. |
--rdb-cert <PATH> | none | PEM certificate chain, with --rdb-key. Without one, a self-signed certificate is made at every start. |
--rdb-key <PATH> | none | PEM private key for --rdb-cert. |
--rdb-request-timeout <SECONDS> | 30 | How long one native statement may run before it is stopped with SQLSTATE 57014. The connection survives. A connection idle this long is closed too. Raise it for long backups, imports or reports sent over the native protocol. |
Unix socket permissions
| Flag | Default | What it does |
|---|---|---|
--socket-mode <MODE> | 600 | Octal permissions of every unix socket the server serves. 660 admits the socket's group too. Connecting needs write permission. |
--socket-group <GROUP> | none | Group of every unix socket, by name or id. The server's user must belong to it. |
Unix sockets are available on Linux only.
MySQL listener
Off unless --mysql-port or --mysql-socket is given. See MySQL and SQL Server clients.
| Flag | Default | What it does |
|---|---|---|
--mysql-port <PORT> | none | Serve the MySQL / MariaDB protocol on this TCP port (MySQL's own is 3306). |
--mysql-addr <ADDR> | 127.0.0.1 | Listen address. |
--mysql-socket <PATH> | none | Serve it on this unix socket. No TLS on it. |
--mysql-auth <password|trust> | password | password checks caching_sha2_password logins against the role catalogue. |
--mysql-socket-auth <METHOD> | --mysql-auth | Authentication on the socket. trust is refused on a socket open to users outside its owner and group. |
--mysql-tls <disable|prefer|require> | prefer | A role's first password login over TCP needs TLS. |
--mysql-cert <PATH> | --pg-cert, else self-signed | PEM certificate chain. |
--mysql-key <PATH> | --pg-key | PEM private key. |
SQL Server listener
Off unless --mssql-port or --mssql-socket is given.
| Flag | Default | What it does |
|---|---|---|
--mssql-port <PORT> | none | Serve the SQL Server (TDS) protocol on this TCP port (SQL Server's own is 1433). |
--mssql-addr <ADDR> | 127.0.0.1 | Listen address. |
--mssql-socket <PATH> | none | Serve it on this unix socket. No TLS on it. |
--mssql-auth <password|trust> | password | password is SQL Server authentication against the role catalogue. |
--mssql-socket-auth <METHOD> | --mssql-auth | Authentication on the socket. |
--mssql-tls <disable|prefer|require> | prefer | A client that asks for encryption gets the whole connection encrypted. |
--mssql-cert <PATH> | --pg-cert, else self-signed | PEM certificate chain. |
--mssql-key <PATH> | --pg-key | PEM private key. |
| Flag | Default | What it does |
|---|---|---|
--mssql-collation <ci|bin> | ci | Collation of text columns created over the SQL Server protocol without one: ci is case-insensitive (SQL_Latin1_General_CP1_CI_AS), bin compares bytes. |
--mssql-unique-index-error <2601|2627> | 2601 | Error number for a duplicate in a unique index over the SQL Server protocol. |
--mssql-guid-order <sqlserver|binary> | sqlserver | How uniqueidentifier columns created over the SQL Server protocol sort: as SQL Server does, or by their bytes. |
--frontend-upstream <HOST:PORT> | none | Run as a front-end node for a sharded cluster: MySQL and SQL Server sessions are forwarded to this gateway's PostgreSQL listener. |
Redis-compatible key/value store
The Redis port is closed unless --kv-port or --kv-socket is given; KV … statements over SQL work either way. See Key/value cache.
| Flag | Default | What it does |
|---|---|---|
--kv-port <PORT> | none | Serve the Redis protocol on this TCP port. |
--kv-addr <ADDR> | 127.0.0.1 | Listen address. |
--kv-socket <PATH> | none | Serve it on this unix socket (redis-cli -s PATH). |
--kv-auth <password|trust> | password | password checks AUTH against the database's roles. trust is refused on anything but a loopback address. |
--kv-tls <on|off> | off | TLS on --kv-port, with the PostgreSQL listener's certificate (or a self-signed one). The socket is always plain. |
--kv-user <ROLE> | --pg-user | The role that AUTH <password> without a user name is checked as. |
--kv-max-memory <SIZE> | 0 (unbounded) | Bytes the store may hold, like Redis's maxmemory: 512mb, 4gb. |
--kv-eviction <POLICY> | noeviction | What goes when the store is full: noeviction, allkeys-lru, volatile-lru, allkeys-random, volatile-random or volatile-ttl. |
--kv-persist | off | Save the store to db_kv_cache.snap periodically and on a clean shutdown. |
--kv-save-interval-secs <N> | 300 | Seconds between saves when --kv-persist is on. |
--kv-threads <N> | one per CPU | I/O threads for the Redis protocol. |
Storage locations
See Storage pools.
| Flag | Default | What it does |
|---|---|---|
--storage-location <PATH[:ROLE[:WEIGHT]]> | none | An extra directory the database may write into. ROLE is primary (holds tables, the default) or backup (receives a mirrored copy of every write). WEIGHT scales a primary's share under free-space. Repeatable. Added to the locations the database already records, never replacing them. |
--storage-policy <POLICY> | primary | How a new table's directory is chosen: primary, round-robin or free-space. |
--storage-min-free <SIZE> | 256MiB | A location with less free space is not chosen for new tables. 512MB, 2GiB or a byte count. |
Replication
See Replication for how to set up a cluster.
| Flag | Default | What it does |
|---|---|---|
--replication | off | Replicate committed transactions to and from the peers. |
--node-id <N> | none | This node's id: unique in the cluster and not zero. |
--replication-cluster <NAME> | none | Cluster name. Nodes refuse peers that name a different one. |
--replication-token <SECRET> | none | Shared secret every member presents in its handshake. |
--replication-addr <IP> | 127.0.0.1 | Replication listen address. |
--replication-port <PORT> | 61171 | Replication listen port. Set it when running more than one node on a host. |
--peer <NAME@HOST:PORT> | none | A peer, as name@host:port or host:port. Repeatable. |
--replication-mode <MODE> | async | How long a commit waits for peers: async, sync, quorum:N or all. |
--replication-ack-timeout-ms <MS> | 5000 | How long a synchronous commit waits before returning anyway. |
--replication-conflict <POLICY> | abort | A transaction that will not apply: abort, skip or last-writer-wins. |
--replication-compression <SPEC> | auto:zstd:1 | none, zstd[:level] or auto[:zstd[:level]]. |
--replication-batch-records <N> | 256 | Records in one outbound batch. |
--replication-batch-bytes <N> | 1 MiB | Uncompressed bytes in one outbound batch. |
--replication-pipeline-depth <N> | 8 | Batches a link keeps in flight before it waits for an answer. |
--replication-linger-us <US> | 500 | How long a sender waits for more records before sending a partial batch. |
--replication-queue <N> | 8192 | Records a peer's queue holds before overflowing to the log. |
--replication-relay | off | Forward transactions from one peer to the others. Leave off for a full mesh. |
--replication-retention-mb <N> | 256 | History kept for peers that fall behind, in MiB. |
--replication-auth <MODE> | pinned with certificates, ca with a CA, else insecure | How peers prove membership: insecure (encrypts, does not authenticate; loopback only), pinned or ca. |
--replication-cert <PATH> | none | PEM certificate this node presents to its peers. |
--replication-key <PATH> | none | PEM private key for --replication-cert. |
--replication-ca <PATH> | none | PEM certificate authority, under --replication-auth ca. |
--replication-peer-fingerprint <HEX> | none | SHA-256 fingerprint of a peer's certificate, under pinned. Repeatable; list every node. |
--replication-generate-identity <DIR> | none | Write a self-signed replication certificate and key into DIR, print its fingerprint and the flags to use, and exit. |
S3 backup and restore
Backups are on when --s3-bucket is given. See Backup and restore.
| Flag | Default | What it does |
|---|---|---|
--s3-bucket <BUCKET> | none | Bucket to back up into. Setting it enables backups. |
--s3-prefix <PREFIX> | "" | Key prefix in the bucket. One database per prefix: the server refuses to start if the prefix holds another database's backups. |
--s3-region <REGION> | $AWS_REGION, else us-east-1 | Region for request signing. |
--s3-endpoint <URL> | $AWS_ENDPOINT_URL, else AWS | Endpoint for MinIO, RustFS, R2, B2, Wasabi and other S3-compatible stores. |
--s3-access-key <KEY> | $AWS_ACCESS_KEY_ID | Access key. |
--s3-secret-key <SECRET> | $AWS_SECRET_ACCESS_KEY | Secret key. Prefer the environment variable. |
--s3-session-token <TOKEN> | $AWS_SESSION_TOKEN | Session token for temporary credentials. |
--s3-path-style | off | Address buckets as host/bucket/key. Required by MinIO and for bucket names that are not DNS-safe. |
--s3-snapshot-interval-secs <N> | 86400 | Seconds between automatic snapshots; 0 is manual only. An empty prefix gets its first snapshot at once. |
--s3-wal-flush-secs <N> | 300 | Seconds between log archive uploads; 0 is manual only. This is how much recent history a lost server can lose. |
--s3-wal-bundle-mb <MB> | 64 | Staged log that triggers an upload ahead of the interval. |
--s3-retain-snapshots <N> | 7 | Snapshots kept, oldest deleted first; 0 keeps all. |
--s3-rollover-hours <HOURS> | 0 (never) | Hours between rollovers: a fresh full snapshot, after which every earlier generation is deleted. |
--s3-incremental-min-mb <MIB> | 0 (off) | Store files of at least this size as their own objects, so later snapshots reuse unchanged ones. |
--s3-staging-max-mb <MB> | 4096 | Staged log after which archiving is suspended so the disk does not fill. 0 disables the ceiling. |
--s3-snapshot-level <1..22> | 12 | zstd level for snapshots. |
--s3-segment-level <1..22> | 6 | zstd level for log segments. |
--s3-compression-threads <N> | 0 (half the cores, at most 8) | Compression threads. |
--s3-no-long-range | off | Turn off zstd long-distance matching. |
--s3-part-size-mb <MB> | 32 | Multipart part size (minimum 5). Raise it for databases beyond about 320 GB. |
--s3-upload-concurrency <N> | 3 | Parts uploaded at once. |
--s3-max-attempts <N> | 4 | Attempts per request, the first included. |
--s3-backup-now | off | Take a snapshot at every start, on top of the schedule. |
--s3-start-offline | off | Start even when the bucket does not answer, holding the log locally until it does. |
--restore-from-s3 | off | Restore from S3 into --location before opening anything, then start. |
--restore-to <DIR> | none | Restore into DIR and exit without starting a server. |
--restore-at-lsn <N> | none | Stop recovery at this commit sequence number. |
--restore-at-time <TIMESTAMP> | none | Stop recovery at this instant, such as 2026-08-20T10:00:00Z. |
--restore-snapshot <ID> | none | Restore exactly this snapshot. |
--restore-replace | off | Allow an in-place restore over a --location that holds data. The old directory is renamed aside, never deleted. |
PostgreSQL import
An import runs when --pg-import-into is given, and the server exits afterwards unless --pg-import-and-serve is given. See Import from PostgreSQL.
| Flag | Default | What it does |
|---|---|---|
--pg-import-into <NAME> | none | Name of the new database the import builds. |
--pg-import-from <URI> | none | Source connection URI, postgresql://user:password@host:5432/dbname?sslmode=require. The flags below override its parts. |
--pg-import-host <HOST> | $PGHOST, else localhost | Source host. |
--pg-import-port <PORT> | $PGPORT, else 5432 | Source port. |
--pg-import-user <USER> | $PGUSER, else postgres | Source user. |
--pg-import-password <PASSWORD> | $PGPASSWORD | Source password. Prefer the environment variable. |
--pg-import-database <NAME> | $PGDATABASE | Source database. |
--pg-import-sslmode <MODE> | prefer | disable, prefer, require or verify-full. Only verify-full checks who the server is. |
--pg-import-schema <NAME> | public | Schema to read. |
--pg-import-only-tables <TABLE,…> | all | Import only these tables. Repeatable or comma-separated. |
--pg-import-exclude-tables <TABLE,…> | none | Leave these tables out. |
--pg-import-batch-rows <N> | 5000 | Rows per transaction on the way in. |
--pg-import-json <auto|text|native> | auto | What json/jsonb columns become. |
--pg-import-wide-numeric <fail|text> | fail | What to do with a numeric finer than nine decimal places. |
--pg-import-without-constraints | off | Import without primary keys, unique constraints and foreign keys. |
--pg-import-dry-run | off | Report what would be imported, creating nothing. |
--pg-import-and-serve | off | Start the server after the import. |
Message broker
The broker's ports are closed unless given. See Message broker.
| Flag | Default | What it does |
|---|---|---|
--broker-port <PORT> | none | The broker's native protocol port. |
--broker-socket <PATH> | none | The broker's native protocol on a unix socket. |
--broker-addr <ADDR> | 127.0.0.1 | Listen address for the broker's ports. |
--broker-auth <password|trust> | password | trust is refused on anything but loopback. |
--broker-tls <on|off> | off | TLS on --broker-port, with the PostgreSQL listener's certificate. |
--broker-threads <N> | one per CPU | I/O threads for the broker's ports. |
--broker-flush-ms <MS> | 10 | Milliseconds between syncs of async topics. |
--broker-ddl <any|superuser> | any | Who may create and drop topics, queues, exchanges and bindings. |
--kafka-port <PORT> | none | Kafka protocol port. |
--kafka-addr <ADDR> | --broker-addr | Kafka listen address. |
--kafka-advertised-host <HOST> | the listen address | Host Kafka clients are told to connect to; required when listening on 0.0.0.0. |
--kafka-advertised-port <PORT> | the listen port | Port Kafka clients are told. |
--kafka-auth <sasl|trust> | sasl | SASL PLAIN against the roles, or trust (loopback only). |
--kafka-tls <on|off> | off | TLS on the Kafka port. |
--kafka-auto-create <BOOL> | true | Create a topic the first time a client names it. |
--kafka-default-partitions <N> | 1 | Partitions of an auto-created topic. |
--amqp-port <PORT> | none | AMQP 0-9-1 port. |
--amqp-addr <ADDR> | --broker-addr | AMQP listen address. |
--amqp-auth <password|trust> | password | |
--amqp-tls <on|off> | off | TLS on the AMQP port. |
--amqp-heartbeat <SECS> | 60 | Heartbeat the server proposes; 0 turns heartbeats off. |
--amqp-consumer-timeout-ms <MS> | 1800000 | How long a delivered message may stay unacknowledged. |
--mqtt-port <PORT> | none | MQTT 3.1.1 and 5.0 port. |
--mqtt-addr <ADDR> | --broker-addr | MQTT listen address. |
--mqtt-auth <password|trust> | password | |
--mqtt-tls <on|off> | off | TLS on the MQTT port. |
--mqtt-durability <sync|async> | async | How persistent sessions' messages are synced. |
--mqtt-max-packet <BYTES> | 16777216 | Largest packet accepted. |
Sharding
These start the server as one shard of a cluster run by the sharding gateway. See the gateway overview.
| Flag | What it does |
|---|---|
--role shard | Serve only the ranges the cluster map gives --shard-id. |
--cluster-map <FILE> | The cluster map. |
--shard-id <N> | This shard's id in the map. |
--cluster-id <HEX> | When given, the map must name this cluster. |
--shard-listen <ADDR:PORT> | Where gateways reach this shard (mutual TLS only). |
--shard-cert <PEM>, --shard-key <PEM> | Certificate chain and key that listener presents. |
--gateway-ca <PEM> | CA that signs every gateway's certificate. |
--gateway-pin <SHA256> | A gateway certificate's fingerprint. Repeatable. |
--peer-ca <PEM> | CA of the other shards' certificates. Defaults to --gateway-ca. |
--authority-key <HEX> | Public key cluster maps must be signed with. |
--shard-peer-compression <off|zstd[:LEVEL]> | Compression of links to other shards. Default off. |
--raft-id <N>, --raft-listen <ADDR:PORT>, --raft-peer <ID=ADDR:PORT> | This replica's place in its shard's Raft group, in builds with Raft. |
Environment variables
| Variable | What it does |
|---|---|
RASTERIZEDDB_PG_PASSWORD | Password of the bootstrap role when --pg-password is not given. |
RASTERIZEDDB_PASSWORD | Password of the native bootstrap role when --rdb-password is not given. |
RDB_PARTITION_MAX_OPEN | --partition-max-open when the flag is not given. |
RDB_IDLE_TRIM | 0 stops the server returning freed memory to the operating system after it has been idle for a few seconds. |
RASTERIZEDDB_SETTLE_STATUS | 0 is the same as --settle-status-at-open false. |
AWS_REGION, AWS_ENDPOINT_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN | Defaults for the --s3-* flags of the same meaning. |
PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASE | Defaults for the --pg-import-* source flags. |
Changing settings on a running server
SET CONFIG changes a server-wide setting; SHOW CONFIG shows every one. Both work over any SQL protocol, psql included. SET CONFIG needs a superuser.
SHOW CONFIG;
SHOW CONFIG KEYS;
SET CONFIG wal.synchronous_commit = off;
SET CONFIG filter.max_f = 14;SHOW CONFIG returns a row per key with these columns:
| Column | Meaning |
|---|---|
section, key | The key, written section.key in SET CONFIG. |
value | The running value. |
hot_reload | Whether SET CONFIG changes it on the running server. |
set_with | The statement or flag that sets it. |
help | What it does. |
pending | For a key read only at start-up: the value saved for the next start, when it differs from the running one. |
options | The accepted values, when there is a fixed set. |
source | command line, saved or default. |
What SET CONFIG does depends on the key:
- A hot key takes effect at once and is saved to
rasterizeddb.conf, so a restart keeps it. If the server was started with a flag for that key, the reply says so: the flag wins at the next start. - A key read at start-up cannot change the running server.
SET CONFIGsaves it for the next start andSHOW CONFIGshows it underpending. - A key that acts on one database (
replication.*,vacuum.enabled) takes effect at once and is not saved: a restart returns it to its start-up value.
Keys
| Key | Live | Options | What it does |
|---|---|---|---|
server.batch_size | restart | Row pointers fetched per batch (--batch-size). | |
server.concurrent_threads | restart | Worker threads (--concurrent-threads). | |
server.malloc_arenas | restart | glibc malloc arenas (--malloc-arenas). | |
index.residency | restart | memory, hybrid, disk | Where indexes keep their entries (--index-residency). |
index.cache_mb | restart | Paged index block cache; 0 is the residency's default. | |
index.delta_mb | restart | Paged index memory part; 0 is the residency's default. | |
wal.enabled | fixed | true | The log is always on. |
wal.checkpoint_bytes | restart | Log bytes between checkpoints. | |
wal.prealloc_kb | restart | Log preallocation, KiB; 0 off. | |
wal.synchronous_commit | live | on, off | Whether commits wait for their sync. |
wal.writer_delay_ms | live | How long an asynchronous commit may stay unsynced. | |
cache.enabled | restart | true, false | The query cache (--enable-cache). |
cache.size | restart | Query cache entries. | |
filter.enabled | live | true, false | Master switch for the filter index. |
filter.backfill_on_open | live | true, false | Index pre-existing rows at open. |
filter.min_pruning_ratio | live | Skip the mask when it prunes less than this (0 to 1). | |
filter.checkpoint_interval_secs | live | How often the filter is checkpointed. | |
filter.min_f | live | Floor on fingerprint bits (4 to 16). | |
filter.default_f | live | Fingerprint bits before cardinality is known. | |
filter.max_f | live | Ceiling on fingerprint bits (4 to 16). | |
filter.min_selectivity | live | Largest row fraction a predicate may match and still be indexed. | |
filter.min_table_rows | live | Tables smaller than this skip the index. | |
filter.zone_bounds | live | true, false | Per-zone min/max for range pruning. |
filter.bloom | live | true, false | Per-superzone span summary. |
replication.active | live, per database | true, false | Set with REPLICATION ENABLE / REPLICATION DISABLE. |
replication.compression | live, per database | off, zstd:N, auto:zstd:N, always:zstd:N | Link compression. |
replication.mode | live, per database | async, sync, all, quorum:N | How long a commit waits for peers. |
replication.conflict | live, per database | abort, skip, last-writer-wins | Conflict policy. |
replication.ack_timeout_ms | live, per database | How long a synchronous commit waits. | |
replication.batch_max_records | live, per database | Records per outbound batch. | |
replication.batch_linger_us | live, per database | How long a sender waits for more records. | |
query_stats.enabled | live | on, off | Record statements for SHOW QUERIES and pg_stat_statements. |
query_stats.recent | live | Statements kept for SHOW QUERIES. | |
vacuum.enabled | live, per database | Background space reclamation for every table in this database. | |
auto_compact.enabled | live | on, off | Automatic compaction. |
auto_compact.interval_secs | live | See --auto-compact-interval-secs. | |
auto_compact.min_slots | live | See --auto-compact-min-slots. | |
auto_compact.ratio | live | See --auto-compact-ratio. | |
auto_compact.dead_fraction | live | See --auto-compact-dead-fraction. | |
auto_compact.dead_fraction_max_slots | live | See --auto-compact-dead-fraction-max-slots. | |
auto_compact.cooldown_secs | live | See --auto-compact-cooldown-secs. | |
partition.open_budget | live | Partitions open at once across tables; 0 derives it from the open-file limit. | |
partition.max_open | restart | See --partition-max-open. | |
partition.idle_close_secs | live | Seconds without access before a partition closes; 0 turns idle close off. | |
index_snapshot.idle_checkpoint_secs | live | Seconds a table goes unwritten before its index snapshot is taken; 0 off. | |
index_snapshot.seal_timeout_ms | live | How long a mandatory snapshot waits for writers in flight. | |
index_snapshot.shutdown_deadline_secs | live | Time allowed for all index snapshots at shutdown. Keep it below your service manager's stop timeout. | |
index_snapshot.writeback_mb | live | MiB of a snapshot written between two writeback starts. | |
index_snapshot.index_storage | live | rebuild, snapshot | See --index-storage. |
index_snapshot.max_concurrent_loads | live | Index loads at open running at once; 0 is half the cores. | |
index_snapshot.load_wait_ms | live | How long a query waits for an index load at open before it scans instead. | |
index_snapshot.audit_rate | live | One in this many index loads is checked in the background against the rows; 0 checks none. |
| Key | Live | Options | What it does |
|---|---|---|---|
partition.resident_budget | live | Estimated bytes open partitions may hold in memory; 0 bounds them by count alone. | |
roles.create_database_roles | live | owner, all | Which roles CREATE DATABASE gives the new database: its creator and owner, or every role of the default database. |
shard.schema_epoch, shard.ddl_fence | live | Used by the sharding gateway's cluster DDL; not for manual use. |
SET FILTER and RESET FILTER are a second spelling for the filter.* keys and also need a superuser.
Session settings
These are set per connection with SET, read with SHOW, and put back with RESET. SET LOCAL inside a transaction lasts until it ends.
| Setting | What it does |
|---|---|
synchronous_commit | on or off for this session's commits, overriding the server's setting. RESET synchronous_commit follows the server again. |
statement_timeout | Stop a statement that runs longer. |
lock_timeout | Give up waiting for a lock after this long. |
idle_in_transaction_session_timeout | End the session when idle inside a transaction this long (SQLSTATE 25P03). |
idle_session_timeout | End the session when idle outside a transaction this long (SQLSTATE 57P05). |
default_transaction_isolation | read committed (the default) or repeatable read. serializable is accepted and runs as repeatable read. |
default_transaction_read_only | Start transactions read-only. |
rdb.shape_change | What a prepared statement does when its result columns changed since it was described: auto (the default), error (SQLSTATE 0A000, which pgjdbc, Npgsql and psycopg answer by preparing again) or rowdescription (send the new column description before the rows). |
SET statement_timeout = '30s';
BEGIN;
SET LOCAL synchronous_commit = off;
INSERT INTO events (id, body) VALUES (1, 'bulk');
COMMIT;
SHOW synchronous_commit;statement_timeout and lock_timeout can also be sent in the connection's startup parameters (options=-c statement_timeout=5s in a libpq URL), and a role can be given defaults that apply when the client sends none:
ALTER ROLE reporting SET statement_timeout = '5min';ALTER ROLE … SET accepts statement_timeout, lock_timeout and rdb.shape_change; any other parameter is refused. See Transactions for isolation levels.
Limits
- Most flags are read once at start-up. Only the keys marked live above change a running server.
replication.*andvacuum.enabledchanged withSET CONFIGare not saved; put them in the start-up flags to keep them.- There is no configuration file other than
rasterizeddb.conf, and it holds only keysSET CONFIGknows. Listener, TLS, backup and replication settings are flags. - Unix sockets and
peerauthentication exist on Linux only.