Advertisement
Guest User

Untitled

a guest
Jun 17th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.52 KB | None | 0 0
  1. # ----------------------------
  2. # pgPool-II configuration file
  3. # ----------------------------
  4. #
  5. # This file consists of lines of the form:
  6. #
  7. # name = value
  8. #
  9. # Whitespace may be used. Comments are introduced with "#" anywhere on a line.
  10. # The complete list of parameter names and allowed values can be found in the
  11. # pgPool-II documentation.
  12. #
  13. # This file is read on server startup and when the server receives a SIGHUP
  14. # signal. If you edit the file on a running system, you have to SIGHUP the
  15. # server for the changes to take effect, or use "pgpool reload". Some
  16. # parameters, which are marked below, require a server shutdown and restart to
  17. # take effect.
  18. #
  19.  
  20.  
  21. #------------------------------------------------------------------------------
  22. # CONNECTIONS
  23. #------------------------------------------------------------------------------
  24.  
  25. # - pgpool Connection Settings -
  26.  
  27. listen_addresses = '*'
  28. # Host name or IP address to listen on:
  29. # '*' for all, '' for no TCP/IP connections
  30. # (change requires restart)
  31. port = 5432
  32. # Port number
  33. # (change requires restart)
  34. socket_dir = '/tmp'
  35. # Unix domain socket path
  36. # The Debian package defaults to
  37. # /var/run/postgresql
  38. # (change requires restart)
  39.  
  40.  
  41. # - pgpool Communication Manager Connection Settings -
  42.  
  43. pcp_port = 9898
  44. # Port number for pcp
  45. # (change requires restart)
  46. pcp_socket_dir = '/tmp'
  47. # Unix domain socket path for pcp
  48. # The Debian package defaults to
  49. # /var/run/postgresql
  50. # (change requires restart)
  51.  
  52. # - Backend Connection Settings -
  53.  
  54. backend_hostname0 = 'node1'
  55. # Host name or IP address to connect to for backend 0
  56. backend_port0 = 5432
  57. # Port number for backend 0
  58. backend_weight0 = 1
  59. # Weight for backend 0 (only in load balancing mode)
  60. backend_data_directory0 = '/mnt/sdb1/pgsql/data'
  61. # Data directory for backend 0
  62. #backend_flag0 = 'ALLOW_TO_FAILOVER'
  63. # Controls various backend behavior
  64. # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
  65. backend_hostname1 = 'node2'
  66. backend_port1 = 5432
  67. backend_weight1 = 1
  68. backend_data_directory1 = '/mnt/sdb1/pgsql/data1'
  69. #backend_flag1 = 'ALLOW_TO_FAILOVER'
  70.  
  71. # - Authentication -
  72.  
  73. enable_pool_hba = off
  74. # Use pool_hba.conf for client authentication
  75. authentication_timeout = 60
  76. # Delay in seconds to complete client authentication
  77. # 0 means no timeout.
  78.  
  79. # - SSL Connections -
  80.  
  81. ssl = off
  82. # Enable SSL support
  83. # (change requires restart)
  84. #ssl_key = './server.key'
  85. # Path to the SSL private key file
  86. # (change requires restart)
  87. #ssl_cert = './server.cert'
  88. # Path to the SSL public certificate file
  89. # (change requires restart)
  90. #ssl_ca_cert = ''
  91. # Path to a single PEM format file
  92. # containing CA root certificate(s)
  93. # (change requires restart)
  94. #ssl_ca_cert_dir = ''
  95. # Directory containing CA root certificate(s)
  96. # (change requires restart)
  97.  
  98.  
  99. #------------------------------------------------------------------------------
  100. # POOLS
  101. #------------------------------------------------------------------------------
  102.  
  103. # - Pool size -
  104.  
  105. num_init_children = 32
  106. # Number of pools
  107. # (change requires restart)
  108. max_pool = 4
  109. # Number of connections per pool
  110. # (change requires restart)
  111.  
  112. # - Life time -
  113.  
  114. child_life_time = 300
  115. # Pool exits after being idle for this many seconds
  116. child_max_connections = 0
  117. # Pool exits after receiving that many connections
  118. # 0 means no exit
  119. connection_life_time = 0
  120. # Connection to backend closes after being idle for this many seconds
  121. # 0 means no close
  122. client_idle_limit = 0
  123. # Client is disconnected after being idle for that many seconds
  124. # (even inside an explicit transactions!)
  125. # 0 means no disconnection
  126.  
  127.  
  128. #------------------------------------------------------------------------------
  129. # LOGS
  130. #------------------------------------------------------------------------------
  131.  
  132. # - Where to log -
  133.  
  134. log_destination = 'syslog'
  135. # Where to log
  136. # Valid values are combinations of stderr,
  137. # and syslog. Default to stderr.
  138.  
  139. # - What to log -
  140.  
  141. print_timestamp = on
  142. # Print timestamp on each line
  143. # (change requires restart)
  144.  
  145. log_connections = off
  146. # Log connections
  147. log_hostname = off
  148. # Hostname will be shown in ps status
  149. # and in logs if connections are logged
  150. log_statement = off
  151. # Log all statements
  152. log_per_node_statement = off
  153. # Log all statements
  154. # with node and backend informations
  155. log_standby_delay = 'none'
  156. # Log standby delay
  157. # Valid values are combinations of always,
  158. # if_over_threshold, none
  159.  
  160. # - Syslog specific -
  161.  
  162. syslog_facility = 'LOCAL0'
  163. # Syslog local facility. Default to LOCAL0
  164. syslog_ident = 'pgpool'
  165. # Syslog program identification string
  166. # Default to 'pgpool'
  167.  
  168. # - Debug -
  169.  
  170. debug_level = 0
  171. # Debug message verbosity level
  172. # 0 means no message, 1 or more mean verbose
  173.  
  174.  
  175. #------------------------------------------------------------------------------
  176. # FILE LOCATIONS
  177. #------------------------------------------------------------------------------
  178.  
  179. pid_file_name = '/var/run/pgpool/pgpool.pid'
  180. # PID file name
  181. # (change requires restart)
  182. logdir = '/var/log'
  183. # Directory of pgPool status file
  184. # (change requires restart)
  185.  
  186.  
  187. #------------------------------------------------------------------------------
  188. # CONNECTION POOLING
  189. #------------------------------------------------------------------------------
  190.  
  191. connection_cache = on
  192. # Activate connection pools
  193. # (change requires restart)
  194.  
  195. # Semicolon separated list of queries
  196. # to be issued at the end of a session
  197. # The default is for 8.3 and later
  198. reset_query_list = 'ABORT; DISCARD ALL'
  199. # The following one is for 8.2 and before
  200. #reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
  201.  
  202.  
  203. #------------------------------------------------------------------------------
  204. # REPLICATION MODE
  205. #------------------------------------------------------------------------------
  206.  
  207. replication_mode = true
  208. # Activate replication mode
  209. # (change requires restart)
  210. replicate_select = off
  211. # Replicate SELECT statements
  212. # when in replication or parallel mode
  213. # replicate_select is higher priority than
  214. # load_balance_mode.
  215.  
  216. insert_lock = on
  217. # Automatically locks a dummy row or a table
  218. # with INSERT statements to keep SERIAL data
  219. # consistency
  220. # Without SERIAL, no lock will be issued
  221. lobj_lock_table = ''
  222. # When rewriting lo_creat command in
  223. # replication mode, specify table name to
  224. # lock
  225.  
  226. # - Degenerate handling -
  227.  
  228. replication_stop_on_mismatch = off
  229. # On disagreement with the packet kind
  230. # sent from backend, degenerate the node
  231. # which is most likely "minority"
  232. # If off, just force to exit this session
  233.  
  234. failover_if_affected_tuples_mismatch = off
  235. # On disagreement with the number of affected
  236. # tuples in UPDATE/DELETE queries, then
  237. # degenerate the node which is most likely
  238. # "minority".
  239. # If off, just abort the transaction to
  240. # keep the consistency
  241.  
  242.  
  243. #------------------------------------------------------------------------------
  244. # LOAD BALANCING MODE
  245. #------------------------------------------------------------------------------
  246.  
  247. load_balance_mode = on
  248. # Activate load balancing mode
  249. # (change requires restart)
  250. ignore_leading_white_space = on
  251. # Ignore leading white spaces of each query
  252. white_function_list = ''
  253. # Comma separated list of function names
  254. # that don't write to database
  255. # Regexp are accepted
  256. black_function_list = 'nextval,setval'
  257. # Comma separated list of function names
  258. # that write to database
  259. # Regexp are accepted
  260.  
  261.  
  262. #------------------------------------------------------------------------------
  263. # MASTER/SLAVE MODE
  264. #------------------------------------------------------------------------------
  265.  
  266. master_slave_mode = off
  267. # Activate master/slave mode
  268. # (change requires restart)
  269. master_slave_sub_mode = 'slony'
  270. # Master/slave sub mode
  271. # Valid values are combinations slony or
  272. # stream. Default is slony.
  273. # (change requires restart)
  274.  
  275. # - Streaming -
  276.  
  277. sr_check_period = 0
  278. # Streaming replication check period
  279. # Disabled (0) by default
  280. sr_check_user = 'nobody'
  281. # Streaming replication check user
  282. # This is necessary even if you disable
  283. # streaming replication delay check with
  284. # sr_check_period = 0
  285. sr_check_password = ''
  286. # Password for streaming replication check user
  287. delay_threshold = 0
  288. # Threshold before not dispatching query to standby node
  289. # Unit is in bytes
  290. # Disabled (0) by default
  291.  
  292. # - Special commands -
  293.  
  294. follow_master_command = ''
  295. # Executes this command after master failover
  296. # Special values:
  297. # %d = node id
  298. # %h = host name
  299. # %p = port number
  300. # %D = database cluster path
  301. # %m = new master node id
  302. # %H = hostname of the new master node
  303. # %M = old master node id
  304. # %P = old primary node id
  305. # %% = '%' character
  306.  
  307.  
  308. #------------------------------------------------------------------------------
  309. # PARALLEL MODE AND QUERY CACHE
  310. #------------------------------------------------------------------------------
  311.  
  312. parallel_mode = off
  313. # Activates parallel query mode
  314. # (change requires restart)
  315. enable_query_cache = off
  316. # Activates query cache
  317. # (change requires restart)
  318.  
  319. pgpool2_hostname = ''
  320. # Set pgpool2 hostname
  321. # (change requires restart)
  322.  
  323. # - System DB info -
  324.  
  325. system_db_hostname = 'localhost'
  326. # (change requires restart)
  327. system_db_port = 5432
  328. # (change requires restart)
  329. system_db_dbname = 'pgpool'
  330. # (change requires restart)
  331. system_db_schema = 'pgpool_catalog'
  332. # (change requires restart)
  333. system_db_user = 'pgpool'
  334. # (change requires restart)
  335. system_db_password = ''
  336. # (change requires restart)
  337.  
  338.  
  339. #------------------------------------------------------------------------------
  340. # HEALTH CHECK
  341. #------------------------------------------------------------------------------
  342.  
  343. health_check_period = 0
  344. # Health check period
  345. # Disabled (0) by default
  346. health_check_timeout = 20
  347. # Health check timeout
  348. # 0 means no timeout
  349. health_check_user = 'nobody'
  350. # Health check user
  351. health_check_password = ''
  352. # This parameter is not yet implemented.
  353. # Password for health check user
  354.  
  355.  
  356. #------------------------------------------------------------------------------
  357. # FAILOVER AND FAILBACK
  358. #------------------------------------------------------------------------------
  359.  
  360. failover_command = ''
  361. # Executes this command at failover
  362. # Special values:
  363. # %d = node id
  364. # %h = host name
  365. # %p = port number
  366. # %D = database cluster path
  367. # %m = new master node id
  368. # %H = hostname of the new master node
  369. # %M = old master node id
  370. # %P = old primary node id
  371. # %% = '%' character
  372. failback_command = ''
  373. # Executes this command at failback.
  374. # Special values:
  375. # %d = node id
  376. # %h = host name
  377. # %p = port number
  378. # %D = database cluster path
  379. # %m = new master node id
  380. # %H = hostname of the new master node
  381. # %M = old master node id
  382. # %P = old primary node id
  383. # %% = '%' character
  384.  
  385. fail_over_on_backend_error = on
  386. # Initiates failover when writing to the
  387. # backend communication socket fails
  388. # This is the same behaviour of pgpool-II
  389. # 2.2.x and previous releases
  390. # If set to off, pgpool will report an
  391. # error and disconnect the session.
  392.  
  393.  
  394. #------------------------------------------------------------------------------
  395. # ONLINE RECOVERY
  396. #------------------------------------------------------------------------------
  397.  
  398. recovery_user = 'nobody'
  399. # Online recovery user
  400. recovery_password = ''
  401. # Online recovery password
  402. recovery_1st_stage_command = ''
  403. # Executes a command in first stage
  404. recovery_2nd_stage_command = ''
  405. # Executes a command in second stage
  406. recovery_timeout = 90
  407. # Timeout in seconds to wait for the
  408. # recovering node's postmaster to start up
  409. # 0 means no wait
  410. client_idle_limit_in_recovery = 0
  411. # Client is disconnected after being idle
  412. # for that many seconds in the second stage
  413. # of online recovery
  414. # 0 means no disconnection
  415. # -1 means immediate disconnection
  416.  
  417.  
  418. #------------------------------------------------------------------------------
  419. # OTHERS
  420. #------------------------------------------------------------------------------
  421.  
  422. relcache_expire = 0
  423. # Life time of relation cache in seconds.
  424. # 0 means no cache expiration(the default).
  425. # The relation cache is used for cache the
  426. # query result against PostgreSQL system
  427. # catalog to obtain various information
  428. # including table structures or if it's a
  429. # temporary table or not. The cache is
  430. # maintained in a pgpool child local memory
  431. # and being kept as long as it survives.
  432. # If someone modify the table by using
  433. # ALTER TABLE or some such, the relcache is
  434. # not consistent anymore.
  435. # For this purpose, cache_expiration
  436. # controls the life time of the cache.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement