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