Scroll to navigation

PGAGROAL.CONF(5) File Formats Manual PGAGROAL.CONF(5)

NAME

pgagroal.conf - Main configuration file for pgagroal

DESCRIPTION

pgagroal.conf is the main configuration file for pgagroal.

The file is split into different sections specified by the [ and ] characters. The main section is called [pgagroal].

Other sections specifies the PostgreSQL server configuration.

All properties are in the format key = value.

The characters # and ; can be used for comments; must be the first character on the line. The Bool data type supports the following values: on, 1, true, off, 0 and false.

OPTIONS

The options for the main section are

The bind address for pgagroal. Mandatory
The bind port for pgagroal. Mandatory
The Unix Domain Socket location. Mandatory
The metrics port. Default is 0 (disabled)
The number of seconds to keep in cache a Prometheus (metrics) response. If set to zero, the caching will be disabled. Can be a string with a suffix, like 2m to indicate 2 minutes. Default is 0 (disabled)
The maximum amount of data to keep in cache when serving Prometheus responses. Changes require restart. This parameter determines the size of memory allocated for the cache even if metrics_cache_max_age or metrics are disabled. Its value, however, is taken into account only if metrics_cache_max_age is set to a non-zero value. Supports suffixes: B (bytes), the default if omitted, K or KB (kilobytes), M or MB (megabytes), G or GB (gigabytes). Default is 256k
The remote management port. Default is 0 (disabled)
The logging type (console, file, syslog). Default is console
The logging level, any of the (case insensitive) strings FATAL, ERROR, WARN, INFO and DEBUG (that can be more specific as DEBUG1 thru DEBUG5). Debug level greater than 5 will be set to DEBUG5. Not recognized values will make the log_level be INFO. Default is info
The log file location. Default is pgagroal.log. Can be a strftime(3) compatible string
The age that will trigger a log file rotation. If expressed as a positive number, is managed as seconds. Supports suffixes: S (seconds, the default), M (minutes), H (hours), D (days), W (weeks). A value of 0 disables. Default is 0 (disabled)
The size of the log file that will trigger a log rotation. Supports suffixes: B (bytes), the default if omitted, K or KB (kilobytes), M or MB (megabytes), G or GB (gigabytes). A value of 0 (with or without suffix) disables. Default is 0
A strftime(3) compatible string to use as prefix for every log line. Must be quoted if contains spaces. Default is %Y-%m-%d %H:%M:%S
Append to or create the log file (append, create). Default is append
Log connects. Default is off
Log disconnects. Default is off
The number of seconds the process will be blocking for a connection (disable = 0). Default is 30
The number of seconds a connection is been kept alive (disable = 0). Default is 0
The maximum number of seconds that a connection will live (disable = 0). Default is 0
Should connection validation be performed. Valid options: off, foreground and background. Default is off
The interval between background validation scans in seconds. Default is 300
The maximum number of iterations to obtain a connection. Default is 5
The maximum number of connections (max 1000). Default is 1000
Allow unknown users to connect. Default is true
The number of seconds the process will wait for valid credentials. Default is 5
The pipeline type. Valid options are auto, performance, session and transaction. Default is auto
Enable authentication query. Default is false
Enable failover support. Default is false
The failover script
Enable Transport Layer Security (TLS). Default is false
Certificate file for TLS
Private key file for TLS
Certificate Authority (CA) file for TLS
The libev backend to use. Valid options: auto, select, poll, epoll, iouring, devpoll and port. Default is auto
The network buffer size (SO_RCVBUF and SO_SNDBUF). Default is 65535
Have SO_KEEPALIVE on sockets. Default is on
Have TCP_NODELAY on sockets. Default is on
Have O_NONBLOCK on sockets. Default is off
The backlog for listen(). Minimum 16. Default is max_connections / 4
Huge page support. Default is try
Track connection lifecycle. Default is off
Track prepared statements (transaction pooling). Default is off
Path to the PID file. If omitted, automatically set to unix_socket_dir/pgagroal.port.pid
The behavior for updating the operating system process title, mainly related to connection processes. Allowed settings are: never (or off), does not update the process title; strict to set the process title without overriding the existing initial process title length; minimal to set the process title to username/database; verbose (or full) to set the process title to user@host:port/database. Please note that strict and minimal are honored only on those systems that do not provide a native way to set the process title (e.g., Linux). On other systems, there is no difference between strict and minimal and the assumed behaviour is minimal even if strict is used. never and verbose are always honored, on every system. On Linux systems the process title is always trimmed to 255 characters, while on system that provide a natve way to set the process title it can be longer

Danger zone

Disconnect clients that have been idle for more than the specified seconds. This setting DOES NOT take long running transactions into account. Default is 0
Disconnect clients that have been active for more than the specified seconds. This setting DOES NOT take long running transactions into account. Default is off

The options for the PostgreSQL section are

The address of the PostgreSQL instance. Mandatory
The port of the PostgreSQL instance. Mandatory
Identify the instance as the primary instance (hint)
Enable Transport Layer Security (TLS) support (Experimental - no pooling). Default is off

REPORTING BUGS

pgagroal is maintained on GitHub at https://github.com/agroal/pgagroal

COPYRIGHT

pgagroal is licensed under the 3-clause BSD License.

SEE ALSO

pgagroal_hba.conf(5), pgagroal_databases.conf(5), pgagroal(1), pgagroal-cli(1), pgagroal-admin(1)