On Wed, Jul 02, 2003 at 08:35:00PM +0200, Kurt Roeckx 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.
> 
> 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.
> 

Oops typo, fixed in new attachment.


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:51:08 -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_ADDRCONFIG;
        hints.ai_family = PF_UNSPEC;
        hints.ai_socktype = SOCK_DGRAM;
        hints.ai_protocol = 0;
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to