Re: postgresql unix socket connections

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: postgresql unix socket connections
Date: 2019-01-09 15:09:04
Message-ID: CAMkU=1ysUhYcRcDDUxTadt5vPVhg5UydafKTsT9SYjE2igRdQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Jan 9, 2019 at 3:35 AM Mariel Cherkassky <
mariel(dot)cherkassky(at)gmail(dot)com> wrote:

>
> Now, In machine 1 when I run psql I get the prompt password but in machine
> 2 I keep getting the next error :
>
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket
> "/var/run/postgresql/.s.PGSQL.5432"?
>
> One important thing that I didnt mention, is that I installed in machine 2
> package postgresql-libs.x86_64 0:8.4.20-8.el6_9 from the postgres
> repository (in order to upgrade it to 9.6).
>

The front end and the backend have compiled-in defaults for the socket
directory. If you installed them from different sources, they may have
different compiled-in defaults. Which means they may not be able to
rendezvous using the default settings for both of them.

You can override the default using unix_socket_directory on the server (as
you discovered). On the client you can override it by using -h (or PGHOST
or host= or whatever mechanism), with an argument that looks like a
directory, starting with a '/'.

Cheers,

Jeff

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2019-01-09 15:13:17 Re: postgresql unix socket connections
Previous Message Mariel Cherkassky 2019-01-09 15:08:53 Re: postgresql unix socket connections