On Sat, Jan 21, 2017 at 9:53 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> Amitabh Kant <amitabhk...@gmail.com> writes:
> > command: "/var/tmp/pgbin.SPOsRj4D/bin/pg_ctl" -w -l
> "pg_upgrade_server.log"
> > -D "/usr/local/pgsql/data91" -o "-p 50432 -b  -c listen_addresses='' -c
> > unix_socket_permissions=0700 -c unix_socket_directory='/usr/
> local/pgsql'"
>
> Note the unix_socket_directory parameter, which is indeed being applied
> because we can see it again in the ps output:
>
> > pgsql 26636   0.0  1.4 66960 14512  -  Is    4:08AM   0:00.06
> > /var/tmp/pgbin.SPOsRj4D/bin/postgres -D /usr/local/pgsql/data91 -p
> 50432 -b
> > -c listen_addresses= -c unix_socket_permissions=0700 -c
> > unix_socket_directory=/usr/local/pgsql
>
> However, your psql is looking for the socket in /tmp:
>
> > $ psql -p 50432 -d template1
> > 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.50432"?
>
> You could successfully connect to that server with
> "psql -p 50432 -h /usr/local/pgsql ...", I expect.
>
> The question is why pg_upgrade issued that option and then failed to
> cope with the consequences.  I suspect it has something to do with one
> installation being configured with different default socket directory
> than the other, but I don't have enough facts.
>
>                         regards, tom lane
>

Yes, it does connect  using Unix domain socket as you suggested. PG 9.5 is
the stock install as present on FreeBSD. I will have to check the script
that installs PG 9.1  in an alternate location for any changes from the
default.

regards

Amitabh

Reply via email to