Postgres wire protocol
These settings control client connections using the PostgreSQL wire protocol, including networking, authentication, query caching, and worker threads.
Server
pg.enabled
- Default:
true - Reloadable: no
Enable or disable the Postgres wire protocol interface.
pg.worker.affinity
- Default: none
- Reloadable: no
Comma-separated list of CPU core indexes to pin worker threads to. Example:
pg.worker.affinity=1,2,3. Setting it stops QuestDB from confining the pool's
worker groups to CPU sockets. See
CPU socket placement.
pg.worker.count
- Default:
0 - Reloadable: no
Number of dedicated worker threads for PostgreSQL wire protocol queries.
When 0, uses the shared worker pool.
pg.worker.fiber.enabled
- Default:
true - Reloadable: no
Runs the dedicated PostgreSQL worker pool in Fiber mode, where a query can
suspend and release its worker instead of holding it until it finishes. Setting
this to false puts the pool in legacy mode.
This applies only when pg.worker.count is above 0. With the default of 0,
PostgreSQL runs on the shared network pool and
shared.network.worker.fiber.enabled
governs it instead. QuestDB Enterprise
resource groups require Fiber mode on
whichever pool actually serves PostgreSQL.
pg.worker.groups
- Default:
1 - Reloadable: no
Linux only. The number of worker groups the dedicated PostgreSQL worker pool
splits into when pg.worker.count is above 0, each group with its own IO
dispatcher. See
Network worker groups.
pg.daemon.pool
- Default:
true - Reloadable: no
Whether to run all PostgreSQL wire protocol worker threads in daemon mode.
pg.halt.on.error
- Default:
false - Reloadable: no
Whether ingestion should stop upon internal error.
Authentication
pg.password
- Default:
quest - Reloadable: yes
Postgres database password.
pg.readonly.password
- Default:
quest - Reloadable: yes
Postgres database read-only user password.
pg.readonly.user
- Default:
user - Reloadable: yes
Postgres database read-only user username.
pg.readonly.user.enabled
- Default:
false - Reloadable: yes
Enable or disable the Postgres database read-only user account. When enabled, this additional user can open read-only connections to the database.
pg.user
- Default:
admin - Reloadable: yes
Postgres database username.
Connections
pg.connection.pool.capacity
- Default:
64 - Reloadable: no
Maximum number of pooled connections for this interface.
pg.net.bind.to
- Default:
0.0.0.0:8812 - Reloadable: no
IP address and port for the Postgres wire protocol server. 0.0.0.0 binds
to all network interfaces.
pg.net.connection.hint
- Default:
false - Reloadable: no
Windows-specific flag to overcome OS limitations on TCP backlog size.
pg.net.connection.limit
- Default:
64 - Reloadable: yes
Maximum number of simultaneous Postgres connections. Controls server memory consumption. On a pool split into worker groups, each group applies this limit, so the server can hold up to the limit times the group count. See Connections on a split pool.
pg.net.connection.queue.timeout
- Default:
300000 - Reloadable: no
Time in milliseconds the server waits, after reaching
pg.net.connection.limit, before it closes its listener. Meanwhile, new
connections wait in the listen backlog. If a connection closes first, the
server accepts them. Otherwise, closing the listener refuses them, and the
server reopens the listener once its connection count drops below the limit.
On a pool split into worker groups, each group does this on its own. See
Connections on a split pool.
pg.net.connection.rcvbuf
- Default:
-1 - Reloadable: no
Maximum send buffer size on each TCP socket. If set to -1, the socket
buffer remains unchanged from OS defaults.
pg.net.connection.sndbuf
- Default:
-1 - Reloadable: no
Maximum receive buffer size on each TCP socket. If set to -1, the socket
buffer remains unchanged from OS defaults.
pg.net.connection.timeout
- Default:
300000 - Reloadable: no
Connection idle timeout in milliseconds. Connections are closed by the server when this timeout lapses.
Buffers
pg.binary.param.count.capacity
- Default:
2 - Reloadable: no
Initial capacity for the pool used for binary bind variables.
pg.max.blob.size.on.query
- Default:
512k - Reloadable: no
For binary values, clients receive an error when requesting blob sizes above this value.
pg.recv.buffer.size
- Default:
1M - Reloadable: yes
Size of the buffer for receiving data.
pg.send.buffer.size
- Default:
1M - Reloadable: yes
Size of the buffer for sending data.
Security
pg.security.readonly
- Default:
false - Reloadable: no
Forces PostgreSQL wire protocol read-only mode when true, disabling
commands which modify data or data structure (e.g. INSERT, UPDATE, CREATE
TABLE).
Query cache
pg.insert.cache.block.count
- Default:
8 - Reloadable: no
Number of blocks to cache INSERT query execution plans.
pg.insert.cache.enabled
- Default:
true - Reloadable: no
Enable or disable the INSERT query cache. Cache capacity is
number_of_blocks * number_of_rows.
pg.insert.cache.row.count
- Default:
8 - Reloadable: no
Number of rows to cache for INSERT query execution plans.
pg.named.statement.limit
- Default:
64 - Reloadable: yes
Size of the named statement pool.
pg.select.cache.block.count
- Default:
16 - Reloadable: no
Number of blocks to cache SELECT query execution plans.
pg.select.cache.enabled
- Default:
true - Reloadable: no
Enable or disable the SELECT query cache. Cache capacity is
number_of_blocks * number_of_rows.
pg.select.cache.row.count
- Default:
16 - Reloadable: no
Number of rows to cache for SELECT query execution plans.
pg.update.cache.block.count
- Default:
8 - Reloadable: no
Number of blocks to cache UPDATE query execution plans.
pg.update.cache.enabled
- Default:
true - Reloadable: no
Enable or disable the UPDATE query cache. Cache capacity is
number_of_blocks * number_of_rows.
pg.update.cache.row.count
- Default:
8 - Reloadable: no
Number of rows to cache for UPDATE query execution plans.
Internal pools
pg.character.store.capacity
- Default:
4096 - Reloadable: no
Size of the CharacterStore.
pg.character.store.pool.capacity
- Default:
64 - Reloadable: no
Size of the CharacterStore pool capacity.
Locale
pg.date.locale
- Default:
en - Reloadable: no
The locale to handle date types.
pg.timestamp.locale
- Default:
en - Reloadable: no
The locale to handle timestamp types.