Skip to content

Instantly share code, notes, and snippets.

@jonathansick
Created May 15, 2014 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathansick/76e38bdda15685fc809c to your computer and use it in GitHub Desktop.
Save jonathansick/76e38bdda15685fc809c to your computer and use it in GitHub Desktop.
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