PostgreSQL recommended configurations /* • This file contains only parameters which are recommended for modification in postgresql.conf file. • Parameters prefixed with ‘#’ shows default value for parameter. In next line recommended value is shown. • These recommendations are only valid for PostgreSQL version 8.3.3 for RHEL 5.x or CentOS 5.x (All 64 bit). • It is also assumed that database server is having at minimum 16 GB of Memory. • It is assumed that postgres data directory is initialized with ‘initdb’ utility with default arguments only. */ # ----------------------------- # PostgreSQL configuration file # ----------------------------- #listen_addresses = 'localhost' # what IP address(es) to listen on listen_addresses = '*' #max_connections = 100 max_connections = 2000 #unix_socket_permissions = 0777 # begin with 0 to use octal notation unix_socket_permissions = 0770 #ssl = off ssl = on #shared_buffers = 32MB # min 128kB or max_connections*16kB shared_buffers = 640MB #temp_buffers = 8MB # min 800kB temp_buffers = 16MB #max_prepared_transactions = 5 # can be 0 or more max_prepared_transactions = 10 #work_mem = 1MB # min 64kB work_mem = 32MB #maintenance_work_mem = 16MB # min 1MB maintenance_work_mem = 512MB #vacuum_cost_delay = 0 # 0-1000 milliseconds vacuum_cost_delay = 200 #vacuum_cost_limit = 200 # 1-10000 credits vacuum_cost_limit = 50 #wal_buffers = 64kB # min 32kB wal_buffers = 512kB #commit_delay = 0 # range 0-100000, in microseconds commit_delay = 1000 #commit_siblings = 5 # range 1-1000 commit_siblings = 20 # - Checkpoints - #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each #checkpoint_segments = 16 #checkpoint_timeout = 5min # range 30s-1h #checkpoint_timeout = 10min #------------------------------------------------------------------------------ # QUERY TUNING #------------------------------------------------------------------------------ #random_page_cost = 1.0 random_page_cost = 2.0 #effective_cache_size = 128MB effective_cache_size = 512MB #------------------------------------------------------------------------------ # ERROR REPORTING AND LOGGING #------------------------------------------------------------------------------ #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, log_filename = 'postgresql-%a.log' log_rotation_age = 1440min #log_rotation_age = 60min log_connections = off #log_connections = on log_disconnections = off #log_disconnections = on #log_line_prefix = '<%t>' log_line_prefix = '<%d %u %m %i %c >' #log_statement = 'none' # none, ddl, mod, all log_statement = 'ddl' # - Statistics Monitoring - log_parser_stats = off #log_parser_stats = on log_planner_stats = off #log_planner_stats = on log_executor_stats = off #log_executor_stats = on #autovacuum_naptime = 1min # time between autovacuum runs autovacuum_naptime = 2min #------------------------------------------------------------------------------ # CLIENT CONNECTION DEFAULTS #------------------------------------------------------------------------------ #client_encoding = sql_ascii # actually, defaults to database encoding client_encoding = utf8 #------------------------------------------------------------------------------ # LOCK MANAGEMENT #------------------------------------------------------------------------------ #max_locks_per_transaction = 64 # min 10 max_locks_per_transaction = 256