Advertisement
Guest User

Untitled

a guest
Dec 19th, 2016
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.86 KB | None | 0 0
  1. 2016-12-18 17:16:41: pid 24793: DEBUG: loading hba configuration
  2. 2016-12-18 17:16:41: pid 24793: DETAIL: loading file :"/etc/pgpool-II/pool_hba.conf" for client authentication configuration file
  3. 2016-12-18 17:16:41: pid 24793: LOG: reading status file: 0 th backend is set to down status
  4. 2016-12-18 17:16:41: pid 24793: LOG: reading status file: 2 th backend is set to down status
  5. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_coninfo_size: num_init_children (20) * max_pool (10) * MAX_NUM_BACKENDS (128) * sizeof(ConnectionInfo) (136) = 3481600 bytes requested for shared memory
  6. 2016-12-18 17:16:41: pid 24793: DEBUG: ProcessInfo: num_init_children (20) * sizeof(ProcessInfo) (32) = 640 bytes requested for shared memory
  7. 2016-12-18 17:16:41: pid 24793: DEBUG: Request info are: sizeof(POOL_REQUEST_INFO) 5224 bytes requested for shared memory
  8. 2016-12-18 17:16:41: pid 24793: DEBUG: Recovery management area: sizeof(int) 4 bytes requested for shared memory
  9. 2016-12-18 17:16:41: pid 24793: LOG: Setting up socket for 0.0.0.0:5432
  10. 2016-12-18 17:16:41: pid 24793: LOG: Setting up socket for :::5432
  11. 2016-12-18 17:16:41: pid 24794: DEBUG: initializing backend status
  12. 2016-12-18 17:16:41: pid 24793: LOG: pgpool-II successfully started. version 3.5.4 (ekieboshi)
  13.  
  14. 2016-12-18 17:16:41: pid 24793: LOG: find_primary_node: checking backend no 0
  15. 2016-12-18 17:16:41: pid 24793: LOG: find_primary_node: checking backend no 1
  16.  
  17. 2016-12-18 17:16:41: pid 24795: DEBUG: initializing backend status
  18. 2016-12-18 17:16:41: pid 24796: DEBUG: initializing backend status
  19. 2016-12-18 17:16:41: pid 24797: DEBUG: initializing backend status
  20. 2016-12-18 17:16:41: pid 24798: DEBUG: initializing backend status
  21. 2016-12-18 17:16:41: pid 24799: DEBUG: initializing backend status
  22. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_read: read 13 bytes from backend 0
  23. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate kind = 5
  24. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_write: to backend: 0 kind:p
  25. 2016-12-18 17:16:41: pid 24800: DEBUG: initializing backend status
  26. 2016-12-18 17:16:41: pid 24801: DEBUG: initializing backend status
  27. 2016-12-18 17:16:41: pid 24802: DEBUG: initializing backend status
  28. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_read: read 326 bytes from backend 0
  29. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate kind = 0
  30. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate backend: key data received
  31. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate backend: transaction state: I
  32. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: extended:0 query:"SELECT pg_is_in_recovery()"
  33. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_write: to backend: 0 kind:Q
  34. 2016-12-18 17:16:41: pid 24803: DEBUG: initializing backend status
  35. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_read: read 75 bytes from backend 0
  36. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: kind: 'T'
  37. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: received ROW DESCRIPTION ('T')
  38. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: row description: num_fileds: 1
  39. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: kind: 'D'
  40. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: received DATA ROW ('D')
  41. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: kind: 'C'
  42. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: received COMMAND COMPLETE ('C')
  43. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: kind: 'Z'
  44. 2016-12-18 17:16:41: pid 24793: DEBUG: do_query: received READY FOR QUERY ('Z')
  45. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_write: to backend: 0 kind:X
  46. 2016-12-18 17:16:41: pid 24793: DEBUG: find_primary_node: 1 node is standby
  47.  
  48. 2016-12-18 17:16:41: pid 24793: LOG: find_primary_node: checking backend no 2
  49. 2016-12-18 17:16:41: pid 24793: DEBUG: find_primary_node: no primary node found
  50.  
  51. 2016-12-18 17:16:41: pid 24804: DEBUG: initializing backend status
  52. 2016-12-18 17:16:41: pid 24793: DEBUG: starting health check
  53. 2016-12-18 17:16:41: pid 24793: DEBUG: health check: clearing alarm
  54. 2016-12-18 17:16:41: pid 24793: DEBUG: doing health check against database:postgres user:postgres
  55. 2016-12-18 17:16:41: pid 24793: DEBUG: Backend DB node 0 status is 3
  56.  
  57. 2016-12-18 17:16:41: pid 24793: DEBUG: Backend DB node 1 status is 2
  58. 2016-12-18 17:16:41: pid 24793: DEBUG: Trying to make persistent DB connection to backend node 1 having status 2
  59. 2016-12-18 17:16:41: pid 24805: DEBUG: initializing backend status
  60. 2016-12-18 17:16:41: pid 24806: DEBUG: initializing backend status
  61. 2016-12-18 17:16:41: pid 24807: DEBUG: initializing backend status
  62. 2016-12-18 17:16:41: pid 24808: DEBUG: initializing backend status
  63. 2016-12-18 17:16:41: pid 24809: DEBUG: initializing backend status
  64. 2016-12-18 17:16:41: pid 24810: DEBUG: initializing backend status
  65. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_read: read 13 bytes from backend 0
  66. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate kind = 5
  67. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_write: to backend: 0 kind:p
  68. 2016-12-18 17:16:41: pid 24811: DEBUG: initializing backend status
  69. 2016-12-18 17:16:41: pid 24812: DEBUG: initializing backend status
  70. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_read: read 318 bytes from backend 0
  71. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate kind = 0
  72. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate backend: key data received
  73. 2016-12-18 17:16:41: pid 24793: DEBUG: authenticate backend: transaction state: I
  74. 2016-12-18 17:16:41: pid 24793: DEBUG: persistent DB connection to backend node 1 having status 2 is successful
  75. 2016-12-18 17:16:41: pid 24793: DEBUG: pool_write: to backend: 0 kind:X
  76. 2016-12-18 17:16:41: pid 24793: DEBUG: Backend DB node 2 status is 3
  77.  
  78. [root@ip-172-22-3-228 data]# sudo -u postgres psql -h 172.21.3.41 -p 5432 -x -c "show pool_nodes;"
  79. Password:
  80. -[ RECORD 1 ]------------
  81. node_id | 0
  82. hostname | 172.21.3.229
  83. port | 5432
  84. status | 3
  85. lb_weight | 0.333333
  86. role | standby
  87. select_cnt | 0
  88. -[ RECORD 2 ]------------
  89. node_id | 1
  90. hostname | 172.21.2.88
  91. port | 5432
  92. status | 2
  93. lb_weight | 0.333333
  94. role | standby
  95. select_cnt | 0
  96. -[ RECORD 3 ]------------
  97. node_id | 2
  98. hostname | 172.22.3.228
  99. port | 5432
  100. status | 0
  101. lb_weight | 0.333333
  102. role | standby
  103. select_cnt | 0
  104.  
  105. //Pgpool-II uses pg_is_in_recovery to find the primary node, primary should return 'f' and standby should return 't'
  106. [root@ip-172-22-3-228 data]# sudo -u postgres psql -h 172.21.3.229 -p 5432 -x -c "select pg_is_in_recovery();"
  107. Password:
  108. -[ RECORD 1 ]-----+--
  109. pg_is_in_recovery | f
  110.  
  111. [root@ip-172-22-3-228 data]# sudo -u postgres psql -h 172.21.2.88 -p 5432 -x -c "select pg_is_in_recovery();"
  112. Password:
  113. -[ RECORD 1 ]-----+--
  114. pg_is_in_recovery | t
  115.  
  116. [root@ip-172-22-3-228 data]# sudo -u postgres psql -h 172.22.3.228 -p 5432 -x -c "select pg_is_in_recovery();"
  117. Password:
  118. -[ RECORD 1 ]-----+--
  119. pg_is_in_recovery | t
  120.  
  121. # ----------------------------
  122. # pgPool-II configuration file
  123. # ----------------------------
  124. #------------------------------------------------------------------------------
  125. # CONNECTIONS
  126. #------------------------------------------------------------------------------
  127.  
  128. # - pgpool Connection Settings -
  129.  
  130. listen_addresses = '*'
  131. # Host name or IP address to listen on:
  132. # '*' for all, '' for no TCP/IP connections
  133. # (change requires restart)
  134. port = 5432
  135. # Port number
  136. # (change requires restart)
  137. socket_dir = '/var/run/postgresql'
  138. # Unix domain socket path
  139. # The Debian package defaults to
  140. # /var/run/postgresql
  141. # (change requires restart)
  142. listen_backlog_multiplier = 2
  143. # Set the backlog parameter of listen(2) to
  144. # num_init_children * listen_backlog_multiplier.
  145. # (change requires restart)
  146. serialize_accept = on
  147. # whether to serialize accept() call to avoid thundering herd problem
  148. # (change requires restart)
  149.  
  150. # - pgpool Communication Manager Connection Settings -
  151.  
  152. pcp_listen_addresses = '*'
  153. # Host name or IP address for pcp process to listen on:
  154. # '*' for all, '' for no TCP/IP connections
  155. # (change requires restart)
  156. pcp_port = 9898
  157. # Port number for pcp
  158. # (change requires restart)
  159. pcp_socket_dir = '/var/run/postgresql'
  160. # Unix domain socket path for pcp
  161. # The Debian package defaults to
  162. # /var/run/postgresql
  163. # (change requires restart)
  164.  
  165. # - Backend Connection Settings -
  166.  
  167. backend_hostname0 = '172.21.3.229'
  168. backend_port0 = 5432
  169. backend_weight0 = 1
  170. backend_data_directory0 = '/var/lib/pgsql/9.6/data'
  171. backend_flag0 = 'ALLOW_TO_FAILOVER'
  172.  
  173. backend_hostname1 = '172.21.2.88'
  174. backend_port1 = 5432
  175. backend_weight1 = 1
  176. backend_data_directory1 = '/var/lib/pgsql/9.6/data'
  177. backend_flag1 = 'ALLOW_TO_FAILOVER'
  178.  
  179. backend_hostname2 = '172.22.3.228'
  180. backend_port2 = 5432
  181. backend_weight2 = 1
  182. backend_data_directory2 = '/var/lib/pgsql/9.6/data'
  183. backend_flag2 = 'ALLOW_TO_FAILOVER'
  184.  
  185. # - Authentication -
  186.  
  187. enable_pool_hba = on
  188. # Use pool_hba.conf for client authentication
  189. pool_passwd = 'pool_passwd'
  190. # File name of pool_passwd for md5 authentication.
  191. # "" disables pool_passwd.
  192. # (change requires restart)
  193. authentication_timeout = 60
  194. # Delay in seconds to complete client authentication
  195. # 0 means no timeout.
  196.  
  197. # - SSL Connections -
  198.  
  199. ssl = off
  200. # Enable SSL support
  201. # (change requires restart)
  202. #ssl_key = './server.key'
  203. # Path to the SSL private key file
  204. # (change requires restart)
  205. #ssl_cert = './server.cert'
  206. # Path to the SSL public certificate file
  207. # (change requires restart)
  208. #ssl_ca_cert = ''
  209. # Path to a single PEM format file
  210. # containing CA root certificate(s)
  211. # (change requires restart)
  212. #ssl_ca_cert_dir = ''
  213. # Directory containing CA root certificate(s)
  214. # (change requires restart)
  215.  
  216.  
  217. #------------------------------------------------------------------------------
  218. # POOLS
  219. #------------------------------------------------------------------------------
  220.  
  221. # - Concurrent session and pool size -
  222.  
  223. num_init_children = 20
  224. # Number of concurrent sessions allowed
  225. # (change requires restart)
  226. max_pool = 10
  227. # Number of connection pool caches per connection
  228. # (change requires restart)
  229.  
  230. # - Life time -
  231.  
  232. child_life_time = 300
  233. # Pool exits after being idle for this many seconds
  234. child_max_connections = 0
  235. # Pool exits after receiving that many connections
  236. # 0 means no exit
  237. connection_life_time = 0
  238. # Connection to backend closes after being idle for this many seconds
  239. # 0 means no close
  240. client_idle_limit = 0
  241. # Client is disconnected after being idle for that many seconds
  242. # (even inside an explicit transactions!)
  243. # 0 means no disconnection
  244.  
  245.  
  246. #------------------------------------------------------------------------------
  247. # LOGS
  248. #------------------------------------------------------------------------------
  249.  
  250. # - Where to log -
  251.  
  252. log_destination = 'stderr,syslog'
  253. # Where to log
  254. # Valid values are combinations of stderr,
  255. # and syslog. Default to stderr.
  256.  
  257. # - What to log -
  258.  
  259. print_timestamp = on # Print timestamp on each line
  260. # (change requires restart)
  261.  
  262. log_connections = on
  263. # Log connections
  264. log_hostname = on
  265. # Hostname will be shown in ps status
  266. # and in logs if connections are logged
  267. log_statement = on
  268. # Log all statements
  269. log_per_node_statement = on
  270. # Log all statements
  271. # with node and backend informations
  272. log_standby_delay = 'none'
  273. # Log standby delay
  274. # Valid values are combinations of always,
  275. # if_over_threshold, none
  276.  
  277. # - Syslog specific -
  278.  
  279. syslog_facility = 'LOCAL0'
  280. # Syslog local facility. Default to LOCAL0
  281. syslog_ident = 'pgpool'
  282. # Syslog program identification string
  283. # Default to 'pgpool'
  284.  
  285. # - Debug -
  286.  
  287. debug_level = 1
  288. # Debug message verbosity level
  289. # 0 means no message, 1 or more mean verbose
  290.  
  291. #log_error_verbosity = default # terse, default, or verbose messages
  292.  
  293. #client_min_messages = notice # values in order of decreasing detail:
  294. # debug5
  295. # debug4
  296. # debug3
  297. # debug2
  298. # debug1
  299. # log
  300. # notice
  301. # warning
  302. # error
  303.  
  304. #log_min_messages = warning # values in order of decreasing detail:
  305. # debug5
  306. # debug4
  307. # debug3
  308. # debug2
  309. # debug1
  310. # info
  311. # notice
  312. # warning
  313. # error
  314. # log
  315. # fatal
  316. # panic
  317.  
  318. #------------------------------------------------------------------------------
  319. # FILE LOCATIONS
  320. #------------------------------------------------------------------------------
  321.  
  322. pid_file_name = '/var/run/pgpool/pgpool.pid'
  323. # PID file name
  324. # (change requires restart)
  325. logdir = '/var/log/pgpool'
  326. # Directory of pgPool status file
  327. # (change requires restart)
  328.  
  329.  
  330. #------------------------------------------------------------------------------
  331. # CONNECTION POOLING
  332. #------------------------------------------------------------------------------
  333.  
  334. connection_cache = on
  335. # Activate connection pools
  336. # (change requires restart)
  337.  
  338. # Semicolon separated list of queries
  339. # to be issued at the end of a session
  340. # The default is for 8.3 and later
  341. reset_query_list = 'ABORT; DISCARD ALL'
  342. # The following one is for 8.2 and before
  343. #reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
  344.  
  345.  
  346. #------------------------------------------------------------------------------
  347. # REPLICATION MODE
  348. #------------------------------------------------------------------------------
  349.  
  350. replication_mode = off
  351. # Activate replication mode
  352. # (change requires restart)
  353. replicate_select = off
  354. # Replicate SELECT statements
  355. # when in replication mode
  356. # replicate_select is higher priority than
  357. # load_balance_mode.
  358.  
  359. insert_lock = on
  360. # Automatically locks a dummy row or a table
  361. # with INSERT statements to keep SERIAL data
  362. # consistency
  363. # Without SERIAL, no lock will be issued
  364. lobj_lock_table = ''
  365. # When rewriting lo_creat command in
  366. # replication mode, specify table name to
  367. # lock
  368.  
  369. # - Degenerate handling -
  370.  
  371. replication_stop_on_mismatch = off
  372. # On disagreement with the packet kind
  373. # sent from backend, degenerate the node
  374. # which is most likely "minority"
  375. # If off, just force to exit this session
  376.  
  377. failover_if_affected_tuples_mismatch = off
  378. # On disagreement with the number of affected
  379. # tuples in UPDATE/DELETE queries, then
  380. # degenerate the node which is most likely
  381. # "minority".
  382. # If off, just abort the transaction to
  383. # keep the consistency
  384.  
  385.  
  386. #------------------------------------------------------------------------------
  387. # LOAD BALANCING MODE
  388. #------------------------------------------------------------------------------
  389.  
  390. load_balance_mode = off
  391. # Activate load balancing mode
  392. # (change requires restart)
  393. ignore_leading_white_space = on
  394. # Ignore leading white spaces of each query
  395. white_function_list = ''
  396. # Comma separated list of function names
  397. # that don't write to database
  398. # Regexp are accepted
  399. black_function_list = 'nextval,setval'
  400. # Comma separated list of function names
  401. # that write to database
  402. # Regexp are accepted
  403.  
  404. database_redirect_preference_list = ''
  405. # comma separated list of pairs of database and node id.
  406. # example: postgres:primary,mydb[0-4]:1,mydb[5-9]:2'
  407. # valid for streaming replicaton mode only.
  408.  
  409. app_name_redirect_preference_list = ''
  410. # comma separated list of pairs of app name and node id.
  411. # example: 'psql:primary,myapp[0-4]:1,myapp[5-9]:standby'
  412. # valid for streaming replicaton mode only.
  413. allow_sql_comments = off
  414. # if on, ignore SQL comments when judging if load balance or
  415. # query cache is possible.
  416. # If off, SQL comments effectively prevent the judgment
  417. # (pre 3.4 behavior).
  418.  
  419. #------------------------------------------------------------------------------
  420. # MASTER/SLAVE MODE
  421. #------------------------------------------------------------------------------
  422.  
  423. master_slave_mode = on
  424. # Activate master/slave mode
  425. # (change requires restart)
  426. master_slave_sub_mode = 'stream'
  427. # Master/slave sub mode
  428. # Valid values are combinations slony or
  429. # stream. Default is slony.
  430. # (change requires restart)
  431.  
  432. # - Streaming -
  433.  
  434. sr_check_period = 10
  435. # Streaming replication check period
  436. # Disabled (0) by default
  437. sr_check_user = 'replication_user'
  438. # Streaming replication check user
  439. # This is necessary even if you disable
  440. # streaming replication delay check with
  441. # sr_check_period = 0
  442. sr_check_password = 'replication_pass'
  443. # Password for streaming replication check user
  444. sr_check_database = 'replication_db'
  445. # Database name for streaming replication check
  446. delay_threshold = 0
  447. # Threshold before not dispatching query to standby node
  448. # Unit is in bytes
  449. # Disabled (0) by default
  450.  
  451. # - Special commands -
  452.  
  453. follow_master_command = ''
  454. # Executes this command after master failover
  455. # Special values:
  456. # %d = node id
  457. # %h = host name
  458. # %p = port number
  459. # %D = database cluster path
  460. # %m = new master node id
  461. # %H = hostname of the new master node
  462. # %M = old master node id
  463. # %P = old primary node id
  464. # %r = new master port number
  465. # %R = new master database cluster path
  466. # %% = '%' character
  467.  
  468. #------------------------------------------------------------------------------
  469. # HEALTH CHECK
  470. #------------------------------------------------------------------------------
  471.  
  472. health_check_period = 5
  473. # Health check period
  474. # Disabled (0) by default
  475. health_check_timeout = 20
  476. # Health check timeout
  477. # 0 means no timeout
  478. health_check_user = 'postgres'
  479. # Health check user
  480. health_check_password = 'postgres'
  481. # Password for health check user
  482. health_check_database = 'postgres'
  483. # Database name for health check. If '', tries 'postgres' frist, then 'template1'
  484.  
  485. health_check_max_retries = 2
  486. # Maximum number of times to retry a failed health check before giving up.
  487. health_check_retry_delay = 1
  488. # Amount of time to wait (in seconds) between retries.
  489. connect_timeout = 10000
  490. # Timeout value in milliseconds before giving up to connect to backend.
  491. # Default is 10000 ms (10 second). Flaky network user may want to increase
  492. # the value. 0 means no timeout.
  493. # Note that this value is not only used for health check,
  494. # but also for ordinary conection to backend.
  495.  
  496. #------------------------------------------------------------------------------
  497. # FAILOVER AND FAILBACK
  498. #------------------------------------------------------------------------------
  499.  
  500. failover_command = ''
  501. # Executes this command at failover
  502. # Special values:
  503. # %d = node id
  504. # %h = host name
  505. # %p = port number
  506. # %D = database cluster path
  507. # %m = new master node id
  508. # %H = hostname of the new master node
  509. # %M = old master node id
  510. # %P = old primary node id
  511. # %r = new master port number
  512. # %R = new master database cluster path
  513. # %% = '%' character
  514. failback_command = ''
  515. # Executes this command at failback.
  516. # Special values:
  517. # %d = node id
  518. # %h = host name
  519. # %p = port number
  520. # %D = database cluster path
  521. # %m = new master node id
  522. # %H = hostname of the new master node
  523. # %M = old master node id
  524. # %P = old primary node id
  525. # %r = new master port number
  526. # %R = new master database cluster path
  527. # %% = '%' character
  528.  
  529. fail_over_on_backend_error = on
  530. # Initiates failover when reading/writing to the
  531. # backend communication socket fails
  532. # If set to off, pgpool will report an
  533. # error and disconnect the session.
  534.  
  535. #search_primary_node_timeout = 10
  536. # Timeout in seconds to search for the
  537. # primary node when a failover occurs.
  538. # 0 means no timeout, keep searching
  539. # for a primary node forever.
  540.  
  541. #------------------------------------------------------------------------------
  542. # ONLINE RECOVERY
  543. #------------------------------------------------------------------------------
  544.  
  545. recovery_user = 'postgres'
  546. # Online recovery user
  547. recovery_password = 'postgres'
  548. # Online recovery password
  549. recovery_1st_stage_command = ''
  550. # Executes a command in first stage
  551. recovery_2nd_stage_command = ''
  552. # Executes a command in second stage
  553. recovery_timeout = 90
  554. # Timeout in seconds to wait for the
  555. # recovering node's postmaster to start up
  556. # 0 means no wait
  557. client_idle_limit_in_recovery = 0
  558. # Client is disconnected after being idle
  559. # for that many seconds in the second stage
  560. # of online recovery
  561. # 0 means no disconnection
  562. # -1 means immediate disconnection
  563.  
  564.  
  565. #------------------------------------------------------------------------------
  566. # WATCHDOG
  567. #------------------------------------------------------------------------------
  568.  
  569. # - Enabling -
  570.  
  571. use_watchdog = off
  572. # Activates watchdog
  573. # (change requires restart)
  574.  
  575. # -Connection to up stream servers -
  576.  
  577. trusted_servers = ''
  578. # trusted server list which are used
  579. # to confirm network connection
  580. # (hostA,hostB,hostC,...)
  581. # (change requires restart)
  582. ping_path = '/bin'
  583. # ping command path
  584. # (change requires restart)
  585.  
  586. # - Watchdog communication Settings -
  587.  
  588. wd_hostname = ''
  589. # Host name or IP address of this watchdog
  590. # (change requires restart)
  591. wd_port = 9000
  592. # port number for watchdog service
  593. # (change requires restart)
  594. wd_priority = 1
  595. # priority of this watchdog in leader election
  596. # (change requires restart)
  597.  
  598. wd_authkey = ''
  599. # Authentication key for watchdog communication
  600. # (change requires restart)
  601.  
  602. wd_ipc_socket_dir = '/var/run/postgresql'
  603. # Unix domain socket path for watchdog IPC socket
  604. # The Debian package defaults to
  605. # /var/run/postgresql
  606. # (change requires restart)
  607.  
  608.  
  609. # - Virtual IP control Setting -
  610.  
  611. delegate_IP = ''
  612. # delegate IP address
  613. # If this is empty, virtual IP never bring up.
  614. # (change requires restart)
  615. if_cmd_path = '/sbin'
  616. # path to the directory where if_up/down_cmd exists
  617. # (change requires restart)
  618. if_up_cmd = 'ip addr add $_IP_$/24 dev eth0 label eth0:0'
  619. # startup delegate IP command
  620. # (change requires restart)
  621. if_down_cmd = 'ip addr del $_IP_$/24 dev eth0'
  622. # shutdown delegate IP command
  623. # (change requires restart)
  624. arping_path = '/usr/sbin'
  625. # arping command path
  626. # (change requires restart)
  627. arping_cmd = 'arping -U $_IP_$ -w 1'
  628. # arping command
  629. # (change requires restart)
  630.  
  631. # - Behaivor on escalation Setting -
  632.  
  633. clear_memqcache_on_escalation = on
  634. # Clear all the query cache on shared memory
  635. # when standby pgpool escalate to active pgpool
  636. # (= virtual IP holder).
  637. # This should be off if client connects to pgpool
  638. # not using virtual IP.
  639. # (change requires restart)
  640. wd_escalation_command = ''
  641. # Executes this command at escalation on new active pgpool.
  642. # (change requires restart)
  643. wd_de_escalation_command = ''
  644. # Executes this command when master pgpool resigns from being master.
  645. # (change requires restart)
  646.  
  647. # - Lifecheck Setting -
  648.  
  649. # -- common --
  650.  
  651. wd_monitoring_interfaces_list = '' # Comma separated list of interfaces names to monitor.
  652. # if any interface from the list is active the watchdog will
  653. # consider the network is fine
  654. # 'any' to enable monitoring on all interfaces except loopback
  655. # '' to disable monitoring
  656.  
  657.  
  658. wd_lifecheck_method = 'heartbeat'
  659. # Method of watchdog lifecheck ('heartbeat' or 'query' or 'external')
  660. # (change requires restart)
  661. wd_interval = 10
  662. # lifecheck interval (sec) > 0
  663. # (change requires restart)
  664.  
  665. # -- heartbeat mode --
  666.  
  667. wd_heartbeat_port = 9694
  668. # Port number for receiving heartbeat signal
  669. # (change requires restart)
  670. wd_heartbeat_keepalive = 2
  671. # Interval time of sending heartbeat signal (sec)
  672. # (change requires restart)
  673. wd_heartbeat_deadtime = 30
  674. # Deadtime interval for heartbeat signal (sec)
  675. # (change requires restart)
  676. heartbeat_destination0 = 'host0_ip1'
  677. # Host name or IP address of destination 0
  678. # for sending heartbeat signal.
  679. # (change requires restart)
  680. heartbeat_destination_port0 = 9694
  681. # Port number of destination 0 for sending
  682. # heartbeat signal. Usually this is the
  683. # same as wd_heartbeat_port.
  684. # (change requires restart)
  685. heartbeat_device0 = ''
  686. # Name of NIC device (such like 'eth0')
  687. # used for sending/receiving heartbeat
  688. # signal to/from destination 0.
  689. # This works only when this is not empty
  690. # and pgpool has root privilege.
  691. # (change requires restart)
  692.  
  693. #heartbeat_destination1 = 'host0_ip2'
  694. #heartbeat_destination_port1 = 9694
  695. #heartbeat_device1 = ''
  696.  
  697. # -- query mode --
  698.  
  699. wd_life_point = 3
  700. # lifecheck retry times
  701. # (change requires restart)
  702. wd_lifecheck_query = 'SELECT 1'
  703. # lifecheck query to pgpool from watchdog
  704. # (change requires restart)
  705. wd_lifecheck_dbname = 'template1'
  706. # Database name connected for lifecheck
  707. # (change requires restart)
  708. wd_lifecheck_user = 'postgres'
  709. # watchdog user monitoring pgpools in lifecheck
  710. # (change requires restart)
  711. wd_lifecheck_password = 'postgres'
  712. # Password for watchdog user in lifecheck
  713. # (change requires restart)
  714.  
  715. # - Other pgpool Connection Settings -
  716.  
  717. #other_pgpool_hostname0 = 'host0'
  718. # Host name or IP address to connect to for other pgpool 0
  719. # (change requires restart)
  720. #other_pgpool_port0 = 5432
  721. # Port number for othet pgpool 0
  722. # (change requires restart)
  723. #other_wd_port0 = 9000
  724. # Port number for othet watchdog 0
  725. # (change requires restart)
  726. #other_pgpool_hostname1 = 'host1'
  727. #other_pgpool_port1 = 5432
  728. #other_wd_port1 = 9000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement