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.


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.