Re: strange error reporting
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-05-03T10:08:04Z
Lists: pgsql-hackers
On 21.01.21 02:33, Tom Lane wrote: >>> I'd be inclined to spell it "connection to server at ... failed", >>> but that sort of wording is surely also possible. > >> "connection to server" rather than "connection to database" works for >> me; in fact, I think I like it slightly better. > > If I don't hear any other opinions, I'll change these messages to > > "connection to server at socket \"%s\" failed:" > "connection to server at \"%s\" (%s), port %s failed:" > > (or maybe "server on socket"? "at" sounds right for the IP address > case, but it feels a little off in the socket pathname case.) I was just trying some stuff with PG14, which led me to this thread. I find these new error messages to be more distracting than before in some cases. For example: PG13: clusterdb: error: could not connect to database typo: FATAL: database "typo" does not exist PG14: clusterdb: error: connection to server on socket "/tmp/.s.PGSQL.65432" failed: FATAL: database "typo" does not exist Throwing the socket address in there seems a bit distracting and misleading, and it also pushes off the actual information very far to the end. (Also, in some cases the socket path is very long, making the actual information even harder to find.) By the time you get to this error, you have already connected, so mentioning the server address seems secondary at best.
Commits
-
pgbench: Remove dead code
- ef2a83323c3b 13.2 landed
- cfbbc1f17c24 9.5.25 landed
- be2729dfaac3 10.16 landed
- 6819b9042fe6 14.0 landed
- 4162f91d1c20 9.6.21 landed
- 30854d94c627 12.6 landed
- 3055e8d0f1e7 11.11 landed
-
Report the true database name on connection errors
- fdf9d005401d 12.6 landed
- fdd405c63fff 11.11 landed
- f2dc962360b3 9.5.25 landed
- f17e8f33f781 13.2 landed
- bcae842b962a 9.6.21 landed
- 11a708f8159f 10.16 landed
-
Avoid redundantly prefixing PQerrorMessage for a connection failure.
- 58cd8dca3de0 14.0 landed
-
Improve new wording of libpq's connection failure messages.
- 27a48e5a16ff 14.0 landed