[Pgpool-general] Listening on two specific addresses

Tatsuo Ishii ishii at sraoss.co.jp
Tue Sep 1 00:57:34 UTC 2009


You cannot bind more than one address to one socket.  You need to
create multiple sockets to listen to multiple addresses.
This has been already done in postmaster. So you can look into it if
you are interested in how to do that.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

> Yes, it should work with "*". In fact there are the next lines in code:
> 
>     static int create_inet_domain_socket(const char *hostname, const int
> port)
>     {
>         /* .... */
>         if (strcmp(hostname, "*")==0)
>         {
>             addr.sin_addr.s_addr = htonl(INADDR_ANY);
>         }
>         /* .... */
>        status = bind(fd, (struct sockaddr *)&addr, len);
>         /* .... */
> 
> What I don't see is how to bind many addresses to one socket...
> 
> 2009/8/31 Jaume Sabater <jsabater at gmail.com>
> 
> > On Mon, Aug 31, 2009 at 12:58 PM, Jaume Sabater<jsabater at gmail.com> wrote:
> >
> > > I am trying to use '*' as well, but pgpool-II does not want to start
> > > that way (although no one else is listening on port 9999 in that
> > > machine, and -d does not say anything useful).
> >
> > My fault. A developer had a custom process listening in one of the IP
> > addresses of the machine in port 9999.
> >
> > Still, any chances to get pgpool-II to listen on two or more specific
> > IP addresses?
> >
> > --
> > Jaume Sabater
> > http://linuxsilo.net/
> >
> > "Ubi sapientas ibi libertas"
> > _______________________________________________
> > Pgpool-general mailing list
> > Pgpool-general at pgfoundry.org
> > http://pgfoundry.org/mailman/listinfo/pgpool-general
> >


More information about the Pgpool-general mailing list