Run CHECKPOINT before calling shutdown.
Run CHECKPOINT before calling shutdown.

In addition, restart is now performed as stop/start,
which would allow it to benefit from the shutdown speedup.

The hooks in start/stop are modified in order not to run
when called as a part of restart.

zalando/patroni,zalando/patroni,pgexperts/patroni,sean-/patroni,pgexperts/patroni,sean-/patroni