NEW RasterizedDB 1.1.0 is out: sharding and the gateway, the message broker, roles and row-level security, compression, .NET on NuGet, and the enterprise edition. What's new ›
DOCS / RASTERIZEDDB SERVER / CONFIGURATION

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:

  1. The command line. A flag given at start-up always wins.
  2. The settings file. SET CONFIG writes the values it changes to rasterizeddb.conf in the --location directory, and every start reads that file back.
  3. 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:

text
# 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 = off

You 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

FlagDefaultWhat it does
--location <PATH>none, requiredThe data directory. It holds the default database, and every other database in a subdirectory. Required unless --in-memory or --restore-to is given.
--in-memoryoffRun a database that lives in memory only. No files are created, and everything is gone when the process exits.
--concurrent-threads <N>16Worker threads of the server's runtime.
--batch-size <N>10000Row pointers fetched per batch during a scan.
--log-level <LEVEL>erroroff, 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>falseKeep large buffers allocated between statements. Helps a single large scan; costs throughput when several clients run large scans at once.
--simd <LEVEL>autoInstruction 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>trueDrop rows a WHERE clause cannot match before fetching them, using SIMD compares on fixed-width columns.
--settle-status-at-open <BOOL>trueCompact 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

FlagDefaultWhat it does
--synchronous-commit <on|off>onWhether 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>200How 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>1024KiB of zeros the log is extended by ahead of its appends, which makes each commit's sync cheaper on ext4. 0 turns it off.
FlagDefaultWhat it does
--wal-truncate-damagedoffStart 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.

FlagDefaultWhat it does
--auto-compact <on|off>onCompact mostly-dead tables and partitions without being asked.
--auto-compact-interval-secs <SECS>60Seconds between two looks at every table and open partition.
--auto-compact-min-slots <N>2048Slots a table or partition needs before it can be due at all.
--auto-compact-ratio <N>8Due 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.25Due when this fraction of the slots is dead (a retention table). 0 turns this rule off.
--auto-compact-dead-fraction-max-slots <N>131072The 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>600Least seconds between two automatic compactions of one table or partition.

Query cache

FlagDefaultWhat it does
--enable-cache <BOOL>falseServe repeated queries from a cache of known row offsets.
--cache-size <N>100000Entries 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.

FlagDefaultWhat it does
--filter <BOOL>trueMaster switch for the filter index.
--filter-backfill <BOOL>trueIndex rows that predate the filter when a table opens.
--filter-min-pruning-ratio <0..1>see SHOW CONFIGSkip the index's candidate mask when it would prune less than this fraction.
--filter-checkpoint-secs <N>see SHOW CONFIGSeconds between filter checkpoints.
--filter-min-f <N>see SHOW CONFIGFloor on fingerprint bits per row (4 to 16).
--filter-default-f <N>see SHOW CONFIGFingerprint bits used before a column's cardinality is known.
--filter-max-f <N>see SHOW CONFIGCeiling on fingerprint bits per row (4 to 16). Higher costs storage and lowers the false-positive rate.
--filter-min-selectivity <0..1>see SHOW CONFIGLargest fraction of rows an equality predicate may match and still be worth indexing.
--filter-min-table-rows <N>see SHOW CONFIGTables smaller than this are scanned without consulting the index.
--filter-zone-bounds <BOOL>see SHOW CONFIGKeep per-zone minimum and maximum values for range pruning.
--filter-bloom <BOOL>see SHOW CONFIGKeep 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

FlagDefaultWhat it does
--index-residency <memory|hybrid|disk>memoryWhere 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 diskThe paged indexes' block cache, shared by every table.
--index-delta-mb <MIB>256 for hybrid, 16 for diskMemory each paged index holds before writing it out.
--index-storage <rebuild|snapshot>rebuildWhat 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

FlagDefaultWhat it does
--json-shadow-tables <BOOL>falseStore 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>4096The 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

FlagDefaultWhat it does
--protocol <rastcp|pgwire|both>rastcpWhich 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.

