From 61bf412ac6a5c9f87881699c7c69cf09595bc415 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 16 Dec 2020 17:33:44 +0100 Subject: [PATCH] Fix bug in the post_bootstrap method() (#1795) The config.write_pgpass(r) should be called unconditionally, no matter whether the password defined in the config or not. Close https://github.com/zalando/patroni/issues/1727 --- patroni/postgresql/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/postgresql/bootstrap.py b/patroni/postgresql/bootstrap.py index f58c8a81..ca72fc59 100644 --- a/patroni/postgresql/bootstrap.py +++ b/patroni/postgresql/bootstrap.py @@ -130,7 +130,7 @@ class Bootstrap(object): # (pghost empty or the default socket directory) connections coming from the local machine. r['host'] = 'localhost' # set it to localhost to write into pgpass - env = self._postgresql.config.write_pgpass(r) if 'password' in r else None + env = self._postgresql.config.write_pgpass(r) env['PGOPTIONS'] = '-c synchronous_commit=local' try: