From 41f5b2cec2e065b8a9ed9245c5338772ad7e77d8 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 14 Dec 2017 15:44:06 -0500 Subject: [PATCH] All clusters in the documentation are initialized with checksums. --- doc/xml/release.xml | 4 ++ doc/xml/user-guide.xml | 144 ++++++++++++++++++++--------------------- 2 files changed, 76 insertions(+), 72 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 86ee75f03..cb56e2079 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -95,6 +95,10 @@

Document the relationship between the archive-copy and archive-check options.

+ +

All clusters in the documentation are initialized with checksums.

+
+

Improve archive-copy reference documentation.

diff --git a/doc/xml/user-guide.xml b/doc/xml/user-guide.xml index dbc67b34e..4b714d314 100644 --- a/doc/xml/user-guide.xml +++ b/doc/xml/user-guide.xml @@ -23,6 +23,12 @@ 9.5 9.6 + /usr/lib/postgresql/{[pg-version]}/bin + /usr/pgsql-{[pg-version]}/bin + + /usr/lib/postgresql/{[pg-version-upgrade]}/bin + /usr/pgsql-{[pg-version-upgrade]}/bin + /home/postgres /usr/share/perl5 @@ -112,7 +118,6 @@ service postgresql-{[pg-version]} initdb pg_createcluster {[pg-version-upgrade]} {[postgres-cluster-demo]} - service postgresql-{[pg-version-upgrade]} initdb pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} start service postgresql-{[pg-version]} start @@ -456,12 +461,13 @@ Create the demo cluster - + - /usr/lib/postgresql/{[pg-version]}/bin/initdb + {[pg-bin-path]}/initdb -D {[db-path]} -k -A peer - + + {[db-cluster-create]} @@ -1972,16 +1978,6 @@ postgres postgres - -

The demo cluster must be created even though it will be overwritten later.

- - - Create demo cluster - - - {[db-cluster-create]} - - @@ -2003,13 +1999,6 @@

A hot standby performs replication using the WAL archive and allows read-only queries.

- - Set options - - '' - 'postgresql.log' - -

configuration is very similar to db-primary except that the standby_mode setting will be enabled to keep the cluster in recovery mode when the end of the WAL stream has been reached.

@@ -2025,15 +2014,41 @@ n +

The demo cluster must be created (even though it will be overwritten restore) in order to create the configuration files.

+ + + Create demo cluster + + + {[db-cluster-create]} + + + +

Create the path where will be restored.

+ + + Create <postgres/> path + + + + mkdir -p -m 700 {[db-path]} + + + +

Now the standby can be created with the restore command.

Restore the {[postgres-cluster-demo]} standby cluster - + {[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta restore + + {[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} restore + + cat {[postgres-recovery-demo]} @@ -2044,9 +2059,11 @@

The hot_standby setting must be enabled before starting to allow read-only connections on db-standby. Otherwise, connection attempts will be refused.

- Enable <pg-option>hot_standby</pg-option> + Enable <pg-option>hot_standby</pg-option> and configure logging on + 'postgresql.log' + '' @@ -2180,22 +2197,6 @@
- -

The standby needs to know how to contact the primary so the primary_conninfo setting will be configured in .

@@ -2342,41 +2343,29 @@ Upgrading <postgres/> -

The following instructions are not meant to be a comprehensive guide for upgrading , rather they will outline the general process for upgrading a primary and standby with the intent of demonstrating the steps required to reconfigure . It is recommended that a backup be taken prior to upgrading.

+

The following instructions are not meant to be a comprehensive guide for upgrading , rather they outline the general process for upgrading a primary and standby with the intent of demonstrating the steps required to reconfigure . It is recommended that a backup be taken prior to upgrading.

- Install new <postgres/> version + Stop old cluster and install new <postgres/> version + + + {[db-cluster-stop]} + {[postgres-install-upgrade]} -y - -

Create the new cluster. If the install creates a default cluster, then remove it to avoid confusion.

- - - Drop default cluster and create the new demo cluster - - + pg_dropcluster {[pg-version-upgrade]} main - - - - /usr/lib/postgresql/{[pg-version-upgrade]}/bin/initdb - -D {[db-path-upgrade]} -k -A peer - - - - {[db-cluster-create-upgrade]} - -

Stop the old cluster on the standby since it will be restored from the newly upgraded cluster to ensure the database system id is identical on both the primary and standby.

+

Stop the old cluster on the standby since it will be restored from the newly upgraded cluster.

- Stop old cluster and drop default cluster if created + Stop old cluster and install new <postgres/> version {[db-cluster-stop]} @@ -2387,18 +2376,25 @@ -y - + pg_dropcluster {[pg-version-upgrade]} main -

Stop the old cluster on the primary and perform the upgrade.

+

Create the new cluster and perform upgrade.

- Stop old cluster and perform the upgrade + Create new cluster and perform the upgrade - - {[db-cluster-stop]} + + + {[pg-bin-upgrade-path]}/initdb + -D {[db-path-upgrade]} -k -A peer + + + + + {[db-cluster-create-upgrade]} @@ -2527,7 +2523,7 @@

Install the new binaries on the standby and create the cluster.

- Remove old cluster and initialize new one + Remove old cluster and create the new cluster pg_dropcluster {[pg-version]} {[postgres-cluster-demo]} @@ -2537,18 +2533,18 @@ rm -rf {[db-path]} - + - /usr/lib/postgresql/{[pg-version-upgrade]}/bin/initdb - -D {[db-path-upgrade]} -k -A peer + mkdir -p -m 700 {[pg-bin-upgrade-path]} + - + {[db-cluster-create-upgrade]} -

Run the check on the backup host. The warning regarding the standby being down is expected since the standby cluster is down. Running this command demostrates that the backup server is aware of the standby and is confirgured properly for the primary server.

+

Run the check on the backup host. The warning regarding the standby being down is expected since the standby cluster is down. Running this command demonstrates that the backup server is aware of the standby and is configured properly for the primary server.

Check configuration @@ -2571,9 +2567,13 @@ Restore the {[postgres-cluster-demo]} standby cluster - + {[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta restore + + + {[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} restore +