aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-12-01 15:45:11 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-12-01 15:45:11 -0500
commit2d34ad84303181111c6f0747186857ff50106267 (patch)
tree035be13102bd111bf96f5d1e4feb4f1251e48cea /doc/src
parent7d4524aed3a4720086b2914ec22f1bbbc857ac44 (diff)
downloadpostgresql-2d34ad84303181111c6f0747186857ff50106267.tar.gz
postgresql-2d34ad84303181111c6f0747186857ff50106267.zip
Add a --socketdir option to pg_upgrade.
This allows control of the directory in which the postmaster sockets are created for the temporary postmasters started by pg_upgrade. The default location remains the current working directory, which is typically fine, but if it is deeply nested then its pathname might be too long to be a socket name. In passing, clean up some messiness in pg_upgrade's option handling, particularly the confusing and undocumented way that configuration-only datadirs were handled. And fix check_required_directory's substantially under-baked cleanup of directory pathnames. Daniel Gustafsson, reviewed by Hironobu Suzuki, some code cleanup by me Discussion: https://postgr.es/m/E72DD5C3-2268-48A5-A907-ED4B34BEC223@yesql.se
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/pgupgrade.sgml36
1 files changed, 31 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 978fa252e40..7e1afaf0a50 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -164,6 +164,14 @@
</varlistentry>
<varlistentry>
+ <term><option>-s</option> <replaceable>dir</replaceable></term>
+ <term><option>--socketdir=</option><replaceable>dir</replaceable></term>
+ <listitem><para>directory to use for postmaster sockets during upgrade;
+ default is current working directory; environment
+ variable <envar>PGSOCKETDIR</envar></para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-U</option> <replaceable>username</replaceable></term>
<term><option>--username=</option><replaceable>username</replaceable></term>
<listitem><para>cluster's install user name; environment
@@ -709,11 +717,21 @@ psql --username=postgres --file=script.sql postgres
<title>Notes</title>
<para>
- <application>pg_upgrade</application> does not support upgrading of databases
- containing table columns using these <type>reg*</type> OID-referencing system data types:
- <type>regproc</type>, <type>regprocedure</type>, <type>regoper</type>,
- <type>regoperator</type>, <type>regconfig</type>, and
- <type>regdictionary</type>. (<type>regtype</type> can be upgraded.)
+ <application>pg_upgrade</application> creates various working files, such
+ as schema dumps, in the current working directory. For security, be sure
+ that that directory is not readable or writable by any other users.
+ </para>
+
+ <para>
+ <application>pg_upgrade</application> launches short-lived postmasters in
+ the old and new data directories. Temporary Unix socket files for
+ communication with these postmasters are, by default, made in the current
+ working directory. In some situations the path name for the current
+ directory might be too long to be a valid socket name. In that case you
+ can use the <option>-s</option> option to put the socket files in some
+ directory with a shorter path name. For security, be sure that that
+ directory is not readable or writable by any other users.
+ (This is not relevant on Windows.)
</para>
<para>
@@ -733,6 +751,14 @@ psql --username=postgres --file=script.sql postgres
</para>
<para>
+ <application>pg_upgrade</application> does not support upgrading of databases
+ containing table columns using these <type>reg*</type> OID-referencing system data types:
+ <type>regproc</type>, <type>regprocedure</type>, <type>regoper</type>,
+ <type>regoperator</type>, <type>regconfig</type>, and
+ <type>regdictionary</type>. (<type>regtype</type> can be upgraded.)
+ </para>
+
+ <para>
If you are upgrading a pre-<productname>PostgreSQL</productname> 9.2 cluster
that uses a configuration-file-only directory, you must pass the
real data directory location to <application>pg_upgrade</application>, and