Re: Select works only when connected from login postgres
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joseph Brenner <doomvox@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>, pgsql-general@postgresql.org
Date: 2016-12-04T17:51:49Z
Lists: pgsql-hackers, pgsql-general
Joseph Brenner <doomvox@gmail.com> writes: >> So what happens when you specify the port in your psql connection, eg: >> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5432 >> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5433 >> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5434 > With /usr/local/pgsql/bin/psql, only "-p 5433" connects, the > other two complain like so: > 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.5434"? What this probably indicates is that the other two installations are configured to put their socket files someplace else than /tmp, perhaps /var/run/postgresql. Connecting to them and issuing "show unix_socket_directories" would tell the tale. You can persuade a psql to connect to a socket in a nondefault directory by giving the directory name as host, eg psql --host=/var/run/postgresql -p 5434 It would be interesting to try all nine combinations of the psql's supplied by your various installations and the servers, just to confirm which ones behave normally and which don't. Of course, the other two would have to be told --host=/tmp to talk to the handbuilt server. regards, tom lane
Commits
-
Handle empty or all-blank PAGER setting more sanely in psql.
- 1ec5cc025b41 9.2.20 landed
- ccb84dae13c9 9.4.11 landed
- bb39f58f76b4 9.6.2 landed
- 82eb5c514473 9.3.16 landed
- 370c7a863aa7 9.5.6 landed
- 18f8f784cbbf 10.0 landed