mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 05:25:14 +08:00
42 lines
766 B
Plaintext
42 lines
766 B
Plaintext
# PostgreSQL 自定义配置
|
|
# 支持远程连接和性能优化
|
|
|
|
# 监听所有网络接口
|
|
listen_addresses = '*'
|
|
|
|
# 最大连接数
|
|
max_connections = 100
|
|
|
|
# 共享内存缓冲区
|
|
shared_buffers = 256MB
|
|
|
|
# 工作内存
|
|
work_mem = 16MB
|
|
|
|
# 维护工作内存
|
|
maintenance_work_mem = 64MB
|
|
|
|
# 有效缓存大小
|
|
effective_cache_size = 1GB
|
|
|
|
# 日志设置
|
|
logging_collector = on
|
|
log_directory = 'pg_log'
|
|
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
|
|
log_statement = 'all'
|
|
log_duration = on
|
|
log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '
|
|
|
|
# 慢查询日志
|
|
log_min_duration_statement = 1000 # 记录超过 1 秒的查询
|
|
|
|
# 连接日志
|
|
log_connections = on
|
|
log_disconnections = on
|
|
|
|
# 时区
|
|
timezone = 'UTC'
|
|
|
|
# 字符集
|
|
client_encoding = 'UTF8'
|