diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 10c842adb14..9877f2f01c6 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -939,6 +939,104 @@ psql --username=postgres --file=script.sql postgres
+
+ Environment
+
+
+ Some environment variables can be used to provide defaults for command-line options:
+
+
+
+ PGBINOLD
+
+
+
+ The old PostgreSQL executable directory; option
+ /.
+
+
+
+
+
+ PGBINNEW
+
+
+
+ The new PostgreSQL executable directory; option
+ /.
+
+
+
+
+
+ PGDATAOLD
+
+
+
+ The old database cluster configuration directory; option
+ /.
+
+
+
+
+
+ PGDATANEW
+
+
+
+ The new database cluster configuration directory; option
+ /.
+
+
+
+
+
+ PGPORTOLD
+
+
+
+ The old cluster port number; option
+ /.
+
+
+
+
+
+ PGPORTNEW
+
+
+
+ The new cluster port number; option
+ /.
+
+
+
+
+
+ PGSOCKETDIR
+
+
+
+ Directory to use for postmaster sockets during upgrade; option
+ /.
+
+
+
+
+
+ PGUSER
+
+
+
+ Cluster's install user name; option
+ /.
+
+
+
+
+
+
+
Notes