Advertisement
Guest User

pgpool.conf

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