mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
Prefix "could not connect to host-or-socket-path:" to all connection failure cases that occur after the socket() call, and remove the ad-hoc server identity data that was appended to a few of these messages. This should produce much more intelligible error reports in multiple-target-host situations, especially for error cases that are off the beaten track to any degree (because none of those provided any server identity info). As an example of the change, formerly a connection attempt with a bad port number such as "psql -p 12345 -h localhost,/tmp" might produce psql: error: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 12345? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 12345? 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.12345"? Now it looks like psql: error: could not connect to host "localhost" (::1), port 12345: Connection refused Is the server running on that host and accepting TCP/IP connections? could not connect to host "localhost" (127.0.0.1), port 12345: Connection refused Is the server running on that host and accepting TCP/IP connections? could not connect to socket "/tmp/.s.PGSQL.12345": No such file or directory Is the server running locally and accepting connections on that socket? This requires adjusting a couple of regression tests to allow for variation in the contents of a connection failure message. Discussion: https://postgr.es/m/BN6PR05MB3492948E4FD76C156E747E8BC9160@BN6PR05MB3492.namprd05.prod.outlook.com
93 lines
5.2 KiB
Plaintext
93 lines
5.2 KiB
Plaintext
[NO_PID]: ECPGdebug: set to 1
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_execute on line 24: query: alter user regress_ecpg_user2 encrypted password 'insecure'; with 0 parameter(s) on connection main
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_execute on line 24: using PQexec
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_process_output on line 24: OK: ALTER ROLE
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_execute on line 25: query: alter user regress_ecpg_user1 encrypted password 'connectpw'; with 0 parameter(s) on connection main
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_execute on line 25: using PQexec
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_process_output on line 25: OK: ALTER ROLE
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGtrans on line 26: action "commit"; connection "main"
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <DEFAULT> for user regress_ecpg_user2
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: could not open database: could not connect: FATAL: database "regress_ecpg_user2" does not exist
|
|
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: raising sqlcode -402 on line 43: could not connect to database "<DEFAULT>" on line 43
|
|
[NO_PID]: sqlca: code: -402, state: 08001
|
|
[NO_PID]: raising sqlcode -220 on line 44: connection "main" does not exist on line 44
|
|
[NO_PID]: sqlca: code: -220, state: 08003
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> for user regress_ecpg_user1
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT> with options connect_timeout=180 & client_encoding=latin1 for user regress_ecpg_user1
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: non-localhost access via sockets on line 61
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: raising sqlcode -402 on line 61: could not connect to database "ecpg2_regression" on line 61
|
|
[NO_PID]: sqlca: code: -402, state: 08001
|
|
[NO_PID]: raising sqlcode -220 on line 62: connection "main" does not exist on line 62
|
|
[NO_PID]: sqlca: code: -220, state: 08003
|
|
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <DEFAULT> for user regress_ecpg_user2
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: could not open database: could not connect: FATAL: database "regress_ecpg_user2" does not exist
|
|
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: raising sqlcode -402 on line 64: could not connect to database "<DEFAULT>" on line 64
|
|
[NO_PID]: sqlca: code: -402, state: 08001
|
|
[NO_PID]: raising sqlcode -220 on line 65: connection "main" does not exist on line 65
|
|
[NO_PID]: sqlca: code: -220, state: 08003
|
|
[NO_PID]: ECPGconnect: opening database ecpg2_regression on <DEFAULT> port <DEFAULT>
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ECPGconnect: connection identifier main is already in use
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: ecpg_finish: connection main closed
|
|
[NO_PID]: sqlca: code: 0, state: 00000
|
|
[NO_PID]: raising sqlcode -220 on line 73: connection "nonexistent" does not exist on line 73
|
|
[NO_PID]: sqlca: code: -220, state: 08003
|