patroni.git / summary / log / commit / refs

commit    60db8d6adb088ceaefc96b08fbbbea4e4fadfefb
Author:   Oleksii Kliukin <oleksii.kliukin@zalando.de>
Date:     Fri Apr 24 14:23:38 2015 +0000

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


helpers/postgresql.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers/postgresql.py b/helpers/postgresql.py index b6c52c19..ce6be64b 100644 --- a/helpers/postgresql.py +++ b/helpers/postgresql.py @@ -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): [parent: 772185728d63]