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.

What do you base this on?

My guess is that it returns an ipv6 address while you do not have
IPv6 support in the kernel.  If that is the case, the attached
patch should fix it.



Kurt

Index: src/backend/postmaster/pgstat.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/postmaster/pgstat.c,v
retrieving revision 1.37
diff -u -r1.37 pgstat.c
--- src/backend/postmaster/pgstat.c     12 Jun 2003 07:36:51 -0000      1.37
+++ src/backend/postmaster/pgstat.c     2 Jul 2003 18:34:30 -0000
@@ -179,7 +179,7 @@
        /*
         * Create the UDP socket for sending and receiving statistic messages
         */
-       hints.ai_flags = AI_PASSIVE;
+       hints.ai_flags = AI_PASSIVE | AI_ADDRCONF;
        hints.ai_family = PF_UNSPEC;
        hints.ai_socktype = SOCK_DGRAM;
        hints.ai_protocol = 0;
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to