[pgpool-general: 5390] Re: pgpool-II and JDBC pool

Tatsuo Ishii ishii at sraoss.co.jp
Sun Mar 26 11:38:23 JST 2017


> Hi there,
> at the moment, I am using pgpool-II as load balancer in master-slave mode
> with streaming replication with two postgres nodes. Pgpool is accessed by a
> java server application that use a JDBC pool in Payara (a Glassfish fork)
> application server.
> 
> During startup phase, the application execute about 1800 queries that are
> almost all readonly stored functions, but pgpool send queries almost
> exclusively toward primary node. This is the situation after some tries:
> 
> 
> 
> postgres at postgres=# show pool_nodes;
>  node_id |        hostname         | port  | status | lb_weight |  role   |
> select_cnt | load_balance_node | replication_delay
> ---------+-------------------------+-------+--------+-------
> ----+---------+------------+-------------------+-------------------
>  0       | citrix2.redevogames.com | 15004 | up     | 0.250000  | primary |
> 9520       | true              | 0
>  1       | 10.0.0.3                | 5997  | up     | 0.750000  | standby |
> 10         | false             | 0
>
> The question now is: is it a good idea to use a JDBC pool to connect to
> pgpgool or is it better without it?
> 
> 
> It can be other reason for this behavior of balancer?

There may be something which could explain this (for example
replication delay is too much). Can you show me the pgpool log, along
with log_per_node_statement = on?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list