Call a checkpoint on master before pg_rewind.
Call a checkpoint on master before pg_rewind.

PostgreSQL does not run a checkpoint during promition.
Since pg_rewind relies on the last checkpoint to get the timeline,
there is a short race condition right after the promotion, when
it can get the timeline wrong and fail. We work around this by
calling the checkpoint manually.

Make sure our test configuration does both archive and recovery.

zalando/patroni,pgexperts/patroni,zalando/patroni,pgexperts/patroni