Fix for [pgpool-II 0000165]: Performance degradation(x250) while using ipv6
authorMuhammad Usama <m.usama@gmail.com>
Fri, 29 Jan 2016 04:51:46 +0000 (09:51 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Fri, 29 Jan 2016 04:53:00 +0000 (09:53 +0500)
Missing TCP_NODELAY option for ipV6 socket was the reason.

src/protocol/child.c

index a6b936976b8b14998407746624adbf93c6cc6983..239b181e239250d079f2536e820cf83f8073bc98 100644 (file)
@@ -5,7 +5,7 @@
  * pgpool: a language independent connection pool server for PostgreSQL
  * written by Tatsuo Ishii
  *
- * Copyright (c) 2003-2015     PgPool Global Development Group
+ * Copyright (c) 2003-2016     PgPool Global Development Group
  *
  * Permission to use, copy, modify, and distribute this software and
  * its documentation for any purpose and without fee is hereby
@@ -2176,7 +2176,8 @@ get_connection(int front_end_fd, SockAddr *saddr)
 
     
        /* set NODELAY and KEEPALIVE options if INET connection */
-       if (saddr->addr.ss_family == AF_INET)
+       if (saddr->addr.ss_family == AF_INET ||
+               saddr->addr.ss_family == AF_INET6)
        {
                int on = 1;