port = 5432
listen_addresses='*'
unix_socket_directories='/tmp,{$APP_PATH}'

max_connections=200
max_wal_size = 1GB
min_wal_size = 80MB
shared_buffers = 128MB
work_mem = 4MB
effective_cache_size = 4GB
temp_buffers = 8MB	
max_prepared_transactions = 0
max_stack_depth = 2MB
bgwriter_lru_maxpages = 100
max_worker_processes = 8
dynamic_shared_memory_type = posix


log_timezone = 'Asia/Shanghai'
datestyle = 'iso, ymd'
timezone = 'Asia/Shanghai'
default_text_search_config = 'pg_catalog.simple'


# 主配置
#archive_mode = on
#archive_command = 'test ! -f {$APP_PATH}/archivelog/%f && cp %p {$APP_PATH}/archivelog/%f'
#wal_level = replica
#max_wal_senders = 10
#wal_sender_timeout = 60s


# 从配置
#hot_standby = on
#primary_conninfo = 'host=192.168.0.100  port=5432  user=replica  password=123456'
#max_standby_streaming_delay = 30s
#wal_receiver_status_interval = 10s
#hot_standby_feedback = on
#recovery_target_timeline= 'latest'


logging_collector = on
log_destination = 'stderr'
log_directory = '{$APP_PATH}/logs'
log_filename = 'postgresql-%Y-%m-%d.log'
log_statement = all
log_rotation_age = 7d
log_rotation_size = 100MB
log_min_duration_statement = 5000
