[Pgpool-general] Setting up connections config for load-balancing
Tatsuo Ishii
ishii at sraoss.co.jp
Thu Aug 12 23:51:51 UTC 2010
> > Any suggestions on how I can troubleshoot this? Very little diagnostic
> > data from pgpool appears to be available.
>
> More on this: PCP thinks that node 1 is down:
>
> pcp_node_info 10 localhost 9898 postgres postgres 1
> db3 5432 3 1431655764.666667
>
> I don't know how it got this idea. There isn't anything in the
> configuration to suggest it, and connecting to node1 via psql from the
> pgpool host works fine.
Sure. pgpool disconnects "unhealthy" DB node (in this case node 1) and
continues to work on.
> Do I have to run pcp_attach_node every time I
> restart pgpool?
No. I suspect bogus pgpool_status file is remained. Try:
Shudtown pgpool
Remove pgpool_status
Start pgpool
I recommend this time starting pgpool with -d (debug) option and see
everything is fine.
> Also, those weighting numbers are *very* odd, though. What's up with
> that? Is that maybe the cause of no queries going to db3?
This is normal. The value you see is the normalized value. From the
comment in pool_config.l:
/*
* Normalize load balacing weights. What we are doing here is,
* assign 0 to RAND_MAX to each backend's weight according to the
* value weightN. For example, if two backends are assigned 1.0,
* then each backend will get RAND_MAX/2 normalized weight.
*/
--
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