Re: pg_upgrade error on FreeBSD (9.1 -> 9.5)

From: Amitabh Kant <amitabhkant(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade error on FreeBSD (9.1 -> 9.5)
Date: 2017-01-22 11:12:30
Message-ID: CAPTAQB+9RoqhCqdD6hW_LfpDrf7rt0XxrF20EWnSmyYRbEKjuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jan 21, 2017 at 9:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Amitabh Kant <amitabhkant(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Job 2017-01-22 20:51:32 Partitioned "views"
Previous Message Alvaro Aguayo Garcia-Rada 2017-01-22 02:43:11 Re: PgPool or alternatives