Re: postgresql unix socket connections

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: postgresql unix socket connections
Дата
Msg-id CAMkU=1ysUhYcRcDDUxTadt5vPVhg5UydafKTsT9SYjE2igRdQQ@mail.gmail.com
обсуждение исходный текст
Ответ на postgresql unix socket connections  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
Список pgsql-performance
On Wed, Jan 9, 2019 at 3:35 AM Mariel Cherkassky <mariel.cherkassky@gmail.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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mariel Cherkassky
Дата:
Сообщение: Re: postgresql unix socket connections
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: postgresql unix socket connections