pgpool.conf 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  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. # CONNECTIONS
  21. #------------------------------------------------------------------------------
  22. # - pgpool Connection Settings -
  23. listen_addresses = '*'
  24. # Host name or IP address to listen on:
  25. # '*' for all, '' for no TCP/IP connections # (change requires restart)
  26. port = 9999
  27. # Port number
  28. # (change requires restart)
  29. socket_dir = '/tmp'
  30. # Unix domain socket path
  31. # The Debian package defaults to
  32. # /var/run/postgresql
  33. # (change requires restart)
  34. listen_backlog_multiplier = 2
  35. # Set the backlog parameter of listen(2) to
  36. # num_init_children * listen_backlog_multiplier.
  37. # (change requires restart)
  38. serialize_accept = off
  39. # whether to serialize accept() call to avoid thundering herd problem
  40. # (change requires restart)
  41. # - pgpool Communication Manager Connection Settings -
  42. pcp_listen_addresses = '*'
  43. # Host name or IP address for pcp process to listen on:
  44. # '*' for all, '' for no TCP/IP connections
  45. # (change requires restart)
  46. pcp_port = 9898
  47. # Port number for pcp
  48. # (change requires restart)
  49. pcp_socket_dir = '/tmp'
  50. # Unix domain socket path for pcp
  51. # The Debian package defaults to
  52. # /var/run/postgresql
  53. # (change requires restart)
  54. # - Backend Connection Settings -
  55. backend_hostname0 = 'pg_1'
  56. # Host name or IP address to connect to for backend 0
  57. backend_port0 = 5432
  58. # Port number for backend 0
  59. backend_weight0 = 1
  60. # Weight for backend 0 (only in load balancing mode)
  61. backend_data_directory0 = '/var/lib/postgresql/data'
  62. # Data directory for backend 0
  63. backend_flag0 = 'ALLOW_TO_FAILOVER'
  64. # Controls various backend behavior
  65. # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
  66. backend_hostname1 = 'pg_2'
  67. backend_port1 = 5432
  68. backend_weight1 = 1
  69. backend_data_directory1 = '/var/lib/postgresql/data'
  70. backend_flag1 = 'ALLOW_TO_FAILOVER'
  71. # - Authentication -
  72. enable_pool_hba = off
  73. # Use pool_hba.conf for client authentication
  74. pool_passwd = 'pool_passwd'
  75. # File name of pool_passwd for md5 authentication.
  76. # "" disables pool_passwd.
  77. # (change requires restart)
  78. authentication_timeout = 60
  79. # Delay in seconds to complete client authentication
  80. # 0 means no timeout.
  81. # - SSL Connections -
  82. ssl = off
  83. # Enable SSL support
  84. # (change requires restart)
  85. #ssl_key = './server.key'
  86. # Path to the SSL private key file
  87. # (change requires restart)
  88. #ssl_cert = './server.cert'
  89. # Path to the SSL public certificate file
  90. # (change requires restart)
  91. #ssl_ca_cert = ''
  92. # Path to a single PEM format file
  93. # containing CA root certificate(s)
  94. # (change requires restart)
  95. #ssl_ca_cert_dir = ''
  96. # Directory containing CA root certificate(s)
  97. # (change requires restart)
  98. #------------------------------------------------------------------------------
  99. # POOLS
  100. #------------------------------------------------------------------------------
  101. # - Concurrent session and pool size -
  102. num_init_children = 32
  103. # Number of concurrent sessions allowed
  104. # (change requires restart)
  105. max_pool = 4
  106. # Number of connection pool caches per connection
  107. # (change requires restart)
  108. # - Life time -
  109. child_life_time = 300
  110. # Pool exits after being idle for this many seconds
  111. child_max_connections = 0
  112. # Pool exits after receiving that many connections
  113. # 0 means no exit
  114. connection_life_time = 0
  115. # Connection to backend closes after being idle for this many seconds
  116. # 0 means no close
  117. client_idle_limit = 0
  118. # Client is disconnected after being idle for that many seconds
  119. # (even inside an explicit transactions!)
  120. # 0 means no disconnection
  121. #------------------------------------------------------------------------------
  122. # LOGS
  123. #------------------------------------------------------------------------------
  124. # - Where to log -
  125. log_destination = 'stderr'
  126. # Where to log
  127. # Valid values are combinations of stderr,
  128. # and syslog. Default to stderr.
  129. # - What to log -
  130. log_line_prefix = '%t: pid %p: ' # printf-style string to output at beginning of each log line.
  131. log_connections = off
  132. # Log connections
  133. log_hostname = off
  134. # Hostname will be shown in ps status
  135. # and in logs if connections are logged
  136. log_statement = off
  137. # Log all statements
  138. log_per_node_statement = off
  139. # Log all statements
  140. # with node and backend informations
  141. log_standby_delay = 'none'
  142. # Log standby delay
  143. # Valid values are combinations of always,
  144. # if_over_threshold, none
  145. # - Syslog specific -
  146. syslog_facility = 'LOCAL0'
  147. # Syslog local facility. Default to LOCAL0
  148. syslog_ident = 'pgpool'
  149. # Syslog program identification string
  150. # Default to 'pgpool'
  151. # - Debug -
  152. #log_error_verbosity = default # terse, default, or verbose messages
  153. #client_min_messages = notice # values in order of decreasing detail:
  154. # debug5
  155. # debug4
  156. # debug3
  157. # debug2
  158. # debug1
  159. # log
  160. # notice
  161. # warning
  162. # error
  163. #log_min_messages = warning # values in order of decreasing detail:
  164. # debug5
  165. # debug4
  166. # debug3
  167. # debug2
  168. # debug1
  169. # info
  170. # notice
  171. # warning
  172. # error
  173. # log
  174. # fatal
  175. # panic
  176. #------------------------------------------------------------------------------
  177. # FILE LOCATIONS
  178. #------------------------------------------------------------------------------
  179. pid_file_name = '/var/run/pgpool/pgpool.pid'
  180. # PID file name
  181. # Can be specified as relative to the"
  182. # location of pgpool.conf file or
  183. # as an absolute path
  184. # (change requires restart)
  185. logdir = '/tmp'
  186. # Directory of pgPool status file
  187. # (change requires restart)
  188. #------------------------------------------------------------------------------
  189. # CONNECTION POOLING
  190. #------------------------------------------------------------------------------
  191. connection_cache = on
  192. # Activate connection pools
  193. # (change requires restart)
  194. # Semicolon separated list of queries
  195. # to be issued at the end of a session
  196. # The default is for 8.3 and later
  197. reset_query_list = 'ABORT; DISCARD ALL'
  198. # The following one is for 8.2 and before
  199. #reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
  200. #------------------------------------------------------------------------------
  201. # REPLICATION MODE
  202. #------------------------------------------------------------------------------
  203. replication_mode = off
  204. # Activate replication mode
  205. # (change requires restart)
  206. replicate_select = off
  207. # Replicate SELECT statements
  208. # when in replication mode
  209. # replicate_select is higher priority than
  210. # load_balance_mode.
  211. insert_lock = on
  212. # Automatically locks a dummy row or a table
  213. # with INSERT statements to keep SERIAL data
  214. # consistency
  215. # Without SERIAL, no lock will be issued
  216. lobj_lock_table = ''
  217. # When rewriting lo_creat command in
  218. # replication mode, specify table name to
  219. # lock
  220. # - Degenerate handling -
  221. replication_stop_on_mismatch = off
  222. # On disagreement with the packet kind
  223. # sent from backend, degenerate the node
  224. # which is most likely "minority"
  225. # If off, just force to exit this session
  226. failover_if_affected_tuples_mismatch = off
  227. # On disagreement with the number of affected
  228. # tuples in UPDATE/DELETE queries, then
  229. # degenerate the node which is most likely
  230. # "minority".
  231. # If off, just abort the transaction to
  232. # keep the consistency
  233. #------------------------------------------------------------------------------
  234. # LOAD BALANCING MODE
  235. #------------------------------------------------------------------------------
  236. load_balance_mode = on
  237. # Activate load balancing mode
  238. # (change requires restart)
  239. ignore_leading_white_space = on
  240. # Ignore leading white spaces of each query
  241. white_function_list = ''
  242. # Comma separated list of function names
  243. # that don't write to database
  244. # Regexp are accepted
  245. black_function_list = 'nextval,setval'
  246. # Comma separated list of function names
  247. # that write to database
  248. # Regexp are accepted
  249. database_redirect_preference_list = ''
  250. # comma separated list of pairs of database and node id.
  251. # example: postgres:primary,mydb[0-4]:1,mydb[5-9]:2'
  252. # valid for streaming replicaton mode only.
  253. app_name_redirect_preference_list = ''
  254. # comma separated list of pairs of app name and node id.
  255. # example: 'psql:primary,myapp[0-4]:1,myapp[5-9]:standby'
  256. # valid for streaming replicaton mode only.
  257. allow_sql_comments = off
  258. # if on, ignore SQL comments when judging if load balance or
  259. # query cache is possible.
  260. # If off, SQL comments effectively prevent the judgment
  261. # (pre 3.4 behavior).
  262. #------------------------------------------------------------------------------
  263. # MASTER/SLAVE MODE
  264. #------------------------------------------------------------------------------
  265. master_slave_mode = on
  266. # Activate master/slave mode
  267. # (change requires restart)
  268. master_slave_sub_mode = 'stream'
  269. # Master/slave sub mode
  270. # Valid values are combinations stream, slony
  271. # or logical. Default is stream.
  272. # (change requires restart)
  273. # - Streaming -
  274. sr_check_period = 0
  275. # Streaming replication check period
  276. # Disabled (0) by default
  277. sr_check_user = 'odoo'
  278. # Streaming replication check user
  279. # This is neccessary even if you disable streaming
  280. # replication delay check by sr_check_period = 0
  281. sr_check_password = 'odoo'
  282. # Password for streaming replication check user
  283. sr_check_database = 'odoo'
  284. # Database name for streaming replication check
  285. delay_threshold = 0
  286. # Threshold before not dispatching query to standby node
  287. # Unit is in bytes
  288. # Disabled (0) by default
  289. # - Special commands -
  290. follow_master_command = ''
  291. # Executes this command after master failover
  292. # Special values:
  293. # %d = node id
  294. # %h = host name
  295. # %p = port number
  296. # %D = database cluster path
  297. # %m = new master node id
  298. # %H = hostname of the new master node
  299. # %M = old master node id
  300. # %P = old primary node id
  301. # %r = new master port number
  302. # %R = new master database cluster path
  303. # %% = '%' character
  304. #------------------------------------------------------------------------------
  305. # HEALTH CHECK GLOBAL PARAMETERS
  306. #------------------------------------------------------------------------------
  307. health_check_period = 0
  308. # Health check period
  309. # Disabled (0) by default
  310. health_check_timeout = 20
  311. # Health check timeout
  312. # 0 means no timeout
  313. health_check_user = 'odoo'
  314. # Health check user
  315. health_check_password = 'odoo'
  316. # Password for health check user
  317. health_check_database = 'odoo'
  318. # Database name for health check. If '', tries 'postgres' frist,
  319. health_check_max_retries = 0
  320. # Maximum number of times to retry a failed health check before giving up.
  321. health_check_retry_delay = 1
  322. # Amount of time to wait (in seconds) between retries.
  323. connect_timeout = 10000
  324. # Timeout value in milliseconds before giving up to connect to backend.
  325. # Default is 10000 ms (10 second). Flaky network user may want to increase
  326. # the value. 0 means no timeout.
  327. # Note that this value is not only used for health check,
  328. # but also for ordinary conection to backend.
  329. #------------------------------------------------------------------------------
  330. # HEALTH CHECK PER NODE PARAMETERS (OPTIONAL)
  331. #------------------------------------------------------------------------------
  332. health_check_period0 = 0
  333. health_check_timeout0 = 20
  334. health_check_user0 = 'nobody'
  335. health_check_password0 = ''
  336. health_check_database0 = ''
  337. health_check_max_retries0 = 0
  338. health_check_retry_delay0 = 1
  339. connect_timeout0 = 10000
  340. #------------------------------------------------------------------------------
  341. # FAILOVER AND FAILBACK
  342. #------------------------------------------------------------------------------
  343. failover_command = '/etc/failover.sh %d %P %H %R'
  344. # Executes this command at failover
  345. # Special values:
  346. # %d = node id
  347. # %h = host name
  348. # %p = port number
  349. # %D = database cluster path
  350. # %m = new master node id
  351. # %H = hostname of the new master node
  352. # %M = old master node id
  353. # %P = old primary node id
  354. # %r = new master port number
  355. # %R = new master database cluster path
  356. # %% = '%' character
  357. failback_command = ''
  358. # Executes this command at failback.
  359. # Special values:
  360. # %d = node id
  361. # %h = host name
  362. # %p = port number
  363. # %D = database cluster path
  364. # %m = new master node id
  365. # %H = hostname of the new master node
  366. # %M = old master node id
  367. # %P = old primary node id
  368. # %r = new master port number
  369. # %R = new master database cluster path
  370. # %% = '%' character
  371. fail_over_on_backend_error = on
  372. # Initiates failover when reading/writing to the
  373. # backend communication socket fails
  374. # If set to off, pgpool will report an
  375. # error and disconnect the session.
  376. search_primary_node_timeout = 300
  377. # Timeout in seconds to search for the
  378. # primary node when a failover occurs.
  379. # 0 means no timeout, keep searching
  380. # for a primary node forever.
  381. #------------------------------------------------------------------------------
  382. # ONLINE RECOVERY
  383. #------------------------------------------------------------------------------
  384. recovery_user = 'odoo'
  385. # Online recovery user
  386. recovery_password = 'odoo'
  387. # Online recovery password
  388. recovery_1st_stage_command = '/etc/recovery_1st_stage'
  389. # Executes a command in first stage
  390. recovery_2nd_stage_command = ''
  391. # Executes a command in second stage
  392. recovery_timeout = 90
  393. # Timeout in seconds to wait for the
  394. # recovering node's postmaster to start up
  395. # 0 means no wait
  396. client_idle_limit_in_recovery = 0
  397. # Client is disconnected after being idle
  398. # for that many seconds in the second stage
  399. # of online recovery
  400. # 0 means no disconnection
  401. # -1 means immediate disconnection
  402. #------------------------------------------------------------------------------
  403. # WATCHDOG
  404. #------------------------------------------------------------------------------
  405. # - Enabling -
  406. use_watchdog = off
  407. # Activates watchdog
  408. # (change requires restart)
  409. # -Connection to up stream servers -
  410. trusted_servers = ''
  411. # trusted server list which are used
  412. # to confirm network connection
  413. # (hostA,hostB,hostC,...)
  414. # (change requires restart)
  415. ping_path = '/bin'
  416. # ping command path
  417. # (change requires restart)
  418. # - Watchdog communication Settings -
  419. wd_hostname = 'pg_1'
  420. wd_hostname = 'pg_2'
  421. # Host name or IP address of this watchdog
  422. # (change requires restart)
  423. wd_port = 9000
  424. # port number for watchdog service
  425. # (change requires restart)
  426. wd_priority = 1
  427. # priority of this watchdog in leader election
  428. # (change requires restart)
  429. wd_authkey = ''
  430. # Authentication key for watchdog communication
  431. # (change requires restart)
  432. wd_ipc_socket_dir = '/tmp'
  433. # Unix domain socket path for watchdog IPC socket
  434. # The Debian package defaults to
  435. # /var/run/postgresql
  436. # (change requires restart)
  437. # - Virtual IP control Setting -
  438. delegate_IP = '172.20.0.55'
  439. # delegate IP address
  440. # If this is empty, virtual IP never bring up.
  441. # (change requires restart)
  442. if_cmd_path = '/sbin'
  443. # path to the directory where if_up/down_cmd exists
  444. # (change requires restart)
  445. if_up_cmd = 'ip addr add $_IP_$/24 dev eth0 label eth0:0'
  446. # startup delegate IP command
  447. # (change requires restart)
  448. if_down_cmd = 'ip addr del $_IP_$/24 dev eth0'
  449. # shutdown delegate IP command
  450. # (change requires restart)
  451. arping_path = '/usr/sbin'
  452. # arping command path
  453. # (change requires restart)
  454. arping_cmd = 'arping -U $_IP_$ -w 1'
  455. # arping command
  456. # (change requires restart)
  457. # - Behaivor on escalation Setting -
  458. clear_memqcache_on_escalation = on
  459. # Clear all the query cache on shared memory
  460. # when standby pgpool escalate to active pgpool
  461. # (= virtual IP holder).
  462. # This should be off if client connects to pgpool
  463. # not using virtual IP.
  464. # (change requires restart)
  465. wd_escalation_command = ''
  466. # Executes this command at escalation on new active pgpool.
  467. # (change requires restart)
  468. wd_de_escalation_command = ''
  469. # Executes this command when master pgpool resigns from being master.
  470. # (change requires restart)
  471. # - Watchdog consensus settings for failover -
  472. failover_when_quorum_exists = on
  473. # Only perform backend node failover
  474. # when the watchdog cluster holds the quorum
  475. # (change requires restart)
  476. failover_require_consensus = on
  477. # Perform failover when majority of Pgpool-II nodes
  478. # aggrees on the backend node status change
  479. # (change requires restart)
  480. allow_multiple_failover_requests_from_node = off
  481. # A Pgpool-II node can cast multiple votes
  482. # for building the consensus on failover
  483. # (change requires restart)
  484. # - Lifecheck Setting -
  485. # -- common --
  486. wd_monitoring_interfaces_list = '' # Comma separated list of interfaces names to monitor.
  487. # if any interface from the list is active the watchdog will
  488. # consider the network is fine
  489. # 'any' to enable monitoring on all interfaces except loopback
  490. # '' to disable monitoring
  491. # (change requires restart)
  492. wd_lifecheck_method = 'heartbeat'
  493. # Method of watchdog lifecheck ('heartbeat' or 'query' or 'external')
  494. # (change requires restart)
  495. wd_interval = 10
  496. # lifecheck interval (sec) > 0
  497. # (change requires restart)
  498. # -- heartbeat mode --
  499. wd_heartbeat_port = 9694
  500. # Port number for receiving heartbeat signal
  501. # (change requires restart)
  502. wd_heartbeat_keepalive = 2
  503. # Interval time of sending heartbeat signal (sec)
  504. # (change requires restart)
  505. wd_heartbeat_deadtime = 30
  506. # Deadtime interval for heartbeat signal (sec)
  507. # (change requires restart)
  508. heartbeat_destination0 = 'host0_ip1'
  509. # Host name or IP address of destination 0
  510. # for sending heartbeat signal.
  511. # (change requires restart)
  512. heartbeat_destination_port0 = 9694
  513. # Port number of destination 0 for sending
  514. # heartbeat signal. Usually this is the
  515. # same as wd_heartbeat_port.
  516. # (change requires restart)
  517. heartbeat_device0 = ''
  518. # Name of NIC device (such like 'eth0')
  519. # used for sending/receiving heartbeat
  520. # signal to/from destination 0.
  521. # This works only when this is not empty
  522. # and pgpool has root privilege.
  523. # (change requires restart)
  524. #heartbeat_destination1 = 'host0_ip2'
  525. #heartbeat_destination_port1 = 9694
  526. #heartbeat_device1 = ''
  527. # -- query mode --
  528. wd_life_point = 3
  529. # lifecheck retry times
  530. # (change requires restart)
  531. wd_lifecheck_query = 'SELECT 1'
  532. # lifecheck query to pgpool from watchdog
  533. # (change requires restart)
  534. wd_lifecheck_dbname = 'template1'
  535. # Database name connected for lifecheck
  536. # (change requires restart)
  537. wd_lifecheck_user = 'nobody'
  538. # watchdog user monitoring pgpools in lifecheck
  539. # (change requires restart)
  540. wd_lifecheck_password = ''
  541. # Password for watchdog user in lifecheck
  542. # (change requires restart)
  543. # - Other pgpool Connection Settings -
  544. #other_pgpool_hostname0 = 'host0'
  545. # Host name or IP address to connect to for other pgpool 0
  546. # (change requires restart)
  547. #other_pgpool_port0 = 5432
  548. # Port number for othet pgpool 0
  549. # (change requires restart)
  550. #other_wd_port0 = 9000
  551. # Port number for othet watchdog 0
  552. # (change requires restart)
  553. #other_pgpool_hostname1 = 'host1'
  554. #other_pgpool_port1 = 5432
  555. #other_wd_port1 = 9000
  556. #------------------------------------------------------------------------------
  557. # OTHERS
  558. #------------------------------------------------------------------------------
  559. relcache_expire = 0
  560. # Life time of relation cache in seconds.
  561. # 0 means no cache expiration(the default).
  562. # The relation cache is used for cache the
  563. # query result against PostgreSQL system
  564. # catalog to obtain various information
  565. # including table structures or if it's a
  566. # temporary table or not. The cache is
  567. # maintained in a pgpool child local memory
  568. # and being kept as long as it survives.
  569. # If someone modify the table by using
  570. # ALTER TABLE or some such, the relcache is
  571. # not consistent anymore.
  572. # For this purpose, cache_expiration
  573. # controls the life time of the cache.
  574. relcache_size = 256
  575. # Number of relation cache
  576. # entry. If you see frequently:
  577. # "pool_search_relcache: cache replacement happend"
  578. # in the pgpool log, you might want to increate this number.
  579. check_temp_table = on
  580. # If on, enable temporary table check in SELECT statements.
  581. # This initiates queries against system catalog of primary/master
  582. # thus increases load of master.
  583. # If you are absolutely sure that your system never uses temporary tables
  584. # and you want to save access to primary/master, you could turn this off.
  585. # Default is on.
  586. check_unlogged_table = on
  587. # If on, enable unlogged table check in SELECT statements.
  588. # This initiates queries against system catalog of primary/master
  589. # thus increases load of master.
  590. # If you are absolutely sure that your system never uses unlogged tables
  591. # and you want to save access to primary/master, you could turn this off.
  592. # Default is on.
  593. #------------------------------------------------------------------------------
  594. # IN MEMORY QUERY MEMORY CACHE
  595. #------------------------------------------------------------------------------
  596. memory_cache_enabled = off
  597. # If on, use the memory cache functionality, off by default
  598. memqcache_method = 'shmem'
  599. # Cache storage method. either 'shmem'(shared memory) or
  600. # 'memcached'. 'shmem' by default
  601. # (change requires restart)
  602. memqcache_memcached_host = 'localhost'
  603. # Memcached host name or IP address. Mandatory if
  604. # memqcache_method = 'memcached'.
  605. # Defaults to localhost.
  606. # (change requires restart)
  607. memqcache_memcached_port = 11211
  608. # Memcached port number. Mondatory if memqcache_method = 'memcached'.
  609. # Defaults to 11211.
  610. # (change requires restart)
  611. memqcache_total_size = 67108864
  612. # Total memory size in bytes for storing memory cache.
  613. # Mandatory if memqcache_method = 'shmem'.
  614. # Defaults to 64MB.
  615. # (change requires restart)
  616. memqcache_max_num_cache = 1000000
  617. # Total number of cache entries. Mandatory
  618. # if memqcache_method = 'shmem'.
  619. # Each cache entry consumes 48 bytes on shared memory.
  620. # Defaults to 1,000,000(45.8MB).
  621. # (change requires restart)
  622. memqcache_expire = 0
  623. # Memory cache entry life time specified in seconds.
  624. # 0 means infinite life time. 0 by default.
  625. # (change requires restart)
  626. memqcache_auto_cache_invalidation = on
  627. # If on, invalidation of query cache is triggered by corresponding
  628. # DDL/DML/DCL(and memqcache_expire). If off, it is only triggered
  629. # by memqcache_expire. on by default.
  630. # (change requires restart)
  631. memqcache_maxcache = 409600
  632. # Maximum SELECT result size in bytes.
  633. # Must be smaller than memqcache_cache_block_size. Defaults to 400KB.
  634. # (change requires restart)
  635. memqcache_cache_block_size = 1048576
  636. # Cache block size in bytes. Mandatory if memqcache_method = 'shmem'.
  637. # Defaults to 1MB.
  638. # (change requires restart)
  639. memqcache_oiddir = '/var/log/pgpool/oiddir'
  640. # Temporary work directory to record table oids
  641. # (change requires restart)
  642. white_memqcache_table_list = ''
  643. # Comma separated list of table names to memcache
  644. # that don't write to database
  645. # Regexp are accepted
  646. black_memqcache_table_list = ''
  647. # Comma separated list of table names not to memcache
  648. # that don't write to database
  649. # Regexp are accepted