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