博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PG config9.4
阅读量:6248 次
发布时间:2019-06-22

本文共 1741 字,大约阅读时间需要 5 分钟。

FILE LOCATIONS

data_directory ='/pghs/pg${port}/data'

hba_file ='/pghs/pg${port}/data/pg_hba.conf'

- CONNECTIONS AND AUTHENTICATION -

port =${port}

listen_addresses ='0.0.0.0'
max_connections = 500
superuser_reserved_connections = 10
unix_socket_directories = '/tmp'
unix_socket_permissions = 0700

- Security and Authentication

authentication_timeout = 1min

ssl = off

- TCP Keepalives -

tcp_keepalives_idle = 60

tcp_keepalives_interval = 10
tcp_keepalives_count = 10

- Memory -

shared_buffers = 2048MB

temp_buffers = 8MB
work_mem = 8MB
maintenance_work_mem = 256MB
max_stack_depth = 8192kB

- Kernel Resource Usage -

shared_preload_libraries = 'repmgr_funcs,pg_stat_statements,auto_explain'

- Background Writer -

bgwriter_delay = 200ms

WRITE AHEAD log

wal_level = hot_standby

fsync = on
synchronous_commit = local
wal_buffers = 16MB

- Checkpoints -

checkpoint_segments = 32

- Archiving -

archive_mode = on

archive_command = 'test ! -f /pghs/pgbackup/pgbk${port}/archlog/%f && cp %p /pghs/pgbackup/pgbk${port}/archlog/%f'

REPLICATION

max_wal_senders = 5

wal_keep_segments = 128
hot_standby = on

ERROR REPORTING AND LOGGING

log_destination = 'stderr,csvlog'

logging_collector = on
log_directory = '/pghs/pg${port}/data/pg_log'
log_filename='postgresql-%d.log'
log_truncate_on_rotation = on
log_line_prefix='%t:%r:%u@%d:[%p]: '
log_statement = 'ddl'
log_checkpoints = on
log_connections = on
log_min_duration_statement = 60000
log_lock_waits = on

Locale and Formatting

datestyle = 'iso, mdy'

timezone = 'PRC'
log_timezone = 'Asia/Hong_Kong'

- pg_stat_statements auto_explain -

pg_stat_statements.max = 10000

pg_stat_statements.track = all
pg_stat_statements.track_utility = true
pg_stat_statements.save = true
auto_explain.log_min_duration = 60s

转载地址:http://htlia.baihongyu.com/

你可能感兴趣的文章
怎么查看80端口占用情况- 如何查看端口占用情况?
查看>>
搭建测试框架
查看>>
position:absolute在IE8浏览器下无法显示正确位置
查看>>
过滤器与拦截器区别
查看>>
C# 使用 Windows API 发送文件到打印机
查看>>
NOIP2013 D1T3 货车运输 倍增LCA OR 并查集按秩合并
查看>>
80端口被NT kernel & System 占用pid 4
查看>>
mat工具MemoryAnalyzer进行分析java内存溢出hprof文件
查看>>
完整性约束
查看>>
Django之restframework
查看>>
P3924 康娜的线段树
查看>>
Vue的安装和语法
查看>>
验证表单必须为数字并且只保留小数点后2位
查看>>
2-sat基础题 uvalive 3211
查看>>
Elasticsearch5.2.0部署过程的坑
查看>>
go build 不同系统下的可执行文件
查看>>
浏览器版本信息判断整理
查看>>
【我的Android进阶之旅】解决Android Studio 运行gradle命令时报错: 错误: 编码GBK的不可映射字符...
查看>>
windows 下解决 Time_Wait 和 CLOSE_WAIT 方法
查看>>
SOUI Editor使用教程
查看>>