Advertisement
Guest User

Untitled

a guest
Dec 4th, 2012
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. #
  2. # CCP Postgres Configuration
  3. #
  4. # See http://www.postgresql.org/docs/8.4/interactive/runtime-config.html for more info
  5.  
  6. listen_addresses = '*'
  7. port = 5432
  8.  
  9. #
  10. # Connections:
  11. #
  12. # Reserve 2 connections for superusers so that in times of fail we can still log in # to find out what's going on
  13. #
  14. max_connections = 100
  15. superuser_reserved_connections = 2
  16. unix_socket_directory = '/tmp'
  17.  
  18. #
  19. # Memory:
  20. #
  21. # 25%-ish of system memory is recommended
  22. #
  23. shared_buffers = 1024MB
  24.  
  25. #
  26. # Amount to use for a single sort/hash operation before switching to temporary files.
  27. # Consider multiple connections and multiple ops per query can make the total work_mem very large.
  28. # default is 1MB
  29. #
  30. work_mem = 1MB
  31.  
  32. #
  33. # Place to temporary tables, indexes and files. This can be a list.
  34. #
  35. temp_tablespaces = ''
  36.  
  37. #
  38. # Amount to use for a maintenance operation # e.g. VACUUM, CREATE INDEX, ALTER TABLE ADD FORIEGN KEY.
  39. # Default is 16MB
  40. #
  41. maintenance_work_mem = 16MB
  42.  
  43. #
  44. # The majority of server processes will touch plpython, so load that automatically
  45. #
  46. shared_preload_libraries = '$libdir/plpython,$libdir/plugins/plugin_debugger.so'
  47.  
  48. #
  49. # Vacuum process management:
  50. #
  51. # These setting will become more important as we use the database more and more
  52. # over its maintenance periods.
  53. # Setting vacuum_cost_delay to non-zero turns these features on, although this
  54. # should only need to be 10-20ms
  55. #
  56. vacuum_cost_delay = 20ms
  57.  
  58. #
  59. # Background Writer:
  60. #
  61. # Our usage pattern is quite spiky at the moment, so bgwriter_lru_multiplier is set
  62. # to greater than the default of 2.0. As our usage becomes more uniform this can be reduced.
  63. #
  64. bgwriter_lru_multiplier = 2.0
  65.  
  66. #
  67. # Asynchronous IO
  68. #
  69. # Number of concurrent disc IO ops. Good starting point is the size of the RAID array (without parity)
  70. #
  71. effective_io_concurrency = 1
  72.  
  73. #
  74. # Write Ahead Log
  75. #
  76. fsync = True
  77. synchronous_commit = True
  78.  
  79. #
  80. # Checkpoints:
  81. #
  82. # Increasing these numbers increases the time needed to recover from a crash,
  83. # but since that is assumed to be a fairly infrequent occurrence we can
  84. # squeeze out some more performance
  85. #
  86. checkpoint_segments = 16
  87. checkpoint_timeout = 30min
  88. checkpoint_completion_target = 0.9
  89. checkpoint_warning = 30s
  90.  
  91. #
  92. # Archiving:
  93. #
  94. # The mode only takes effect at server start archive_mode = False
  95. #
  96. # command example: 'cp "%p" /mnt/server/archivedir/"%f"'
  97. # %p is replaced by path name of file to archive, %f is the filename only, %% is a %
  98. # command can be changed at any time. Must return zero exit status on success.
  99. archive_command = ''
  100. #
  101. # max age for WAL segments before archiving is forced. The size of the WAL file does
  102. # not change if a segment is archived early. Zero disables.
  103. archive_timeout = 0
  104.  
  105. #
  106. # Query Planner Cost Constants:
  107. #
  108. # For DBs that are mostly memory-cached, seq and random page costs should be brought closer
  109. # together than the default 1.0/4.0 and be reduced relative to the cpu_* parameters
  110. #
  111. seq_page_cost = 1.0
  112. random_page_cost = 2.0
  113. cpu_tuple_cost = 0.01
  114. cpu_index_tuple_cost = 0.005
  115. cpu_operator_cost = 0.0025
  116. effective_cache_size = 6GB
  117. from_collapse_limit = 15
  118. join_collapse_limit = 15
  119. geqo_threshold = 15
  120.  
  121. #
  122. # Logging:
  123. #
  124. log_destination = 'csvlog,stderr'
  125. logging_collector = on
  126. log_directory = '/home/procuser/log/postgres'
  127. log_filename = 'postgresql-%Y%m%d.log'
  128. log_truncate_on_rotation = True
  129. log_rotation_age = 1440min
  130. log_rotation_size = 0
  131.  
  132. client_min_messages = 'log'
  133. log_min_messages = 'warning'
  134. log_min_error_statement = 'error'
  135. log_min_duration_statement = 15s
  136.  
  137. log_checkpoints = True
  138. log_connections = True
  139. log_hostname = True
  140. log_disconnections = True
  141. log_lock_waits = True
  142. log_statement = 'ddl'
  143. log_line_prefix = '%t:%r:%u@%d:[%p]: '
  144. log_temp_files = 10MB
  145.  
  146. #
  147. # Statistics:
  148. #
  149. track_activities = True
  150. track_counts = True
  151. track_functions = 'all'
  152. default_statistics_target = 1000
  153.  
  154. #
  155. # Autovacuum
  156. #
  157. # *_scale_factor numbers are quite aggressive because we're more likely to query more recent data
  158. #
  159. autovacuum = True
  160. log_autovacuum_min_duration = 1s
  161. autovacuum_max_workers = 3
  162. autovacuum_naptime = 5min
  163. autovacuum_vacuum_threshold = 50
  164. autovacuum_vacuum_scale_factor = 0.01
  165. autovacuum_analyze_threshold = 0
  166. autovacuum_analyze_scale_factor = 0.01
  167.  
  168. #
  169. # Client Connections:
  170. #
  171. default_transaction_isolation = 'read committed'
  172.  
  173. #
  174. # Locale:
  175. #
  176. lc_messages = 'en_US.UTF-8'
  177. lc_monetary = 'en_US.UTF-8'
  178. lc_numeric = 'en_US.UTF-8'
  179. lc_time = 'en_US.UTF-8'
  180.  
  181. #
  182. # Lock Management:
  183. #
  184. deadlock_timeout = 10s
  185.  
  186.  
  187. #
  188. # Streaming Replication setup
  189. #
  190. wal_level = hot_standby
  191. max_wal_senders = 5
  192. wal_keep_segments = 32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement