mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Superuser specification: only overwrite values if specified.
This commit is contained in:
@@ -131,7 +131,7 @@ class Postgresql:
|
||||
def connection(self):
|
||||
if not self._connection or self._connection.closed != 0:
|
||||
r = parseurl('postgres://{}/postgres'.format(self.local_address))
|
||||
r['user'] = self.superuser['user']
|
||||
r.update(self.superuser)
|
||||
self._connection = psycopg2.connect(**r)
|
||||
self._connection.autocommit = True
|
||||
self.server_version = self._connection.server_version
|
||||
|
||||
Reference in New Issue
Block a user