mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Merge pull request #131 from zalando/bugfix/superuser_username
Bugfix/superuser username
This commit is contained in:
@@ -132,6 +132,8 @@ class Postgresql:
|
||||
if not self._connection or self._connection.closed != 0:
|
||||
r = parseurl('postgres://{}/postgres'.format(self.local_address))
|
||||
r.update(self.superuser)
|
||||
if r.get('username'):
|
||||
r['user'] = r['username']
|
||||
self._connection = psycopg2.connect(**r)
|
||||
self._connection.autocommit = True
|
||||
self.server_version = self._connection.server_version
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ postgresql:
|
||||
password: rep-pass
|
||||
network: 127.0.0.1/32
|
||||
superuser:
|
||||
user: postgres
|
||||
username: postgres
|
||||
password: zalando
|
||||
admin:
|
||||
username: admin
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ postgresql:
|
||||
password: rep-pass
|
||||
network: 127.0.0.1/32
|
||||
superuser:
|
||||
user: postgres
|
||||
username: postgres
|
||||
password: zalando
|
||||
admin:
|
||||
username: admin
|
||||
|
||||
Reference in New Issue
Block a user