[pgsql-jp: 30257] Re: PostgreSQL用コネクションプールサーバ pgpool

ISHIDA Akio iakio @ pjam.jpweb.net
2003年 6月 28日 (土) 14:31:22 JST


こんにちは。石田@苫小牧市です。
おもしろそうなので飛びついてしまいました。

Tatsuo Ishii <t-ishii @ sra.co.jp> wrote:
(2003/06/27 22:54)

> 石井です.
> 
> PHPをはじめ,Perlなど,言語を問わず使える「pgpool」というPostgreSQL用
> のコネクションプールサーバを作ったので公開します.できたてなのでまだア
> ルファ版程度のクォリティですが,よろしかったらお試し下さい.
> 
> ftp://ftp.sra.co.jp/pub/cmd/postgres/pgpool/pgpool-0.1.tar.gz

私のところでは、

$ psql
psql: could not send startup packet: Broken pipe

$ psql -h192.168.x.x
psql: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

となってしまったので、pgpool -n -d してみたところ、

ERROR: accept() failed. reason: Bad address
となっていました。

accept() の man を見てみたところ、
http://www.jp.freebsd.org/cgi/mroff.cgi?subdir=man&lc=1&cmd=&man=
accept&dir=jpman-5.1.0%2Fman&sect=0
| addrlen は、値と結果の引数です。これは最初は addr が指す空間のサイズ
| を含んでいなければなりません。
となっていたので、

$ diff -u child.c.org child.c
--- child.c.org Fri Jun 27 17:30:36 2003
+++ child.c     Sat Jun 28 14:14:13 2003
@@ -320,6 +320,7 @@
         * Note that some SysV systems do not work here. For those
         * systems, we need some locking mechanism for the fd.
         */
+       addrlen = sizeof(addr);
        afd = accept(fd, &addr, &addrlen);
        if (afd < 0)
        {

としてみたところ、一応つながるようになりました。

環境は、
=> select version();
                               version
---------------------------------------------------------------------
 PostgreSQL 7.3.2 on i386-unknown-freebsd4.4, compiled by GCC 2.95.3

です。

とりあえずまだそこまでしか確認してません。

--
ISHIDA Akio<iakio @ pjam.jpweb.net>




pgsql-jp メーリングリストの案内