[pgpool-general: 577] Re: Load balancing does not work
Tatsuo Ishii
ishii at postgresql.org
Fri Jun 1 07:44:33 JST 2012
> I am trying to load balance with pgpool (3.1.1-1) over two DB nodes
> (PostgreSQL 9.0): 1 master & 1 slave, configured for streaming replication.
>
> The thing is that all the queries are going to the master node. I
> created a simple shell script in order to simulate dozens of connections
> querying simultaneously in a loop, then disconnecting, connecting again,
> querying, etc., but there's no query sent to the slave node at all.
>
> At the same time, when browsing through pgpoolAdmin, queries like
> "SELECT pg_is_in_recovery()", and "SELECT * FROM pg_settings" are
> arriving successfully on both places, so there's no connection issue
> involved.
>
> I have even set the weight to 0 for the master:
>
> backend_weight0 = 0
> backend_weight1 = 1
>
> But still, every query is sent there and not on the slave.
>
> Any thoughts why load balancing is not working in that case?
For SELECT pg_is_in_recovery() itself, there's no reason not to load
balance. Maybe delay_threshold?
For SELECT * FROM pg_settings, it is not load balanced since it is
accessing system catalog.
--
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