forked from erp-dev/erp
39 lines
977 B
INI
39 lines
977 B
INI
[databases]
|
||
flower = host=postgres port=5432 dbname=flower user=postgres password=postgres
|
||
|
||
[pgbouncer]
|
||
; 监听地址和端口
|
||
listen_addr = 0.0.0.0
|
||
listen_port = 6432
|
||
|
||
; 认证方式:trust 表示信任所有连接(适用于容器内部网络)
|
||
; 这样客户端连接时不需要密码,但 PgBouncer 到 PostgreSQL 的连接仍需要密码
|
||
auth_type = trust
|
||
|
||
; 连接池配置
|
||
; pool_mode: session, transaction, statement
|
||
; transaction 模式最适合 Django,每个事务结束后释放连接
|
||
pool_mode = transaction
|
||
max_client_conn = 100
|
||
default_pool_size = 25
|
||
min_pool_size = 5
|
||
reserve_pool_size = 5
|
||
reserve_pool_timeout = 3
|
||
|
||
; 连接超时设置
|
||
server_connect_timeout = 15
|
||
server_idle_timeout = 600
|
||
query_timeout = 0
|
||
query_wait_timeout = 120
|
||
|
||
; 日志配置
|
||
log_connections = 1
|
||
log_disconnections = 1
|
||
log_pooler_errors = 1
|
||
|
||
; 其他设置
|
||
; 忽略 PostgreSQL 16 的额外启动参数
|
||
ignore_startup_parameters = extra_float_digits
|
||
application_name_add_host = 1
|
||
|