pgagroal.conf(5)
β¨ NAME β¨
pgagroal.conf β the main configuration file for pgagroal π
(Also, hi, you're reading the pgagroal.conf(5) page from the File Formats Manual section, and yes it's giving main character energy.)
π DESCRIPTION π
pgagroal.conf is, like, the main configuration file for pgagroal. Everything starts here. π«Ά
The file is split into different sections, and those sections are marked with [ and ] characters. The main one β the star of the show β is called [pgagroal].
The other sections are all about the PostgreSQL server configuration. So like, one section for the vibe of pgagroal itself, and other sections for the servers it's talking to.
Every property goes in the format:
key = value
And for comments? The characters # and ; both work β but they must be the first character on the line. No sneaking a comment in mid-line, bestie. π
The Bool data type supports these values: on, 1, true, off, 0 and false.
π OPTIONS π
The options for the main section πΈ
hostβ The bind address for pgagroal. Mandatory β no skipping this one.portβ The bind port for pgagroal. Mandatory too, obviously.unix_socket_dirβ The Unix Domain Socket location. Yep, Mandatory as well.metricsβ The metrics port. Default is0(disabled).metrics_cache_max_ageβ How long to keep a Prometheus (metrics) response in cache. If you give this value with no units, it's read as seconds. Suffix support looks like this:'S'for seconds (the default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is0(disabled).metrics_cache_max_sizeβ The maximum amount of data kept in cache when serving Prometheus responses. Changes here require restart. This parameter sets the size of the memory allocated for the cache even ifmetrics_cache_max_ageormetricsare disabled β but its value is only actually taken into account ifmetrics_cache_max_ageis set to a non-zero value. Suffixes:B(bytes), which is the default if omitted,KorKB(kilobytes),MorMB(megabytes),GorGB(gigabytes). Default is256k.managementβ The remote management port. Default is0(disabled).log_typeβ The logging type (console,file,syslog). Default isconsole.log_levelβ The logging level. Any of these case-insensitive strings:FATAL,ERROR,WARN,INFOandDEBUG(and DEBUG can get more specific asDEBUG1thruDEBUG5). A debug level greater than 5 gets set toDEBUG5. Values that aren't recognized will make thelog_levelbeINFO. Default isinfo.log_pathβ The log file location. Default ispgagroal.log. Can be astrftime(3)compatible string.log_rotation_ageβ The amount of time after which log file rotation is triggered. No units given? It's seconds. Supported unit suffixes:'S'for seconds (default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is0(disabled).log_rotation_sizeβ The size of the log file that will trigger a log rotation. Suffixes:B(bytes), the default if omitted,KorKB(kilobytes),MorMB(megabytes),GorGB(gigabytes). A value of0(with or without a suffix) disables it. Default is0.log_line_prefixβ Astrftime(3)compatible string used as the prefix for every log line. Must be quoted if it contains spaces. Default is%Y-%m-%d %H:%M:%S.log_modeβ Append to or create the log file (append,create). Default isappend.log_connectionsβ Log connects. Default isoff.log_disconnectionsβ Log disconnects. Default isoff.blocking_timeoutβ The amount of time the process will be blocking for a connection. No units? Seconds. Suffixes:'S'for seconds (default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. (disable =0) Default is30.idle_timeoutβ The amount of time a connection is kept alive. No units? Seconds. Suffixes:'S'for seconds (default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is0(disabled).rotate_frontend_password_timeoutβ The amount of time after which the passwords of frontend users are updated periodically. No units? Seconds. Suffixes:'S'for seconds (default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is0(disabled).rotate_frontend_password_lengthβ The length of randomized frontend passwords. Default is8.max_connection_ageβ The maximum amount of time that a connection will live. No units? Seconds. Suffixes:'S'for seconds (default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is0(disabled).validationβ Should connection validation be performed. Valid options:off,foregroundandbackground. Default isoff.background_intervalβ The interval between background validation scans. No units? Seconds. Suffixes:'S'for seconds (default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is300.max_retriesβ The maximum number of iterations to obtain a connection. Default is5.max_connectionsβ The maximum number of connections (max10000). Default is100.allow_unknown_usersβ Allow unknown users to connect. Default istrue.authentication_timeoutβ The amount of time the process will wait for valid credentials. No units? Seconds. Suffixes:'S'for seconds (default),'M'for minutes,'H'for hours,'D'for days, and'W'for weeks. Default is5.pipelineβ The pipeline type. Valid options areauto,performance,sessionandtransaction. Default isauto.auth_queryβ Enable authentication query. Default isfalse.failoverβ Enable failover support. Default isfalse.failover_scriptβ The failover script.tlsβ Enable Transport Layer Security (TLS). Default isfalse. Changes require restart in the server section.tls_cert_fileβ Certificate file for TLS. Changes require restart in the server section.tls_key_fileβ Private key file for TLS. Changes require restart in the server section.tls_ca_fileβ Certificate Authority (CA) file for TLS. Changes require restart in the server section.metrics_cert_fileβ Certificate file for TLS for Prometheus metrics.metrics_key_fileβ Private key file for TLS for Prometheus metrics.metrics_ca_fileβ Certificate Authority (CA) file for TLS for Prometheus metrics.ev_backendβ The event handling backend to use. Valid options areauto,io_uring,epoll, andkqueue. Default isauto.keep_aliveβ HaveSO_KEEPALIVEon sockets. Default ison.nodelayβ HaveTCP_NODELAYon sockets. Default ison.backlogβ The backlog forlisten(). Minimum16. Default ismax_connections/4.hugepageβ Huge page support. Default istry.trackerβ Track connection lifecycle. Default isoff.track_prepared_statementsβ Track prepared statements (transaction pooling). Default isoff.pidfileβ Path to the PID file. If it's omitted, it's automatically set tounix_socket_dir/pgagroal.port.pid.update_process_titleβ The behavior for updating the operating system process title, mainly related to connection processes. The allowed settings are:never(oroff): does not update the process title;strict: set the process title without overriding the existing initial process title length;minimal: set the process title tousername/database;verbose(orfull): set the process title touser@host:port/database.
Heads up: strict and minimal are honored only on systems that don't provide a native way to set the process title (like Linux). On other systems there's 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 systems that provide a native way to set the process title it can be longer.
Danger zone β οΈπ
Yes, it's literally called the Danger zone. Read these twice, bestie.
disconnect_clientβ Disconnect clients that have been idle for more than the specified seconds. This setting DOES NOT take long running transactions into account. Default is0.disconnect_client_forceβ Disconnect clients that have been active for more than the specified seconds. This setting DOES NOT take long running transactions into account. Default isoff.
The options for the PostgreSQL section π
hostβ The address of the PostgreSQL instance. Mandatory.portβ The port of the PostgreSQL instance. Mandatory.primaryβ Identify the instance as the primary instance (hint).tlsβ Enable Transport Layer Security (TLS) support (Experimental - no pooling). Default isoff.
π REPORTING BUGS π
pgagroal is maintained on GitHub at <https://github.com/pgagroal/pgagroal> β that's the place to go if something's acting up. π«Ά
π COPYRIGHT π
pgagroal is licensed under the 3-clause BSD License.
π SEE ALSO π
pgagroal_hba.conf(5), pgagroal_databases.conf(5), pgagroal_vault.conf(5), pgagroal(1), pgagroal-cli(1), pgagroal-admin(1), pgagroal-vault(1)
Okay that's the whole page, you absolutely ate that π
β¨ And if you ever forget which manual you're in β it's pgagroal.conf(5), from the File Formats Manual section. No cap. ππ¦
π¦ where this page comes from
- ubuntu stonking: pgagroal 2.1.0-1ubuntu1 Β· BSD-pgagroal
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms