Advertisement
Guest User

Untitled

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