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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, ProPAAS DBA <dba(at)propaas(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql only works with -h (even localhost)
Date: 2017-01-25 16:35:16
Message-ID: 16898.1485362116@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steve Crawford <scrawford(at)pinpointresearch(dot)com> writes:
> 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.

Actually, the more common case I've seen is that the server put the
socket file in directory X but psql (or more specifically libpq)
is looking in directory Y. Try "show unix_socket_directories"
(or on older server versions "show unix_socket_directory") in a
successful connection, and compare to the path that psql shows when
bleating that it can't connect.

Usually this isn't operator error per se, but inconsistent defaults
between builds obtained from different sources.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alfredo Palhares 2017-01-25 17:36:12 Tips on maintaining several pg_hba files
Previous Message Melvin Davidson 2017-01-25 16:27:38 Re: psql only works with -h (even localhost)