diff options
Diffstat (limited to 'doc/src/sgml')
| -rw-r--r-- | doc/src/sgml/environ.sgml | 23 | ||||
| -rw-r--r-- | doc/src/sgml/libpq++.sgml | 9 | ||||
| -rw-r--r-- | doc/src/sgml/libpq.sgml | 28 | ||||
| -rw-r--r-- | doc/src/sgml/ref/createdb.sgml | 14 | ||||
| -rw-r--r-- | doc/src/sgml/ref/createlang.sgml | 14 | ||||
| -rw-r--r-- | doc/src/sgml/ref/createuser.sgml | 14 | ||||
| -rw-r--r-- | doc/src/sgml/ref/dropdb.sgml | 14 | ||||
| -rw-r--r-- | doc/src/sgml/ref/droplang.sgml | 14 | ||||
| -rw-r--r-- | doc/src/sgml/ref/dropuser.sgml | 14 | ||||
| -rw-r--r-- | doc/src/sgml/ref/pg_dump.sgml | 21 | ||||
| -rw-r--r-- | doc/src/sgml/ref/pg_dumpall.sgml | 19 | ||||
| -rw-r--r-- | doc/src/sgml/ref/postmaster.sgml | 65 | ||||
| -rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 15 | ||||
| -rw-r--r-- | doc/src/sgml/ref/vacuumdb.sgml | 14 | ||||
| -rw-r--r-- | doc/src/sgml/start.sgml | 6 |
15 files changed, 254 insertions, 30 deletions
diff --git a/doc/src/sgml/environ.sgml b/doc/src/sgml/environ.sgml index dc5741a95d8..830502a696d 100644 --- a/doc/src/sgml/environ.sgml +++ b/doc/src/sgml/environ.sgml @@ -47,16 +47,17 @@ $ export PATH </Para> <Para> -If your site administrator has not set things up in the -default way, you may have some more work to do. For example, if the database - server machine is a remote machine, you -will need to set the <Acronym>PGHOST</Acronym> environment variable to the name -of the database server machine. The environment variable -<Acronym>PGPORT</Acronym> may also have to be set. The bottom line is this: if -you try to start an application program and it complains -that it cannot connect to the <Application>postmaster</Application>, - you should immediately consult your site administrator to make sure that your -environment is properly set up. -</Para> + +If your site administrator has not set things up in the default way, +you may have some more work to do. For example, if the database server +machine is a remote machine, you will need to set the +<Acronym>PGHOST</Acronym> environment variable to the name of the +database server machine. The environment variable +<Acronym>PGPORT</Acronym> or <envar>PGUNIXSOCKET</envar> may also have +to be set. The bottom line is this: if you try to start an application +program and it complains that it cannot connect to the +<Application>postmaster</Application>, you should immediately consult +your site administrator to make sure that your environment is properly +set up. </Para> </Chapter> diff --git a/doc/src/sgml/libpq++.sgml b/doc/src/sgml/libpq++.sgml index 44f7f97dcd6..a3b045e219c 100644 --- a/doc/src/sgml/libpq++.sgml +++ b/doc/src/sgml/libpq++.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.17 2000/09/29 20:21:34 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.18 2000/11/13 15:18:07 momjian Exp $ --> <chapter id="libpqplusplus"> @@ -93,6 +93,13 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.17 2000/09/29 20:21: </listitem> <listitem> <para> + <envar>PGUNIXSOCKET</envar> sets the full Unix domain socket + file name for communicating with the <productname>Postgres</productname> + backend. + </para> + </listitem> + <listitem> + <para> <envar>PGDATABASE</envar> sets the default <productname>Postgres</productname> database name. </para> diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index a23ef89546a..d9b96b86200 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.44 2000/10/17 14:27:50 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.45 2000/11/13 15:18:07 momjian Exp $ --> <chapter id="libpq-chapter"> @@ -134,6 +134,15 @@ PGconn *PQconnectdb(const char *conninfo) </varlistentry> <varlistentry> + <term><literal>unixsocket</literal></term> + <listitem> + <para> + Full path to Unix-domain socket file to connect to at the server host. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><literal>dbname</literal></term> <listitem> <para> @@ -556,6 +565,16 @@ char *PQport(const PGconn *conn) <listitem> <para> +<function>PQunixsocket</function> + Returns the name of the Unix-domain socket of the connection. +<synopsis> +char *PQunixsocket(const PGconn *conn) +</synopsis> +</para> +</listitem> + +<listitem> +<para> <function>PQtty</function> Returns the debug tty of the connection. <synopsis> @@ -1832,6 +1851,13 @@ backend. </listitem> <listitem> <para> +<envar>PGPORT</envar> sets the default port or local Unix domain socket +file extension for communicating with the <productname>Postgres</productname> +backend. +</para> +</listitem> +<listitem> +<para> <envar>PGDATABASE</envar> sets the default <productname>Postgres</productname> database name. </para> diff --git a/doc/src/sgml/ref/createdb.sgml b/doc/src/sgml/ref/createdb.sgml index 3d1aca17bbe..d5199e307aa 100644 --- a/doc/src/sgml/ref/createdb.sgml +++ b/doc/src/sgml/ref/createdb.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.11 2000/11/11 23:01:38 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.12 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -56,6 +56,18 @@ Postgres documentation </listitem> </varlistentry> + <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>-U, --username <replaceable class="parameter">username</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/createlang.sgml b/doc/src/sgml/ref/createlang.sgml index f7c0540eac2..0258646ad7a 100644 --- a/doc/src/sgml/ref/createlang.sgml +++ b/doc/src/sgml/ref/createlang.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.10 2000/11/11 23:01:38 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.11 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -101,6 +101,18 @@ Postgres documentation </listitem> </varlistentry> + <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>-U, --username <replaceable class="parameter">username</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/createuser.sgml b/doc/src/sgml/ref/createuser.sgml index 5f3db581597..9845fcba1e5 100644 --- a/doc/src/sgml/ref/createuser.sgml +++ b/doc/src/sgml/ref/createuser.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.10 2000/11/11 23:01:40 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.11 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -55,6 +55,18 @@ Postgres documentation </listitem> </varlistentry> + <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>-e, --echo</term> <listitem> diff --git a/doc/src/sgml/ref/dropdb.sgml b/doc/src/sgml/ref/dropdb.sgml index 5e28c4d528d..c265c016e96 100644 --- a/doc/src/sgml/ref/dropdb.sgml +++ b/doc/src/sgml/ref/dropdb.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.4 2000/11/11 23:01:45 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.5 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -55,6 +55,18 @@ Postgres documentation </listitem> </varlistentry> + <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>-U, --username <replaceable class="parameter">username</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/droplang.sgml b/doc/src/sgml/ref/droplang.sgml index 48645d78a5d..5d75a89fdef 100644 --- a/doc/src/sgml/ref/droplang.sgml +++ b/doc/src/sgml/ref/droplang.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.4 2000/11/11 23:01:45 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.5 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -101,6 +101,18 @@ Postgres documentation </listitem> </varlistentry> + <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>-U, --username <replaceable class="parameter">username</replaceable></term> <listitem> diff --git a/doc/src/sgml/ref/dropuser.sgml b/doc/src/sgml/ref/dropuser.sgml index b72c5d865fc..a2b1e537e51 100644 --- a/doc/src/sgml/ref/dropuser.sgml +++ b/doc/src/sgml/ref/dropuser.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.5 2000/11/11 23:01:45 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.6 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -55,6 +55,18 @@ Postgres documentation </listitem> </varlistentry> + <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>-e, --echo</term> <listitem> diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index f0d1facfca2..b0ad3e49cfe 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.20 2000/10/05 19:48:18 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.21 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -24,7 +24,9 @@ Postgres documentation </refsynopsisdivinfo> <synopsis> pg_dump [ <replaceable class="parameter">dbname</replaceable> ] -pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] +pg_dump [ -h <replaceable class="parameter">host</replaceable> ] + [ -k <replaceable class="parameter">path</replaceable> ] + [ -p <replaceable class="parameter">port</replaceable> ] [ -t <replaceable class="parameter">table</replaceable> ] [ -a ] [ -c ] [ -d ] [ -D ] [ -i ] [ -n ] [ -N ] [ -o ] [ -s ] [ -u ] [ -v ] [ -x ] @@ -205,6 +207,21 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceab </varlistentry> <varlistentry> + <term>-k <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the local Unix domain socket file path + on which the <application>postmaster</application> + is listening for connections. + Without this option, the socket path name defaults to + the value of the <envar>PGUNIXSOCKET</envar> environment + variable (if set), otherwise it is constructed + from the port number. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term>-p <replaceable class="parameter">port</replaceable></term> <listitem> <para> diff --git a/doc/src/sgml/ref/pg_dumpall.sgml b/doc/src/sgml/ref/pg_dumpall.sgml index a4d5c8d45a2..1d78b9008c0 100644 --- a/doc/src/sgml/ref/pg_dumpall.sgml +++ b/doc/src/sgml/ref/pg_dumpall.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.11 2000/11/02 21:13:31 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.12 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -23,7 +23,7 @@ Postgres documentation <date>1999-07-20</date> </refsynopsisdivinfo> <synopsis> -pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ --accounts-only ] +pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -k <replaceable class="parameter">path</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ --accounts-only ] </synopsis> <refsect2 id="R2-APP-PG-DUMPALL-1"> @@ -150,6 +150,21 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replac </varlistentry> <varlistentry> + <term>-k <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the local Unix domain socket file path + on which the <application>postmaster</application> + is listening for connections. + Without this option, the socket path name defaults to + the value of the <envar>PGUNIXSOCKET</envar> environment + variable (if set), otherwise it is constructed + from the port number. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term>-p <replaceable class="parameter">port</replaceable></term> <listitem> <para> diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml index eba01b30d4d..e8e34c739ff 100644 --- a/doc/src/sgml/ref/postmaster.sgml +++ b/doc/src/sgml/ref/postmaster.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.12 2000/10/05 19:48:18 momjian Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.13 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -24,7 +24,9 @@ Postgres documentation </refsynopsisdivinfo> <synopsis> postmaster [ -B <replaceable class="parameter">nBuffers</replaceable> ] [ -D <replaceable class="parameter">DataDir</replaceable> ] [ -N <replaceable class="parameter">maxBackends</replaceable> ] [ -S ] - [ -d <replaceable class="parameter">DebugLevel</replaceable> ] [ -i ] [ -l ] + [ -d <replaceable class="parameter">DebugLevel</replaceable> ] + [ -h <replaceable class="parameter">hostname</replaceable> ] [ -i ] + [ -k <replaceable class="parameter">path</replaceable> ] [ -l ] [ -o <replaceable class="parameter">BackendOptions</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -n | -s ] </synopsis> @@ -124,6 +126,36 @@ postmaster [ -B <replaceable class="parameter">nBuffers</replaceable> ] [ -D <re </varlistentry> <varlistentry> + <term>-h <replaceable class="parameter">hostName</replaceable></term> + <listitem> + <para> + Specifies the TCP/IP hostname or address + on which the <application>postmaster</application> + is to listen for connections from frontend applications. Defaults to + the value of the + <envar>PGHOST</envar> + environment variable, or if <envar>PGHOST</envar> + is not set, then defaults to "all", meaning listen on all configured addresses + (including localhost). + </para> + <para> + If you use a hostname or address other than "all", do not try to run + multiple instances of <application>postmaster</application> on the + same IP address but different ports. Doing so will result in them + attempting (incorrectly) to use the same shared memory segments. + Also, if you use a hostname other than "all", all of the host's IP addresses + on which <application>postmaster</application> instances are + listening must be distinct in the two last octets. + </para> + <para> + If you do use "all" (the default), then each instance must listen on a + different port (via -p or <envar>PGPORT</envar>). And, of course, do + not try to use both approaches on one host. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term>-i</term> <listitem> <para> @@ -135,6 +167,35 @@ postmaster [ -B <replaceable class="parameter">nBuffers</replaceable> ] [ -D <re </varlistentry> <varlistentry> + <term>-k <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the local Unix domain socket path name + on which the <application>postmaster</application> + is to listen for connections from frontend applications. Defaults to + the value of the + <envar>PGUNIXSOCKET</envar> + environment variable, or if <envar>PGUNIXSOCKET</envar> + is not set, then defaults to a file in <filename>/tmp</filename> + constructed from the port number. + </para> + <para> + You can use this option to put the Unix-domain socket in a + directory that is private to one or more users using Unix + directory permissions. This is necessary for securely + creating databases automatically on shared machines. + In that situation, also disallow all TCP/IP connections + initially in <filename>pg_hba.conf</filename>. + If you specify a socket path other than the + default then all frontend applications (including + <application>psql</application>) must specify the same + socket path using either command-line options or + <envar>PGUNIXSOCKET</envar>. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term>-l</term> <listitem> <para> diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 446449d95e2..ca8d14f6de8 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.40 2000/10/24 01:38:21 tgl Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.41 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -1330,6 +1330,19 @@ Access permissions for database "test" <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + + + <varlistentry> <term>-H, --html</term> <listitem> <para> diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index 1417ac55f9f..7a701f216d5 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.10 2000/11/11 23:01:45 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.11 2000/11/13 15:18:08 momjian Exp $ Postgres documentation --> @@ -136,6 +136,18 @@ Postgres documentation </listitem> </varlistentry> + <varlistentry> + <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term> + <listitem> + <para> + Specifies the Unix-domain socket on which the + <application>postmaster</application> is running. + Without this option, the socket is created in <filename>/tmp</filename> + based on the port number. + </para> + </listitem> + </varlistentry> + <varlistentry> <term>-U <replaceable class="parameter">username</replaceable></term> <term>--username <replaceable class="parameter">username</replaceable></term> diff --git a/doc/src/sgml/start.sgml b/doc/src/sgml/start.sgml index b5093ffed16..3b484f50f95 100644 --- a/doc/src/sgml/start.sgml +++ b/doc/src/sgml/start.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.13 2000/09/29 20:21:34 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.14 2000/11/13 15:18:07 momjian Exp $ --> <chapter id="start"> @@ -110,8 +110,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.13 2000/09/29 20:21:34 peter will need to set the <acronym>PGHOST</acronym> environment variable to the name of the database server machine. The environment variable - <acronym>PGPORT</acronym> may also have to be set. The bottom - line is this: if + <acronym>PGPORT</acronym> or <acronym>PGUNIXSOCKET</acronym> may also have to be set. + The bottom line is this: if you try to start an application program and it complains that it cannot connect to the <application>postmaster</application>, you should immediately consult your site administrator to make |
