PG config9.4

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

上一篇:kill rebuilt index


下一篇:Oracle 11gR2 GI基本安装手册