Allow connections to the host's own IP address from the host itself.

This commit is contained in:
Oleksii Kliukin
2015-04-24 16:23:38 +02:00
parent 772185728d
commit 60db8d6adb
+2
View File
@@ -146,6 +146,8 @@ class Postgresql:
f = open("%s/pg_hba.conf" % self.data_dir, "a")
f.write("host replication %(username)s %(network)s md5" %
{"username": self.replication["username"], "network": self.replication["network"]})
# allow TCP connections from the host's own address
f.write("\nhost postgres postgres %(network)s/32 trust\n" % {"network": self.host})
f.close()
def write_recovery_conf(self, leader_hash):