From c9ab1f957a7f1836e29aca460c25f28a96b2b2af Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Fri, 16 Jan 2015 18:16:40 +0200 Subject: [PATCH] Use standard top-level sections in reference page. --- doc/src/sgml/ref/pg_rewind.sgml | 90 ++++++++++++++++----------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index 686cf2a0e2..4458ae0d56 100644 --- a/doc/src/sgml/ref/pg_rewind.sgml +++ b/doc/src/sgml/ref/pg_rewind.sgml @@ -107,9 +107,9 @@ PostgreSQL documentation - Specifies a source data directory to synchronize the target with. - When @@ -183,54 +183,54 @@ PostgreSQL documentation - Theory of operation - - - The basic idea is to copy everything from the new cluster to the old - cluster, except for the blocks that we know to be the same. - - - - - - Scan the WAL log of the old cluster, starting from the last checkpoint - before the point where the new cluster's timeline history forked off - from the old cluster. For each WAL record, make a note of the data - blocks that were touched. This yields a list of all the data blocks - that were changed in the old cluster, after the new cluster forked off. - - - - - Copy all those changed blocks from the new cluster to the old cluster. - - - - - Copy all other files like clog, conf files etc. from the new cluster - to old cluster. Everything except the relation files. - - - - - Apply the WAL from the new cluster, starting from the checkpoint - created at failover. (Strictly speaking, pg_rewind - doesn't apply the WAL, it just creates a backup label file indicating - that when PostgreSQL is started, it will start replay - from that checkpoint and apply all the required WAL.) - - - - - - - Restrictions + Notes pg_rewind requires that the wal_log_hints option is enabled in postgresql.conf, or that data checksums were enabled when the cluster was initialized with initdb. + + + How it works + + + The basic idea is to copy everything from the new cluster to the old + cluster, except for the blocks that we know to be the same. + + + + + + Scan the WAL log of the old cluster, starting from the last checkpoint + before the point where the new cluster's timeline history forked off + from the old cluster. For each WAL record, make a note of the data + blocks that were touched. This yields a list of all the data blocks + that were changed in the old cluster, after the new cluster forked off. + + + + + Copy all those changed blocks from the new cluster to the old cluster. + + + + + Copy all other files like clog, conf files etc. from the new cluster + to old cluster. Everything except the relation files. + + + + + Apply the WAL from the new cluster, starting from the checkpoint + created at failover. (Strictly speaking, pg_rewind + doesn't apply the WAL, it just creates a backup label file indicating + that when PostgreSQL is started, it will start replay + from that checkpoint and apply all the required WAL.) + + + + -- 2.39.5