linkend="warm-standby">) standby servers, follow these steps to
upgrade them. You will not be running
pg_upgrade>
- on the standby servers, but rather
rsync>. Do not
- start any servers yet.
+ on the standby servers, but rather
rsync> on the
+ primary. Do not start any servers yet.
Install the same custom shared object files on the new standbys
- that you installed in the new master cluster.
+ that you installed in the new primary cluster.
- From a directory that is above the old and new database cluster
- directories, run this for each slave:
+ From a directory on the primary server that is above the old and
+ new database cluster directories, run this on the
+ primary> for each standby server:
rsync --archive --delete --hard-links --size-only old_pgdata new_pgdata remote_dir
where
- to the current directory, and
- above> the old and new cluster directories on
- the standby server. The old and new relative cluster paths
- must match on the master and standby server. Consult the
+ to the current directory on the primary, and
+ is above> the old and new cluster directories on
+ the standby. The old and new relative cluster paths
+ must match on the primary and standby server. Consult the
rsync> manual page for details on specifying the
remote directory, e.g. standbyhost:/opt/PostgreSQL/>.
-
rsync> will be fast when pg_upgrade>'s
-
- on the remote server rather than transferring user data.
- Unfortunately,
rsync> needlessly copies the
- files associated with temporary and unlogged tables.
+
+
+ What
rsync> does is to copy files from the
+ primary to the standby, and, if
pg_upgrade>'s
+
+ new clusters on the standby. It links the same files that
+
pg_upgrade> linked in the primary old and new
+ clusters. (Of course, linking speeds up
rsync>.)
+ Unfortunately,
rsync> needlessly copies files
+ associated with temporary and unlogged tables because these files
+ don't normally exist on standby servers.
Configure the servers for log shipping. (You do not need to run
pg_start_backup()> and pg_stop_backup()>
- or take a file system backup as the slaves are still synchronized
- with the master.)
+ or take a file system backup as the standbys are still synchronized
+ with the primary.)