From c5a85ee11736a81abca0fa92e1a5955aef183227 Mon Sep 17 00:00:00 2001 From: Doug Aaser Date: Thu, 18 Jul 2019 13:42:52 +0000 Subject: [PATCH] Pg_rewind failure fix This commit fixes a small issue with Patroni where sometimes pg_rewind would fail due to limitations in Postgres 9.5. To combat pg_rewind failures, we can enable remove_data_directory_on_rewind_failure which will cleanup the data directory on the pod and recreates it as a replica so that the pod can restart from fresh, rather than churning in an error state. This commit also sets remove_data_directory_on_diverged_timelines to give Patroni a greater ability to combat timeline divergence errors. Change-Id: Ic9f75dbfa0dd990e2b215ed204e55cd67a5d1159 --- postgresql/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postgresql/values.yaml b/postgresql/values.yaml index 6ee4381eb..0d5c09585 100644 --- a/postgresql/values.yaml +++ b/postgresql/values.yaml @@ -291,6 +291,8 @@ conf: on_role_change: /tmp/set_password.sh on_start: /tmp/set_password.sh use_pg_rewind: true + remove_data_directory_on_rewind_failure: true + remove_data_directory_on_diverged_timelines: true parameters: archive_mode: 'off' datestyle: 'iso, mdy'