diff options
author | Michael Paquier <michael@paquier.xyz> | 2018-07-07 08:10:10 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2018-07-07 08:10:10 +0900 |
commit | eb270b00b2d60e751545d4b808642395c901b668 (patch) | |
tree | b3ad9dcc273eaae60cd446398d2404d72552d8ad | |
parent | 2e78c5b522a91c7893decd92d6f5b31fef0027bd (diff) | |
download | postgresql-eb270b00b2d60e751545d4b808642395c901b668.tar.gz postgresql-eb270b00b2d60e751545d4b808642395c901b668.zip |
Add note in pg_rewind documentation about read-only files
When performing pg_rewind, the presence of a read-only file which is not
accessible for writes will cause a failure while processing. This can
cause the control file of the target data folder to be truncated,
causing it to not be reusable with a successive run.
Also, when pg_rewind fails mid-flight, there is likely no way to be able
to recover the target data folder anyway, in which case a new base
backup is the best option. A note is added in the documentation as
well about.
Reported-by: Christian H.
Author: Michael Paquier
Reviewed-by: Andrew Dunstan
Discussion: https://postgr.es/m/20180104200633.17004.16377%40wrigleys.postgresql.org
-rw-r--r-- | doc/src/sgml/ref/pg_rewind.sgml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index 520d843f0ec..ee35ce18b08 100644 --- a/doc/src/sgml/ref/pg_rewind.sgml +++ b/doc/src/sgml/ref/pg_rewind.sgml @@ -95,6 +95,26 @@ PostgreSQL documentation are currently on by default. <xref linkend="guc-full-page-writes"/> must also be set to <literal>on</literal>, but is enabled by default. </para> + + <warning> + <para> + If <application>pg_rewind</application> fails while processing, then + the data folder of the target is likely not in a state that can be + recovered. In such a case, taking a new fresh backup is recommended. + </para> + + <para> + <application>pg_rewind</application> will fail immediately if it finds + files it cannot write directly to. This can happen for example when + the source and the target server use the same file mapping for read-only + SSL keys and certificates. If such files are present on the target server + it is recommended to remove them before running + <application>pg_rewind</application>. After doing the rewind, some of + those files may have been copied from the source, in which case it may + be necessary to remove the data copied and restore back the set of links + used before the rewind. + </para> + </warning> </refsect1> <refsect1> |