65 lines
1.5 KiB
Plaintext
65 lines
1.5 KiB
Plaintext
# PostgreSQL Staging Configuration File
|
|
|
|
# CONNECTIONS AND AUTHENTICATION
|
|
listen_addresses = '*'
|
|
max_connections = 100
|
|
password_encryption = scram-sha-256
|
|
ssl = on
|
|
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
|
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
|
|
|
|
# RESOURCE USAGE
|
|
shared_buffers = 256MB
|
|
work_mem = 6MB
|
|
maintenance_work_mem = 64MB
|
|
effective_cache_size = 2GB
|
|
max_worker_processes = 6
|
|
max_parallel_workers_per_gather = 2
|
|
max_parallel_workers = 6
|
|
|
|
# WRITE-AHEAD LOG
|
|
wal_level = replica
|
|
max_wal_size = 1GB
|
|
min_wal_size = 80MB
|
|
checkpoint_timeout = 5min
|
|
checkpoint_completion_target = 0.9
|
|
|
|
# QUERY TUNING
|
|
random_page_cost = 4.0
|
|
effective_io_concurrency = 2
|
|
default_statistics_target = 100
|
|
|
|
# LOGGING
|
|
log_destination = 'stderr'
|
|
logging_collector = on
|
|
log_directory = 'pg_log'
|
|
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
|
|
log_truncate_on_rotation = off
|
|
log_rotation_age = 1d
|
|
log_rotation_size = 10MB
|
|
log_min_duration_statement = 500
|
|
log_checkpoints = on
|
|
log_connections = on
|
|
log_disconnections = on
|
|
log_duration = off
|
|
log_error_verbosity = default
|
|
log_line_prefix = '%m [%p] %q%u@%d '
|
|
log_statement = 'mod'
|
|
|
|
# AUTOVACUUM
|
|
autovacuum = on
|
|
log_autovacuum_min_duration = 500
|
|
autovacuum_max_workers = 3
|
|
autovacuum_naptime = 1min
|
|
autovacuum_vacuum_threshold = 50
|
|
autovacuum_analyze_threshold = 50
|
|
|
|
# CLIENT CONNECTION DEFAULTS
|
|
datestyle = 'iso, mdy'
|
|
timezone = 'UTC'
|
|
lc_messages = 'en_US.UTF-8'
|
|
lc_monetary = 'en_US.UTF-8'
|
|
lc_numeric = 'en_US.UTF-8'
|
|
lc_time = 'en_US.UTF-8'
|
|
default_text_search_config = 'pg_catalog.english'
|