Re: PGSTAT: bind(2): Can't assign requested address

From: "Bjoern A(dot) Zeeb" <bzeeb-lists(at)lists(dot)zabbadoz(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: PGSTAT: bind(2): Can't assign requested address
Date: 2006-04-05 15:28:10
Message-ID: 20060405150230.K76259@maildrop.int.zabbadoz.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 5 Apr 2006, Tom Lane wrote:

Hi,

> "Bjoern A. Zeeb" <bzeeb-lists(at)lists(dot)zabbadoz(dot)net> writes:
>> Is there any reason why you explicitly disallow a posix local socket
>> at that point in backend/postmaster/pgstat.c:pgstat_init:
>
> Because we want UDP, not a Unix socket.

what you are giving there as hints is

hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;

A datagram socket (SOCK_DGRAM) is called "UDP Socket" when it
assumes IP (AF_INET) or IPv6 (AF_INET6) as it's underlying
protocol.

But you can always use SOCK_DGRAM over AF_LOCAL.
Stevens gives some good reasons to do so, especially if both
peers are on the same host.

If there is no need for using the INET(6) protcotol familiy
(an I cannot see it as long as we stay on the same host)
you may really want to consider using posix local sockets.

Greetings
Bjoern

--
Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-04-05 15:35:39 Re: PGSTAT: bind(2): Can't assign requested address
Previous Message Tom Lane 2006-04-05 15:19:12 Re: contrib/intarray/_int_gist.c