FlagDefaultWhat it does
--pg-addr <ADDR>127.0.0.1Listen address. Use 0.0.0.0 to accept connections from other hosts.
--pg-port <PORT>5432Listen port.
--pg-tcp <on|off>onoff serves only the unix socket in --pg-socket-dir, with no TCP port.
--pg-socket-dir <DIR>noneAlso 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-authAuthentication on the socket: trust, password, md5, scram-sha-256 or peer.
--pg-tls <disable|prefer|require>requirerequire refuses a cleartext connection; prefer encrypts when the client asks; disable never encrypts.
--pg-cert <PATH>nonePEM certificate chain. With neither --pg-cert nor --pg-key, a self-signed certificate is made at every start.
--pg-key <PATH>nonePEM private key for --pg-cert.
--pg-auth <METHOD>scram-sha-256trust, password, md5 or scram-sha-256.
--pg-default-db <NAME>postgresThe database a connection reaches when it names none, and the one stored in the --location directory itself.
--pg-user <NAME>rasterizedThe superuser role created when a database's role catalogue is empty.
--pg-password <PASSWORD>noneThat 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>500Most 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>60sHow 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.

FlagDefaultWhat it does
--rdb-addr <IP>127.0.0.1Listen address. Binding an address other machines can reach is refused unless the listener authenticates: set a password first.
--rdb-port <PORT>61170Listen port.
--rdb-tcp <on|off>onoff serves only the unix socket in --rdb-socket.
--rdb-socket <PATH>noneAlso serve on this unix socket. No TLS on it.
--rdb-socket-auth <METHOD>--rdb-authAuthentication on the socket: scram-sha-256, trust or peer.
--rdb-auth <METHOD>scram-sha-256scram-sha-256 or trust.
--rdb-user <NAME>rasterizedThe 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>noneThat 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>nonePEM certificate chain, with --rdb-key. Without one, a self-signed certificate is made at every start.
--rdb-key <PATH>nonePEM private key for --rdb-cert.
--rdb-request-timeout <SECONDS>30How 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

FlagDefaultWhat it does
--socket-mode <MODE>600Octal permissions of every unix socket the server serves. 660 admits the socket's group too. Connecting needs write permission.
--socket-group <GROUP>noneGroup 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.

