Skip site navigation (1) Skip section navigation (2)

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Bjoern A(dot) Zeeb" <bzeeb-lists(at)lists(dot)zabbadoz(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: PGSTAT: bind(2): Can't assign requested address
Date: 2006-04-20 10:50:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Bjoern A. Zeeb wrote:
> On Fri, 7 Jun 2002, Bruce Momjian wrote:
> Hi,
> it's been some months so I left the fullquote attached.
> > Well, you are the first to report that doesn't work for stats.
> > Unless someone else has a problem, I think we will leave it unchanged.
> The last years this problem was disucced several times (mostly on
> FreeBSD lists) for the reason of FreeBSD jails. I thought that we
> had another mail in 2002 about that but couldn't find it anymore.
> Anyway binding to in a jail binds to the (usually public) IP
> address of that jail which means the stats socket is basically open to
> world (from the socket point of view).

Yes, but we need an interface that will drop packets on heavy load, and
a local IP is the only way we know to do that.

> Another problem (which is not a postgresql problem per se) is that if
> the system is built without inet6 support or does not support inet6
> (as in jails) but there is a ::1 localhost in /etc/hosts the error
> messages gives a warning like:
>  	could not create socket for statistics collector:
>  	Protocol not supported
> which sound annoying in first places until you find out that it worked
> anyway and remember what cuases the warning.

Yes, that is confusing.  The following patch adds a message after the

	trying another address for the statistics collector

which should help reduce confusion.  It will appear in 8.2.

> Is there any reason why you explicitly disallow a posix local socket
> at that point in backend/postmaster/pgstat.c:pgstat_init:
> ...
>          for (addr = addrs; addr; addr = addr->ai_next)
>          {
>                  /* Ignore AF_UNIX sockets, if any are returned. */
>                  if (addr->ai_family == AF_UNIX)
>                          continue;
> #endif
> ...
> Couldn't you use/allow (if possible or configured) a posix local socket
> or even use pipes for that?

Yes, because it can't drop packets, I think.

  Bruce Momjian

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2006-04-20 10:55:48
Subject: Re: NLS vs error processing, again
Previous:From: Bruce MomjianDate: 2006-04-20 09:45:14
Subject: Re: BUG #2401: spinlocks not available on amd64

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group