aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-01-23 15:50:51 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-01-23 15:50:51 -0500
commit183bbd1b6d4376f1b04c02b7a20b55019f6d84f4 (patch)
treef52210a80e9f213ee2072df47bdcba9fee2a394d /doc/src
parent68d1c339417ea2e8df42e11db57472fcdbfe6a55 (diff)
downloadpostgresql-183bbd1b6d4376f1b04c02b7a20b55019f6d84f4.tar.gz
postgresql-183bbd1b6d4376f1b04c02b7a20b55019f6d84f4.zip
Doc: update example connection-failure messages in the documentation.
Now that the dust has more or less settled on 52a10224e and follow-ons, make sure the examples in the documentation are up-to-date.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/runtime.sgml22
-rw-r--r--doc/src/sgml/start.sgml13
2 files changed, 18 insertions, 17 deletions
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index 283352d3a4a..bf877c0e0c1 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -629,9 +629,8 @@ DETAIL: Failed system call was semget(5440126, 17, 03600).
<para>
<screen>
-psql: could not connect to server: Connection refused
- Is the server running on host "server.joe.com" and accepting
- TCP/IP connections on port 5432?
+psql: error: connection to server at "server.joe.com" (123.123.123.123), port 5432 failed: Connection refused
+ Is the server running on that host and accepting TCP/IP connections?
</screen>
This is the generic <quote>I couldn't find a server to talk
to</quote> failure. It looks like the above when TCP/IP
@@ -640,19 +639,22 @@ psql: could not connect to server: Connection refused
</para>
<para>
- Alternatively, you'll get this when attempting Unix-domain socket
+ Alternatively, you might get this when attempting Unix-domain socket
communication to a local server:
<screen>
-psql: could not connect to server: No such file or directory
- Is the server running locally and accepting
- connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
+psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
+ Is the server running locally and accepting connections on that socket?
</screen>
+ If the server is indeed running, check that the client's idea of the
+ socket path (here <literal>/tmp</literal>) agrees with the server's
+ <xref linkend="guc-unix-socket-directories"/> setting.
</para>
<para>
- The last line is useful in verifying that the client is trying to
+ A connection failure message always shows the server address or socket
+ path name, which is useful in verifying that the client is trying to
connect to the right place. If there is in fact no server
- running there, the kernel error message will typically be either
+ listening there, the kernel error message will typically be either
<computeroutput>Connection refused</computeroutput> or
<computeroutput>No such file or directory</computeroutput>, as
illustrated. (It is important to realize that
@@ -663,7 +665,7 @@ psql: could not connect to server: No such file or directory
linkend="client-authentication-problems"/>.) Other error messages
such as <computeroutput>Connection timed out</computeroutput> might
indicate more fundamental problems, like lack of network
- connectivity.
+ connectivity, or a firewall blocking the connection.
</para>
</sect2>
</sect1>
diff --git a/doc/src/sgml/start.sgml b/doc/src/sgml/start.sgml
index 9bb5c1a6d5d..f4ae1d0fcf7 100644
--- a/doc/src/sgml/start.sgml
+++ b/doc/src/sgml/start.sgml
@@ -176,19 +176,18 @@ createdb: command not found
<para>
Another response could be this:
<screen>
-createdb: could not connect to database postgres: could not connect to server: No such file or directory
- Is the server running locally and accepting
- connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
+createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
+ Is the server running locally and accepting connections on that socket?
</screen>
- This means that the server was not started, or it was not started
- where <command>createdb</command> expected it. Again, check the
+ This means that the server was not started, or it is not listening
+ where <command>createdb</command> expects to contact it. Again, check the
installation instructions or consult the administrator.
</para>
<para>
Another response could be this:
<screen>
-createdb: could not connect to database postgres: FATAL: role "joe" does not exist
+createdb: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: role "joe" does not exist
</screen>
where your own login name is mentioned. This will happen if the
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
If you have a user account but it does not have the privileges required to
create a database, you will see the following:
<screen>
-createdb: database creation failed: ERROR: permission denied to create database
+createdb: error: database creation failed: ERROR: permission denied to create database
</screen>
Not every user has authorization to create new databases. If
<productname>PostgreSQL</productname> refuses to create databases