Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument
От | Kurt Roeckx |
---|---|
Тема | Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument |
Дата | |
Msg-id | 20030706163004.GA25464@ping.be обсуждение исходный текст |
Ответ на | Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument (qhwt@myrealbox.com) |
Ответы |
Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument
|
Список | pgsql-hackers |
On Mon, Jul 07, 2003 at 12:38:57AM +0900, qhwt@myrealbox.com wrote: > > On Wed, Jul 02, 2003 at 03:49:19PM +0900, Kenji Sugita wrote: > > It seems that a value of addr->ai_socktype returned by getaddrinfo in > > pg_stat.c is not SOCK_DGRAM. > > Please try the following untested patch: [...] > + for (; addr != NULL; addr = addr->ai_next) > + if ((pgStatSock = socket(addr->ai_family, > + addr->ai_socktype, addr->ai_protocol)) >= 0) > + break; This will break. You should use a pointer to the addr, and go over the list using that. freeaddrinfo() needs to have the original addr back. He seems to have 2 problems: - On Mac OS X getaddrinfo() returns something it shouldn't. A patch like that could fix it. - On Linux Redhat 6.2 (and 6.0) getaddrinfo() seems to have a problem with AI_ADDRCONFIG. Which is also used in StreamServerPort(). So he won't be able to listen to any socket there either. Not being able to use AI_ADDRCONFIG is rather annoying, but I guess if we just try all the returned addresses until 1 works will have to do. Try the attached patch instead. Kurt
Вложения
В списке pgsql-hackers по дате отправления: