Enforce synchronous_commit=local for post_init script (#1559)

Patroni was already doing that before creating users for a long time, but the post_init was an oversight. It will help to all utilities relying on libpq and reduce the end-user confusion.
This commit is contained in:
Alexander Kukushkin
2020-06-05 09:24:47 +02:00
committed by GitHub
parent c2a78ee652
commit 80ed08a2bb
+1
View File
@@ -130,6 +130,7 @@ class Bootstrap(object):
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['PGOPTIONS'] = '-c synchronous_commit=local'
try:
ret = self._postgresql.cancellable.call(shlex.split(cmd) + [connstring], env=env)