Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb7c3784

Browse files
committed
Repair residual sillinesses from UUNET virtual host/socket path patch.
I hope all the dust has settled out now ...
1 parent73d0514 commitb7c3784

File tree

11 files changed

+111
-117
lines changed

11 files changed

+111
-117
lines changed

‎doc/src/sgml/environ.sgml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,16 @@ $ export PATH
4747
</Para>
4848

4949
<Para>
50-
51-
If your site administrator has not set things up in the default way,
52-
you may have some more work to do. For example, if the database server
53-
machine is a remote machine, you will need to set the
54-
<Acronym>PGHOST</Acronym> environment variable to the name of the
55-
database server machine. The environment variable
56-
<Acronym>PGPORT</Acronym> or <envar>PGUNIXSOCKET</envar> may also have
57-
to be set. The bottom line is this: if you try to start an application
58-
program and it complains that it cannot connect to the
59-
<Application>postmaster</Application>, you should immediately consult
60-
your site administrator to make sure that your environment is properly
61-
set up. </Para>
50+
If your site administrator has not set things up in the
51+
default way, you may have some more work to do. For example, if the database
52+
server machine is a remote machine, you
53+
will need to set the <Acronym>PGHOST</Acronym> environment variable to the name
54+
of the database server machine. The environment variable
55+
<Acronym>PGPORT</Acronym> may also have to be set. The bottom line is this: if
56+
you try to start an application program and it complains
57+
that it cannot connect to the <Application>postmaster</Application>,
58+
you should immediately consult your site administrator to make sure that your
59+
environment is properly set up.
60+
</Para>
6261

6362
</Chapter>

‎doc/src/sgml/libpq++.sgml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.19 2000/11/22 01:41:12 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.20 2000/11/30 23:20:50 tgl Exp $
33
-->
44

55
<chapter id="libpqplusplus">
@@ -80,22 +80,16 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.19 2000/11/22 01:41:
8080
<listitem>
8181
<para>
8282
<envar>PGHOST</envar> sets the default server name.
83-
If it begins with a slash, it is used
84-
as the directory for the unix domain socket.
83+
If this begins with a slash, it specifies Unix-domain communication
84+
rather than TCP/IP communication; the value is the name of the
85+
directory in which the socket file is stored (default "/tmp").
8586
</para>
8687
</listitem>
8788
<listitem>
8889
<para>
89-
<envar>PGPORT</envar> sets the default port or local Unix domain socket
90-
file extension for communicating with the <productname>Postgres</productname>
91-
backend.
92-
</para>
93-
</listitem>
94-
<listitem>
95-
<para>
96-
<envar>PGUNIXSOCKET</envar> sets the Unix domain socket
97-
directory for communicating with the <productname>Postgres</productname>
98-
backend.
90+
<envar>PGPORT</envar> sets the default TCP port number or Unix-domain
91+
socket file extension for communicating with the
92+
<productname>Postgres</productname> backend.
9993
</para>
10094
</listitem>
10195
<listitem>

‎doc/src/sgml/libpq.sgml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.50 2000/11/3018:34:36 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.51 2000/11/3023:20:50 tgl Exp $
33
-->
44

55
<chapter id="libpq-chapter">
@@ -88,9 +88,11 @@ PGconn *PQconnectdb(const char *conninfo)
8888
<listitem>
8989
<para>
9090
Name of host to connect to.
91-
Using this parameter causes a hostname look-up. See hostaddr.
92-
If it begins with a slash, it is used
93-
as the directory for the unix domain socket.
91+
If this begins with a slash, it specifies Unix-domain communication
92+
rather than TCP/IP communication; the value is the name of the
93+
directory in which the socket file is stored.
94+
The default is to connect to a Unix-domain socket in
95+
<filename>/tmp</filename>.
9496
</para>
9597
</listitem>
9698
</varlistentry>
@@ -118,7 +120,7 @@ PGconn *PQconnectdb(const char *conninfo)
118120
machine at hostaddr.
119121
</para>
120122
<para>
121-
Withoutboth a host nameand host address, libpq will connect using a
123+
Withouteither a host nameor host address, libpq will connect using a
122124
local Unix domain socket.
123125
</para>
124126
</listitem>
@@ -1820,14 +1822,16 @@ application programs.
18201822
<listitem>
18211823
<para>
18221824
<envar>PGHOST</envar> sets the default server name.
1823-
If it beings with a slash, it is used as the directory for the unix domain
1824-
socket.
1825+
If this begins with a slash, it specifies Unix-domain communication
1826+
rather than TCP/IP communication; the value is the name of the
1827+
directory in which the socket file is stored (default "/tmp").
18251828
</para>
18261829
</listitem>
18271830
<listitem>
18281831
<para>
1829-
<envar>PGPORT</envar> sets the default port for communicating with
1830-
the <productname>Postgres</productname> backend.
1832+
<envar>PGPORT</envar> sets the default TCP port number or Unix-domain
1833+
socket file extension for communicating with the
1834+
<productname>Postgres</productname> backend.
18311835
</para>
18321836
</listitem>
18331837
<listitem>

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.25 2000/11/22 01:41:13 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.26 2000/11/30 23:20:50 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -371,8 +371,9 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ]
371371
<varlistentry>
372372
<term><computeroutput>
373373
Connection to database 'template1' failed.
374-
connectDB() failed: Is the postmaster running and accepting connections
375-
at 'UNIX Socket' on port '<replaceable class="parameter">port</replaceable>'?
374+
connectDBStart() -- connect() failed: No such file or directory
375+
Is the postmaster running locally
376+
and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?
376377
</computeroutput></term>
377378
<listitem>
378379
<para>

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.15 2000/11/22 01:41:13 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.16 2000/11/30 23:20:50 tgl Exp $
33
Postgres documentation
44
-->
55

@@ -192,7 +192,9 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replac
192192
<varlistentry>
193193
<term><computeroutput>
194194
Connection to database 'template1' failed.
195-
connectDB() failed: Is the postmaster running and accepting connections at 'UNIX Socket' on port '<replaceable class="parameter">port</replaceable>'?
195+
connectDBStart() -- connect() failed: No such file or directory
196+
Is the postmaster running locally
197+
and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?
196198
</computeroutput></term>
197199
<listitem>
198200
<para>

‎doc/src/sgml/ref/pg_restore.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,9 @@ pg_restore [ <replaceable class="parameter">archive-file</replaceable> ]
345345
<varlistentry>
346346
<term><computeroutput>
347347
Connection to database 'template1' failed.
348-
connectDB() failed: Is the postmaster running and accepting connections
349-
at 'UNIX Socket' on port '<replaceable class="parameter">port</replaceable>'?
348+
connectDBStart() -- connect() failed: No such file or directory
349+
Is the postmaster running locally
350+
and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?
350351
</computeroutput></term>
351352
<listitem>
352353
<para>

‎doc/src/sgml/ref/postmaster.sgml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.17 2000/11/28 23:27:54 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.18 2000/11/30 23:20:50 tgl Exp $
33
Postgres documentation
44
-->
55

66
<refentry id="APP-POSTMASTER">
77
<docinfo>
8-
<date>2000-11-12</date>
8+
<date>2000-11-30</date>
99
</docinfo>
1010

1111
<refmeta>
@@ -30,7 +30,7 @@ Postgres documentation
3030
<arg>-F</arg>
3131
<arg>-h <replaceable>hostname</replaceable></arg>
3232
<arg>-i</arg>
33-
<arg>-k <replaceable>filename</replaceable></arg>
33+
<arg>-k <replaceable>directory</replaceable></arg>
3434
<arg>-l</arg>
3535
<arg>-N <replaceable>max-connections</replaceable></arg>
3636
<arg>-o <replaceable>extra-options</replaceable></arg>
@@ -70,10 +70,10 @@ Postgres documentation
7070
starts it needs to know the location of the database cluster files
7171
(<quote>data area</quote>). This is done with the
7272
<option>-D</option> invocation option or the <envar>PGDATA</envar>
73-
environment variable, there is no default. More than one
73+
environment variable; there is no default. More than one
7474
postmaster process can run on a system at one time, as long as they
75-
use different data areas and differentport numbers (see below). A
76-
data area is created with <xref linkend="app-initdb"
75+
use different data areas and differentcommunication ports (see below).
76+
Adata area is created with <xref linkend="app-initdb"
7777
endterm="app-initdb-title">.
7878
</para>
7979

@@ -165,10 +165,8 @@ Postgres documentation
165165
<para>
166166
Specifies the TCP/IP hostname or address on which the
167167
<application>postmaster</application> is to listen for
168-
connections from client applications. Defaults to the value
169-
of the <envar>PGHOST</envar> environment variable, or if
170-
<envar>PGHOST</envar> is not set, it defaults to listening on
171-
all configured addresses (including localhost).
168+
connections from client applications. Defaults to
169+
listening on all configured addresses (including localhost).
172170
</para>
173171
</listitem>
174172
</varlistentry>
@@ -185,15 +183,13 @@ Postgres documentation
185183
</varlistentry>
186184

187185
<varlistentry>
188-
<term>-k <replaceable class="parameter">filename</replaceable></term>
186+
<term>-k <replaceable class="parameter">directoryname</replaceable></term>
189187
<listitem>
190188
<para>
191-
Specifies the directoryfor Unixdomain socket on which the
189+
Specifies the directoryof the Unix-domain socket on which the
192190
<application>postmaster</application> is to listen for
193-
connections from client applications. Defaults to the value
194-
of the <envar>PGUNIXSOCKET</envar> environment variable, or if
195-
<envar>PGUNIXSOCKET</envar> is not set, then defaults to a
196-
file in <filename>/tmp</filename>.
191+
connections from client applications. The default is normally
192+
<filename>/tmp</filename>, but can be changed at build time.
197193
</para>
198194
</listitem>
199195
</varlistentry>

‎doc/src/sgml/runtime.sgml

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.39 2000/11/2520:33:47 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.40 2000/11/30 23:20:50 tgl Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -347,7 +347,7 @@ IpcSemaphoreCreate: semget(key=5440026, num=16, 01600) failed: No space left on
347347
<para>
348348
<screen>
349349
connectDB() -- connect() failed: Connection refused
350-
Is the postmaster running (with -i) at 'server.joe.com' and accepting connections on TCP/IP port'5432'?
350+
Is the postmaster running (with -i) at 'server.joe.com' and accepting connections on TCP/IP port 5432?
351351
</screen>
352352
This is the generic <quote>I couldn't find a server to talk
353353
to</quote> failure. It looks like the above when TCP/IP
@@ -361,7 +361,7 @@ Is the postmaster running (with -i) at 'server.joe.com' and accepting connection
361361
Unix-socket communication to a local postmaster:
362362
<screen>
363363
connectDB() -- connect() failed: No such file or directory
364-
Is the postmaster runningat 'localhost'and accepting connections on Unix socket '5432'?
364+
Is the postmaster runninglocallyand accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?
365365
</screen>
366366
</para>
367367

@@ -1082,15 +1082,13 @@ env PGOPTIONS='-c geqo=off' psql
10821082
</varlistentry>
10831083

10841084
<varlistentry>
1085-
<term>UNIXSOCKET (<type>string</type>)</term>
1085+
<term>UNIX_SOCKET_DIRECTORY (<type>string</type>)</term>
10861086
<listitem>
10871087
<para>
1088-
Specifies the directory of the Unixdomain socket on which the
1088+
Specifies the directory of the Unix-domain socket on which the
10891089
<application>postmaster</application> is to listen for
1090-
connections from client applications. Defaults to the value
1091-
of the <envar>PGUNIXSOCKET</envar> environment variable, or if
1092-
<envar>PGUNIXSOCKET</envar> is not set, then defaults to
1093-
<filename>/tmp</filename>.
1090+
connections from client applications. The default is normally
1091+
<filename>/tmp</filename>, but can be changed at build time.
10941092
</para>
10951093
</listitem>
10961094
</varlistentry>
@@ -1151,23 +1149,8 @@ env PGOPTIONS='-c geqo=off' psql
11511149
<para>
11521150
Specifies the TCP/IP hostname or address on which the
11531151
<application>postmaster</application> is to listen for
1154-
connections from client applications. Defaults to the value
1155-
of the <envar>PGHOST</envar> environment variable, or if
1156-
<envar>PGHOST</envar> is not set, it defaults to listening on
1157-
all configured addresses (including localhost).
1158-
</para>
1159-
<para>
1160-
If you use a hostname do not try to run multiple instances of
1161-
<application>postmaster</application> on the same IP address
1162-
but different ports. Doing so will result in them attempting
1163-
(incorrectly) to use the same shared memory segments. Also,
1164-
if you use a hostname, all of the host's IP addresses on which
1165-
<application>postmaster</application> instances are listening
1166-
must be distinct in the two last octets.
1167-
</para>
1168-
<para>
1169-
If you do not use this option, then each instance must listen
1170-
on a different port.
1152+
connections from client applications. Defaults to
1153+
listening on all configured addresses (including localhost).
11711154
</para>
11721155
</listitem>
11731156
</varlistentry>
@@ -1220,6 +1203,11 @@ env PGOPTIONS='-c geqo=off' psql
12201203
<entry>tcpip_socket = on</entry>
12211204
<entry></entry>
12221205
</row>
1206+
<row>
1207+
<entry>-k <replaceable>x</replaceable></entry>
1208+
<entry>unix_socket_directory = <replaceable>x</replaceable></entry>
1209+
<entry></entry>
1210+
</row>
12231211
<row>
12241212
<entry>-l</entry>
12251213
<entry>ssl = on</entry>

‎doc/src/sgml/start.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.14 2000/11/13 15:18:07 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.15 2000/11/30 23:20:50 tgl Exp $
33
-->
44

55
<chapter id="start">
@@ -110,7 +110,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.14 2000/11/13 15:18:07 momji
110110
will need to set the <acronym>PGHOST</acronym> environment
111111
variable to the name
112112
of the database server machine. The environment variable
113-
<acronym>PGPORT</acronym>or <acronym>PGUNIXSOCKET</acronym>may also have to be set.
113+
<acronym>PGPORT</acronym> may also have to be set.
114114
The bottom line is this: if
115115
you try to start an application program and it complains
116116
that it cannot connect to the <application>postmaster</application>,
@@ -154,18 +154,18 @@ $Header: /cvsroot/pgsql/doc/src/sgml/start.sgml,v 1.14 2000/11/13 15:18:07 momji
154154

155155
<programlisting>
156156
% psql template1
157-
Connection to database 'postgres' failed.
158-
connectDB() failed:Is the postmaster runningand accepting connections
159-
at 'UNIX Socket'onport '5432'?
157+
psql: connectDBStart() -- connect() failed: No such file or directory
158+
Is the postmaster runninglocally
159+
and accepting connectionsonUnix socket '/tmp/.s.PGSQL.5432'?
160160
</programlisting>
161161

162162
or
163163

164164
<programlisting>
165165
% psql -h localhost template1
166-
Connection to database 'postgres' failed.
167-
connectDB() failed:Is the postmaster runningand accepting TCP/IP
168-
(with -i) connections at 'localhost'on port'5432'?
166+
psql: PQconnectPoll() -- connect() failed: Connection refused
167+
Is the postmaster running(with -i) at 'localhost'
168+
and accepting connectionsonTCP/IPport 5432?
169169
</programlisting>
170170

171171
it is usually because

‎src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.196 2000/11/29 22:04:04 tgl Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.197 2000/11/30 23:20:51 tgl Exp $
1515
*
1616
* NOTES
1717
*
@@ -432,7 +432,6 @@ PostmasterMain(int argc, char *argv[])
432432
NetServer= true;
433433
break;
434434
case'k':
435-
/* Set PGUNIXSOCKET by hand. */
436435
UnixSocketDir=optarg;
437436
break;
438437
#ifdefUSE_SSL
@@ -732,7 +731,7 @@ usage(const char *progname)
732731
printf(" -F turn fsync off\n");
733732
printf(" -h HOSTNAME host name or IP address to listen on\n");
734733
printf(" -i enable TCP/IP connections\n");
735-
printf(" -kFILENAMEUnixdomain socket location\n");
734+
printf(" -kDIRECTORY Unix-domain socket location\n");
736735
#ifdefUSE_SSL
737736
printf(" -l enable SSL connections\n");
738737
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp