I want to troubleshoot a failed attempt to connect to a remote Pg server using psql.
I'd expected to find some log files for psql, but I didn't.
Is there any other place where such information would be logged?
I'm running 12.04.2 LTS.
NOTE: I've only installed postgresql-client package on this machine.
1 Answer
psql doesn't write log files. The server end has logs, but the client only logs to stderr.
If the error message (which you didn't show us) isn't enough, you could use wireshark to see the exact conversation with the server. Usually you'd look at the server error log for details, though.
Sometimes PostgreSQL intentionally sends a less detailed message to the client than it records in the server log, because the server log contains information that an untrusted, unauthenticated client should not get.