Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
postgresql.conf Postgres Config File Customizations
# It's convenient to put all postgresql.conf customizations in a included file.
# From bottom postgresql.conf, include as
# include = 'path/to/jsick_postgresql.conf'
# NOTE: you may need to customize some of these columns.
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
max_connections = 100 # (change requires restart)
# Logging
log_destination = 'csvlog'
log_directory = '/Volumes/Zaphod/pg_log'
logging_collector = on
log_rotation_age = 1d
log_rotation_size = 1GB
log_min_duration_statement = 250ms
log_checkpoints = on
log_connections = on
log_disconnections = on
log_lock_waits = on
log_temp_files = 0
log_timezone = 'Canada/Eastern'
# Memory
shared_buffers = 3GB # min 128kB (requires restart)
work_mem = 64MB
maintenance_work_mem = 1GB
effective_cache_size = 10GB
# Checkpoint settings
wal_buffers = 16MB
checkpoint_completion_target = 0.9
#checkpoint_timeout = 10m-30m # Depends on restart time
checkpoint_segments = 32 # To start.
# Locale and Formatting
datestyle = 'iso, dmy'
timezone = 'Canada/Eastern'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.