From caa078353ecd1f3b3681c0d4fa95ad4bb8c2308a Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 7 Oct 2019 09:07:22 +0900 Subject: Improve handling and coverage of --no-ensure-shutdown in pg_rewind This includes a couple of changes around the new behavior of pg_rewind which enforces recovery to happen once on a cluster not shut down cleanly: - Some comments and documentation improvements. - Shutdown the cluster to rewind with immediate mode in all the tests, this allows to check after the forced recovery behavior which is wanted as new default. - Use -F for the forced recovery step, so as postgres does not use fsync. This was useless as a final sync is done once the tool is done. Author: Michael Paquier Reviewed-by: Alexey Kondratov Discussion: https://postgr.es/m/20191004083721.GA1829@paquier.xyz --- doc/src/sgml/ref/pg_rewind.sgml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index fbf454803b5..42d29edd4e9 100644 --- a/doc/src/sgml/ref/pg_rewind.sgml +++ b/doc/src/sgml/ref/pg_rewind.sgml @@ -169,12 +169,14 @@ PostgreSQL documentation - pg_rewind verifies that the target server - is cleanly shutdown before rewinding; by default, if it isn't, it - starts the server in single-user mode to complete crash recovery. + pg_rewind requires that the target server + is cleanly shut down before rewinding. By default, if the target server + is not shut down cleanly, pg_rewind starts + the target server in single-user mode to complete crash recovery first, + and stops it. By passing this option, pg_rewind skips this and errors out immediately if the server is not cleanly shut - down. Users are expected to handle the situation themselves in that + down. Users are expected to handle the situation themselves in that case. -- cgit v1.2.3