]> granicus.if.org Git - postgresql/commitdiff
Un-break things on IPv6-less platforms.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Mar 2017 17:17:56 +0000 (12:17 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 10 Mar 2017 17:17:56 +0000 (12:17 -0500)
Commit be37c2120 forgot to teach initdb about commenting out the IPv6
replication entry that it caused to exist in pg_hba.conf.sample.
Per buildfarm.

src/bin/initdb/initdb.c

index 8bca635a3bc1c5893377bd3d65a254c0e1a1a746..3f836efc20fcaa458fc13d25e38b8edfc4cebad3 100644 (file)
@@ -1213,15 +1213,23 @@ setup_config(void)
 
                if (err != 0 ||
                        getaddrinfo("::1", NULL, &hints, &gai_result) != 0)
+               {
                        conflines = replace_token(conflines,
                                                           "host    all             all             ::1",
                                                         "#host    all             all             ::1");
+                       conflines = replace_token(conflines,
+                                                          "host    replication     all             ::1",
+                                                        "#host    replication     all             ::1");
+               }
        }
 #else                                                  /* !HAVE_IPV6 */
        /* If we didn't compile IPV6 support at all, always comment it out */
        conflines = replace_token(conflines,
                                                          "host    all             all             ::1",
                                                          "#host    all             all             ::1");
+       conflines = replace_token(conflines,
+                                                         "host    replication     all             ::1",
+                                                         "#host    replication     all             ::1");
 #endif   /* HAVE_IPV6 */
 
        /* Replace default authentication methods */