Have pg_rewind run crash recovery before rewinding
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 27 Sep 2019 19:40:01 +0000 (16:40 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 27 Sep 2019 19:40:01 +0000 (16:40 -0300)
commit5adafaf176d09ba5ea11ae128416fc5211469bc0
tree52edf9e0971547c6b382691d8f09d3168dd607ff
parentc967e13f4047ef6f3d91bcb1cff6d746322aff6d
Have pg_rewind run crash recovery before rewinding

If we don't do this, the rewind fails if the server wasn't cleanly shut
down, which seems unhelpful serving no purpose.

Also provide a new option --no-ensure-shutdown to suppress this
behavior, for alleged advanced usage that prefers to avoid the crash
recovery.

Authors: Paul Guo, Jimmy Yih, Ashwin Agrawal
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/CAEET0ZEffUkXc48pg2iqARQgGRYDiiVxDu+yYek_bTwJF+q=Uw@mail.gmail.com
doc/src/sgml/ref/pg_rewind.sgml
src/bin/pg_rewind/pg_rewind.c