Allow setting the number of runtime workers to be used. (#258)

This change adds a new configuration parameter called `worker_threads` that
allows setting the number of workers the Tokio Runtime will use. It defaults to
4 to maintain backward compatibility.

Given that the config file parse is done asynchronously, first, a transient runtime
is created for reading config, and once it has been parsed, the actual runtime
that will be used for PgCat execution is created.
This commit is contained in:
Jose Fernández
2022-12-16 20:13:13 +01:00
committed by GitHub
parent 99247f7c88
commit 9e8ef566c6
3 changed files with 217 additions and 189 deletions

View File

@@ -44,6 +44,9 @@ log_client_disconnections = false
# Reload config automatically if it changes.
autoreload = false
# Number of worker threads the Runtime will use (4 by default).
worker_threads = 5
# TLS
# tls_certificate = "server.cert"
# tls_private_key = "server.key"