Re: [GENERAL] psql only works with -h (even localhost)

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: [GENERAL] psql only works with -h (even localhost)
Дата
Msg-id CAEfWYyyK+ZNELC=O06co1Dr3KLDYeQRYWqhSgnp=Jwm-SY=J+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] psql only works with -h (even localhost)  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: [GENERAL] psql only works with -h (even localhost)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Adrian asks the correct questions. Lacking the answers to those I'm going to venture a guess that a Unix-domain socket exists but access via Unix-domain sockets is somehow blocked, probably by pg_hba.conf.

From the psql man page: "...Not all of these options are required; there are useful defaults. If you omit the host name, psql will connect via a Unix-domain socket to a server on the local host, or via TCP/IP to localhost on machines that don't have Unix-domain sockets...."

Cheers,
Steve




On Wed, Jan 25, 2017 at 8:07 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 01/25/2017 08:02 AM, ProPAAS DBA wrote:
Hi all;


we have a client server where 'psql -h localhost' is the only way psql
will connect when ssh'd onto the db server. Would like to be able to
just run psql but not sure what the issue/fix is. Anyone have any
insight hot to fix this?


What is the error you get if you use something other then -h localhost?

What is in pg_hba.conf?



Thanks in advance







--
Adrian Klaver
adrian.klaver@aklaver.com



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] psql only works with -h (even localhost)
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] psql only works with -h (even localhost)