FlagDefaultWhat it does
--mysql-port <PORT>noneServe the MySQL / MariaDB protocol on this TCP port (MySQL's own is 3306).
--mysql-addr <ADDR>127.0.0.1Listen address.
--mysql-socket <PATH>noneServe it on this unix socket. No TLS on it.
--mysql-auth <password|trust>passwordpassword checks caching_sha2_password logins against the role catalogue.
--mysql-socket-auth <METHOD>--mysql-authAuthentication on the socket. trust is refused on a socket open to users outside its owner and group.
--mysql-tls <disable|prefer|require>preferA role's first password login over TCP needs TLS.
--mysql-cert <PATH>--pg-cert, else self-signedPEM certificate chain.
--mysql-key <PATH>--pg-keyPEM private key.

SQL Server listener

Off unless --mssql-port or --mssql-socket is given.

FlagDefaultWhat it does
--mssql-port <PORT>noneServe the SQL Server (TDS) protocol on this TCP port (SQL Server's own is 1433).
--mssql-addr <ADDR>127.0.0.1Listen address.
--mssql-socket <PATH>noneServe it on this unix socket. No TLS on it.
--mssql-auth <password|trust>passwordpassword is SQL Server authentication against the role catalogue.
--mssql-socket-auth <METHOD>--mssql-authAuthentication on the socket.
--mssql-tls <disable|prefer|require>preferA client that asks for encryption gets the whole connection encrypted.
--mssql-cert <PATH>--pg-cert, else self-signedPEM certificate chain.
--mssql-key <PATH>--pg-keyPEM private key.
FlagDefaultWhat it does
--mssql-collation <ci|bin>ciCollation 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>2601Error number for a duplicate in a unique index over the SQL Server protocol.
--mssql-guid-order <sqlserver|binary>sqlserverHow uniqueidentifier columns created over the SQL Server protocol sort: as SQL Server does, or by their bytes.
--frontend-upstream <HOST:PORT>noneRun 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.

FlagDefaultWhat it does
--kv-port <PORT>noneServe the Redis protocol on this TCP port.
--kv-addr <ADDR>127.0.0.1Listen address.
--kv-socket <PATH>noneServe it on this unix socket (redis-cli -s PATH).
--kv-auth <password|trust>passwordpassword checks AUTH against the database's roles. trust is refused on anything but a loopback address.
--kv-tls <on|off>offTLS on --kv-port, with the PostgreSQL listener's certificate (or a self-signed one). The socket is always plain.
--kv-user <ROLE>--pg-userThe 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>noevictionWhat goes when the store is full: noeviction, allkeys-lru, volatile-lru, allkeys-random, volatile-random or volatile-ttl.
--kv-persistoffSave the store to db_kv_cache.snap periodically and on a clean shutdown.
--kv-save-interval-secs <N>300Seconds between saves when --kv-persist is on.
--kv-threads <N>one per CPUI/O threads for the Redis protocol.

Storage locations

See Storage pools.

FlagDefaultWhat it does
--storage-location <PATH[:ROLE[:WEIGHT]]>noneAn 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>primaryHow a new table's directory is chosen: primary, round-robin or free-space.
--storage-min-free <SIZE>256MiBA 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.

FlagDefaultWhat it does
--replicationoffReplicate committed transactions to and from the peers.
--node-id <N>noneThis node's id: unique in the cluster and not zero.
--replication-cluster <NAME>noneCluster name. Nodes refuse peers that name a different one.
--replication-token <SECRET>noneShared secret every member presents in its handshake.
--replication-addr <IP>127.0.0.1Replication listen address.
--replication-port <PORT>61171Replication listen port. Set it when running more than one node on a host.
--peer <NAME@HOST:PORT>noneA peer, as name@host:port or host:port. Repeatable.
--replication-mode <MODE>asyncHow long a commit waits for peers: async, sync, quorum:N or all.
--replication-ack-timeout-ms <MS>5000How long a synchronous commit waits before returning anyway.
--replication-conflict <POLICY>abortA transaction that will not apply: abort, skip or last-writer-wins.
--replication-compression <SPEC>auto:zstd:1none, zstd[:level] or auto[:zstd[:level]].
--replication-batch-records <N>256Records in one outbound batch.
--replication-batch-bytes <N>1 MiBUncompressed bytes in one outbound batch.
--replication-pipeline-depth <N>8Batches a link keeps in flight before it waits for an answer.
--replication-linger-us <US>500How long a sender waits for more records before sending a partial batch.
--replication-queue <N>8192Records a peer's queue holds before overflowing to the log.
--replication-relayoffForward transactions from one peer to the others. Leave off for a full mesh.
--replication-retention-mb <N>256History kept for peers that fall behind, in MiB.
--replication-auth <MODE>pinned with certificates, ca with a CA, else insecureHow peers prove membership: insecure (encrypts, does not authenticate; loopback only), pinned or ca.
--replication-cert <PATH>nonePEM certificate this node presents to its peers.
--replication-key <PATH>nonePEM private key for --replication-cert.
--replication-ca <PATH>nonePEM certificate authority, under --replication-auth ca.
--replication-peer-fingerprint <HEX>noneSHA-256 fingerprint of a peer's certificate, under pinned. Repeatable; list every node.
--replication-generate-identity <DIR>noneWrite 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.

FlagDefaultWhat it does
--s3-bucket <BUCKET>noneBucket 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-1Region for request signing.
--s3-endpoint <URL>$AWS_ENDPOINT_URL, else AWSEndpoint for MinIO, RustFS, R2, B2, Wasabi and other S3-compatible stores.
--s3-access-key <KEY>$AWS_ACCESS_KEY_IDAccess key.
--s3-secret-key <SECRET>$AWS_SECRET_ACCESS_KEYSecret key. Prefer the environment variable.
--s3-session-token <TOKEN>$AWS_SESSION_TOKENSession token for temporary credentials.
--s3-path-styleoffAddress buckets as host/bucket/key. Required by MinIO and for bucket names that are not DNS-safe.
--s3-snapshot-interval-secs <N>86400Seconds between automatic snapshots; 0 is manual only. An empty prefix gets its first snapshot at once.
--s3-wal-flush-secs <N>300Seconds between log archive uploads; 0 is manual only. This is how much recent history a lost server can lose.
--s3-wal-bundle-mb <MB>64Staged log that triggers an upload ahead of the interval.
--s3-retain-snapshots <N>7Snapshots 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>4096Staged log after which archiving is suspended so the disk does not fill. 0 disables the ceiling.
--s3-snapshot-level <1..22>12zstd level for snapshots.
--s3-segment-level <1..22>6zstd level for log segments.
--s3-compression-threads <N>0 (half the cores, at most 8)Compression threads.
--s3-no-long-rangeoffTurn off zstd long-distance matching.
--s3-part-size-mb <MB>32Multipart part size (minimum 5). Raise it for databases beyond about 320 GB.
--s3-upload-concurrency <N>3Parts uploaded at once.
--s3-max-attempts <N>4Attempts per request, the first included.
--s3-backup-nowoffTake a snapshot at every start, on top of the schedule.
--s3-start-offlineoffStart even when the bucket does not answer, holding the log locally until it does.
--restore-from-s3offRestore from S3 into --location before opening anything, then start.
--restore-to <DIR>noneRestore into DIR and exit without starting a server.
--restore-at-lsn <N>noneStop recovery at this commit sequence number.
--restore-at-time <TIMESTAMP>noneStop recovery at this instant, such as 2026-08-20T10:00:00Z.
--restore-snapshot <ID>noneRestore exactly this snapshot.
--restore-replaceoffAllow 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.

FlagDefaultWhat it does
--pg-import-into <NAME>noneName of the new database the import builds.
--pg-import-from <URI>noneSource connection URI, postgresql://user:password@host:5432/dbname?sslmode=require. The flags below override its parts.
--pg-import-host <HOST>$PGHOST, else localhostSource host.
--pg-import-port <PORT>$PGPORT, else 5432Source port.
--pg-import-user <USER>$PGUSER, else postgresSource user.
--pg-import-password <PASSWORD>$PGPASSWORDSource password. Prefer the environment variable.
--pg-import-database <NAME>$PGDATABASESource database.
--pg-import-sslmode <MODE>preferdisable, prefer, require or verify-full. Only verify-full checks who the server is.
--pg-import-schema <NAME>publicSchema to read.
--pg-import-only-tables <TABLE,…>allImport only these tables. Repeatable or comma-separated.
--pg-import-exclude-tables <TABLE,…>noneLeave these tables out.
--pg-import-batch-rows <N>5000Rows per transaction on the way in.
--pg-import-json <auto|text|native>autoWhat json/jsonb columns become.
--pg-import-wide-numeric <fail|text>failWhat to do with a numeric finer than nine decimal places.
--pg-import-without-constraintsoffImport without primary keys, unique constraints and foreign keys.
--pg-import-dry-runoffReport what would be imported, creating nothing.
--pg-import-and-serveoffStart the server after the import.

Message broker

The broker's ports are closed unless given. See Message broker.

FlagDefaultWhat it does
--broker-port <PORT>noneThe broker's native protocol port.
--broker-socket <PATH>noneThe broker's native protocol on a unix socket.
--broker-addr <ADDR>127.0.0.1Listen address for the broker's ports.
--broker-auth <password|trust>passwordtrust is refused on anything but loopback.
--broker-tls <on|off>offTLS on --broker-port, with the PostgreSQL listener's certificate.
--broker-threads <N>one per CPUI/O threads for the broker's ports.
--broker-flush-ms <MS>10Milliseconds between syncs of async topics.
--broker-ddl <any|superuser>anyWho may create and drop topics, queues, exchanges and bindings.
--kafka-port <PORT>noneKafka protocol port.
--kafka-addr <ADDR>--broker-addrKafka listen address.
--kafka-advertised-host <HOST>the listen addressHost Kafka clients are told to connect to; required when listening on 0.0.0.0.
--kafka-advertised-port <PORT>the listen portPort Kafka clients are told.
--kafka-auth <sasl|trust>saslSASL PLAIN against the roles, or trust (loopback only).
--kafka-tls <on|off>offTLS on the Kafka port.
--kafka-auto-create <BOOL>trueCreate a topic the first time a client names it.
--kafka-default-partitions <N>1Partitions of an auto-created topic.
--amqp-port <PORT>noneAMQP 0-9-1 port.
--amqp-addr <ADDR>--broker-addrAMQP listen address.
--amqp-auth <password|trust>password
--amqp-tls <on|off>offTLS on the AMQP port.
--amqp-heartbeat <SECS>60Heartbeat the server proposes; 0 turns heartbeats off.
--amqp-consumer-timeout-ms <MS>1800000How long a delivered message may stay unacknowledged.
--mqtt-port <PORT>noneMQTT 3.1.1 and 5.0 port.
--mqtt-addr <ADDR>--broker-addrMQTT listen address.
--mqtt-auth <password|trust>password
--mqtt-tls <on|off>offTLS on the MQTT port.
--mqtt-durability <sync|async>asyncHow persistent sessions' messages are synced.
--mqtt-max-packet <BYTES>16777216Largest packet accepted.

Sharding

These start the server as one shard of a cluster run by the sharding gateway. See the gateway overview.

FlagWhat it does
--role shardServe 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

VariableWhat it does
RASTERIZEDDB_PG_PASSWORDPassword of the bootstrap role when --pg-password is not given.
RASTERIZEDDB_PASSWORDPassword 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_TRIM0 stops the server returning freed memory to the operating system after it has been idle for a few seconds.
RASTERIZEDDB_SETTLE_STATUS0 is the same as --settle-status-at-open false.
AWS_REGION, AWS_ENDPOINT_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKENDefaults for the --s3-* flags of the same meaning.
PGHOST, PGPORT, PGUSER, PGPASSWORD, PGDATABASEDefaults 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.

sql
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:

ColumnMeaning
section, keyThe key, written section.key in SET CONFIG.
valueThe running value.
hot_reloadWhether SET CONFIG changes it on the running server.
set_withThe statement or flag that sets it.
helpWhat it does.
pendingFor a key read only at start-up: the value saved for the next start, when it differs from the running one.
optionsThe accepted values, when there is a fixed set.
sourcecommand 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 CONFIG saves it for the next start and SHOW CONFIG shows it under pending.
  • 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

KeyLiveOptionsWhat it does
server.batch_sizerestartRow pointers fetched per batch (--batch-size).
server.concurrent_threadsrestartWorker threads (--concurrent-threads).
server.malloc_arenasrestartglibc malloc arenas (--malloc-arenas).
index.residencyrestartmemory, hybrid, diskWhere indexes keep their entries (--index-residency).
index.cache_mbrestartPaged index block cache; 0 is the residency's default.
index.delta_mbrestartPaged index memory part; 0 is the residency's default.
wal.enabledfixedtrueThe log is always on.
wal.checkpoint_bytesrestartLog bytes between checkpoints.
wal.prealloc_kbrestartLog preallocation, KiB; 0 off.
wal.synchronous_commitliveon, offWhether commits wait for their sync.
wal.writer_delay_msliveHow long an asynchronous commit may stay unsynced.
cache.enabledrestarttrue, falseThe query cache (--enable-cache).
cache.sizerestartQuery cache entries.
filter.enabledlivetrue, falseMaster switch for the filter index.
filter.backfill_on_openlivetrue, falseIndex pre-existing rows at open.
filter.min_pruning_ratioliveSkip the mask when it prunes less than this (0 to 1).
filter.checkpoint_interval_secsliveHow often the filter is checkpointed.
filter.min_fliveFloor on fingerprint bits (4 to 16).
filter.default_fliveFingerprint bits before cardinality is known.
filter.max_fliveCeiling on fingerprint bits (4 to 16).
filter.min_selectivityliveLargest row fraction a predicate may match and still be indexed.
filter.min_table_rowsliveTables smaller than this skip the index.
filter.zone_boundslivetrue, falsePer-zone min/max for range pruning.
filter.bloomlivetrue, falsePer-superzone span summary.
replication.activelive, per databasetrue, falseSet with REPLICATION ENABLE / REPLICATION DISABLE.
replication.compressionlive, per databaseoff, zstd:N, auto:zstd:N, always:zstd:NLink compression.
replication.modelive, per databaseasync, sync, all, quorum:NHow long a commit waits for peers.
replication.conflictlive, per databaseabort, skip, last-writer-winsConflict policy.
replication.ack_timeout_mslive, per databaseHow long a synchronous commit waits.
replication.batch_max_recordslive, per databaseRecords per outbound batch.
replication.batch_linger_uslive, per databaseHow long a sender waits for more records.
query_stats.enabledliveon, offRecord statements for SHOW QUERIES and pg_stat_statements.
query_stats.recentliveStatements kept for SHOW QUERIES.
vacuum.enabledlive, per databaseBackground space reclamation for every table in this database.
auto_compact.enabledliveon, offAutomatic compaction.
auto_compact.interval_secsliveSee --auto-compact-interval-secs.
auto_compact.min_slotsliveSee --auto-compact-min-slots.
auto_compact.ratioliveSee --auto-compact-ratio.
auto_compact.dead_fractionliveSee --auto-compact-dead-fraction.
auto_compact.dead_fraction_max_slotsliveSee --auto-compact-dead-fraction-max-slots.
auto_compact.cooldown_secsliveSee --auto-compact-cooldown-secs.
partition.open_budgetlivePartitions open at once across tables; 0 derives it from the open-file limit.
partition.max_openrestartSee --partition-max-open.
partition.idle_close_secsliveSeconds without access before a partition closes; 0 turns idle close off.
index_snapshot.idle_checkpoint_secsliveSeconds a table goes unwritten before its index snapshot is taken; 0 off.
index_snapshot.seal_timeout_msliveHow long a mandatory snapshot waits for writers in flight.
index_snapshot.shutdown_deadline_secsliveTime allowed for all index snapshots at shutdown. Keep it below your service manager's stop timeout.
index_snapshot.writeback_mbliveMiB of a snapshot written between two writeback starts.
index_snapshot.index_storageliverebuild, snapshotSee --index-storage.
index_snapshot.max_concurrent_loadsliveIndex loads at open running at once; 0 is half the cores.
index_snapshot.load_wait_msliveHow long a query waits for an index load at open before it scans instead.
index_snapshot.audit_rateliveOne in this many index loads is checked in the background against the rows; 0 checks none.
KeyLiveOptionsWhat it does
partition.resident_budgetliveEstimated bytes open partitions may hold in memory; 0 bounds them by count alone.
roles.create_database_rolesliveowner, allWhich roles CREATE DATABASE gives the new database: its creator and owner, or every role of the default database.
shard.schema_epoch, shard.ddl_fenceliveUsed 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.

SettingWhat it does
synchronous_commiton or off for this session's commits, overriding the server's setting. RESET synchronous_commit follows the server again.
statement_timeoutStop a statement that runs longer.
lock_timeoutGive up waiting for a lock after this long.
idle_in_transaction_session_timeoutEnd the session when idle inside a transaction this long (SQLSTATE 25P03).
idle_session_timeoutEnd the session when idle outside a transaction this long (SQLSTATE 57P05).
default_transaction_isolationread committed (the default) or repeatable read. serializable is accepted and runs as repeatable read.
default_transaction_read_onlyStart transactions read-only.
rdb.shape_changeWhat 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).
sql
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:

sql
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.* and vacuum.enabled changed with SET CONFIG are 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 keys SET CONFIG knows. Listener, TLS, backup and replication settings are flags.
  • Unix sockets and peer authentication exist on Linux only.
✓ page rendered in 188 µs axum + tera + htmx · no other javascript