diff --git a/helpers/postgresql.py b/helpers/postgresql.py index c3870cb6..b0d2b8fd 100644 --- a/helpers/postgresql.py +++ b/helpers/postgresql.py @@ -38,7 +38,7 @@ class Postgresql: self.config = config self.connection_string = 'postgres://{username}:{password}@{listen}/postgres'.format( - listen=self.config['connection_address'], **self.replication) + listen=self.config['connect_address'], **self.replication) self.conn = None self.cursor_holder = None @@ -46,7 +46,7 @@ class Postgresql: def cursor(self): if not self.cursor_holder: - self.conn = psycopg2.connect('postgres://{}/postgres'.format(self.config['connection_address'])) + self.conn = psycopg2.connect('postgres://{}/postgres'.format(self.config['connect_address'])) self.conn.autocommit = True self.cursor_holder = self.conn.cursor() diff --git a/postgres0.yml b/postgres0.yml index 01116059..5f4262f9 100644 --- a/postgres0.yml +++ b/postgres0.yml @@ -6,7 +6,7 @@ etcd: postgresql: name: postgresql0 listen: 127.0.0.1:5432 - connection_address: 127.0.0.1:5432 + connect_address: 127.0.0.1:5432 data_dir: data/postgresql0 maximum_lag_on_failover: 1048576 # 1 megabyte in bytes replication: diff --git a/postgres1.yml b/postgres1.yml index d6296845..31a5dca3 100644 --- a/postgres1.yml +++ b/postgres1.yml @@ -6,7 +6,7 @@ etcd: postgresql: name: postgresql1 listen: 127.0.0.1:5433 - connection_address: 127.0.0.1:5433 + connect_address: 127.0.0.1:5433 data_dir: data/postgresql1 maximum_lag_on_failover: 1048576 # 1 megabyte in bytes replication: