Skip to content

Commit 183bbd1

Browse files
committed
Doc: update example connection-failure messages in the documentation.
Now that the dust has more or less settled on 52a1022 and follow-ons, make sure the examples in the documentation are up-to-date.
1 parent 68d1c33 commit 183bbd1

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

doc/src/sgml/runtime.sgml

+12-10
Original file line numberDiff line numberDiff line change
@@ -629,9 +629,8 @@ DETAIL: Failed system call was semget(5440126, 17, 03600).
629629

630630
<para>
631631
<screen>
632-
psql: could not connect to server: Connection refused
633-
Is the server running on host "server.joe.com" and accepting
634-
TCP/IP connections on port 5432?
632+
psql: error: connection to server at "server.joe.com" (123.123.123.123), port 5432 failed: Connection refused
633+
Is the server running on that host and accepting TCP/IP connections?
635634
</screen>
636635
This is the generic <quote>I couldn't find a server to talk
637636
to</quote> failure. It looks like the above when TCP/IP
@@ -640,19 +639,22 @@ psql: could not connect to server: Connection refused
640639
</para>
641640

642641
<para>
643-
Alternatively, you'll get this when attempting Unix-domain socket
642+
Alternatively, you might get this when attempting Unix-domain socket
644643
communication to a local server:
645644
<screen>
646-
psql: could not connect to server: No such file or directory
647-
Is the server running locally and accepting
648-
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
645+
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
646+
Is the server running locally and accepting connections on that socket?
649647
</screen>
648+
If the server is indeed running, check that the client's idea of the
649+
socket path (here <literal>/tmp</literal>) agrees with the server's
650+
<xref linkend="guc-unix-socket-directories"/> setting.
650651
</para>
651652

652653
<para>
653-
The last line is useful in verifying that the client is trying to
654+
A connection failure message always shows the server address or socket
655+
path name, which is useful in verifying that the client is trying to
654656
connect to the right place. If there is in fact no server
655-
running there, the kernel error message will typically be either
657+
listening there, the kernel error message will typically be either
656658
<computeroutput>Connection refused</computeroutput> or
657659
<computeroutput>No such file or directory</computeroutput>, as
658660
illustrated. (It is important to realize that
@@ -663,7 +665,7 @@ psql: could not connect to server: No such file or directory
663665
linkend="client-authentication-problems"/>.) Other error messages
664666
such as <computeroutput>Connection timed out</computeroutput> might
665667
indicate more fundamental problems, like lack of network
666-
connectivity.
668+
connectivity, or a firewall blocking the connection.
667669
</para>
668670
</sect2>
669671
</sect1>

doc/src/sgml/start.sgml

+6-7
Original file line numberDiff line numberDiff line change
@@ -176,19 +176,18 @@ createdb: command not found
176176
<para>
177177
Another response could be this:
178178
<screen>
179-
createdb: could not connect to database postgres: could not connect to server: No such file or directory
180-
Is the server running locally and accepting
181-
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
179+
createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
180+
Is the server running locally and accepting connections on that socket?
182181
</screen>
183-
This means that the server was not started, or it was not started
184-
where <command>createdb</command> expected it. Again, check the
182+
This means that the server was not started, or it is not listening
183+
where <command>createdb</command> expects to contact it. Again, check the
185184
installation instructions or consult the administrator.
186185
</para>
187186

188187
<para>
189188
Another response could be this:
190189
<screen>
191-
createdb: could not connect to database postgres: FATAL: role "joe" does not exist
190+
createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: role "joe" does not exist
192191
</screen>
193192
where your own login name is mentioned. This will happen if the
194193
administrator has not created a <productname>PostgreSQL</productname> user account
@@ -208,7 +207,7 @@ createdb: could not connect to database postgres: FATAL: role "joe" does not ex
208207
If you have a user account but it does not have the privileges required to
209208
create a database, you will see the following:
210209
<screen>
211-
createdb: database creation failed: ERROR: permission denied to create database
210+
createdb: error: database creation failed: ERROR: permission denied to create database
212211
</screen>
213212
Not every user has authorization to create new databases. If
214213
<productname>PostgreSQL</productname> refuses to create databases

0 commit comments

Comments
 (0)