[Pgpool-hackers] First pcp command as PostgreSQL function
Tatsuo Ishii
ishii at sraoss.co.jp
Sat Apr 23 05:13:31 UTC 2011
> Found the bug.
>
> ===================cut here=============>
> *** pgpool-II/pcp/pcp.c 2011-04-22 20:32:09.818429545 +0200
> - --- pgpool-II.status/pcp/pcp.c 2011-04-22 23:43:15.588429544 +0200
> ***************
> *** 168,173 ****
> - --- 168,174 ----
> if (pcp_authorize(username, password) < 0)
> {
> pcp_close(pc);
> + pc = NULL;
> return -1;
> }
>
> <===================cut here=============
>
> I'm not really happy with the fix, but I found this kind of code in some
> other places and having something more elegant would probably require
> way much more refactoring.
Thanks. Your patches fixed the bug. Fix committed. However,
it seems pcp_node_info function has a problem:
test=# SELECT * FROM pcp_node_info(0, 'localhost', 10, 9898, 'postgres', 'pgpoolAdmin');
host | port | status | weight
------+------+-------------------+--------
/tmp | 5433 | Connection in use | 0
(1 row)
$ pcp_node_info 1 localhost 9898 postgres pgpoolAdmin 0
/tmp 5433 2 0.500000
Here the function shows the weight as 0 while pcp command shows as 0.5.
--
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-hackers
mailing list