Skip to content

Commit 4ac7635

Browse files
committed
doc: pg_upgrade: use dynamic new cluster major version numbers
Also update docs to use more recent old version numbers Reported-by: mark.a.sloan@gmail.com Discussion: https://postgr.es/m/169506804412.3727336.8571753495127355296@wrigleys.postgresql.org Backpatch-through: 16
1 parent 608ccdb commit 4ac7635

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/src/sgml/ref/pgupgrade.sgml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ PostgreSQL documentation
4040
<application>pg_upgrade</application> (formerly called <application>pg_migrator</application>) allows data
4141
stored in <productname>PostgreSQL</productname> data files to be upgraded to a later <productname>PostgreSQL</productname>
4242
major version without the data dump/restore typically required for
43-
major version upgrades, e.g., from 9.5.8 to 9.6.4 or from 10.7 to 11.2.
44-
It is not required for minor version upgrades, e.g., from 9.6.2 to 9.6.3
45-
or from 10.1 to 10.2.
43+
major version upgrades, e.g., from 12.14 to 13.10 or from 14.9 to 15.5.
44+
It is not required for minor version upgrades, e.g., from 12.7 to 12.8
45+
or from 14.1 to 14.5.
4646
</para>
4747

4848
<para>
@@ -367,14 +367,14 @@ make prefix=/usr/local/pgsql.new install
367367
Make sure both database servers are stopped using, on Unix, e.g.:
368368

369369
<programlisting>
370-
pg_ctl -D /opt/PostgreSQL/9.6 stop
370+
pg_ctl -D /opt/PostgreSQL/12 stop
371371
pg_ctl -D /opt/PostgreSQL/&majorversion; stop
372372
</programlisting>
373373

374374
or on Windows, using the proper service names:
375375

376376
<programlisting>
377-
NET STOP postgresql-9.6
377+
NET STOP postgresql-12
378378
NET STOP postgresql-&majorversion;
379379
</programlisting>
380380
</para>
@@ -448,9 +448,9 @@ SET PATH=%PATH%;C:\Program Files\PostgreSQL\&majorversion;\bin;
448448

449449
<programlisting>
450450
pg_upgrade.exe
451-
--old-datadir "C:/Program Files/PostgreSQL/9.6/data"
451+
--old-datadir "C:/Program Files/PostgreSQL/12/data"
452452
--new-datadir "C:/Program Files/PostgreSQL/&majorversion;/data"
453-
--old-bindir "C:/Program Files/PostgreSQL/9.6/bin"
453+
--old-bindir "C:/Program Files/PostgreSQL/12/bin"
454454
--new-bindir "C:/Program Files/PostgreSQL/&majorversion;/bin"
455455
</programlisting>
456456

@@ -580,8 +580,8 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive old_cluster
580580
remote directory, e.g.,
581581

582582
<programlisting>
583-
rsync --archive --delete --hard-links --size-only --no-inc-recursive /opt/PostgreSQL/9.5 \
584-
/opt/PostgreSQL/9.6 standby.example.com:/opt/PostgreSQL
583+
rsync --archive --delete --hard-links --size-only --no-inc-recursive /opt/PostgreSQL/12 \
584+
/opt/PostgreSQL/&majorversion; standby.example.com:/opt/PostgreSQL
585585
</programlisting>
586586

587587
You can verify what the command will do using
@@ -610,8 +610,8 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive /opt/Postgr
610610
<application>rsync</application> command for each tablespace directory, e.g.:
611611

612612
<programlisting>
613-
rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tblsp/PG_9.5_201510051 \
614-
/vol1/pg_tblsp/PG_9.6_201608131 standby.example.com:/vol1/pg_tblsp
613+
rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tblsp/PG_12_201909212 \
614+
/vol1/pg_tblsp/PG_&majorversion;_202307071 standby.example.com:/vol1/pg_tblsp
615615
</programlisting>
616616

617617
If you have relocated <filename>pg_wal</filename> outside the data

0 commit comments

Comments
 (0)