Re: Cannot reach pg server using -h localhost

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cannot reach pg server using -h localhost
Дата
Msg-id 21381.1437501205@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cannot reach pg server using -h localhost  (Fritz Meissner <fritz.meissner@gmail.com>)
Список pgsql-general
Fritz Meissner <fritz.meissner@gmail.com> writes:
>> From the terminal in Mac OS X Yosemite, connecting to homebrew
> installed 9.4.4, I have a problem if I specify the host (I know this
> comes up all the time, bear with me as I have done a fair amount of
> digging already). This works:

This rang a bell with me, and a bit of digging found this thread:
http://www.postgresql.org/message-id/flat/6804.1413911806@sss.pgh.pa.us

While that's not the same symptom you're describing, it does point up
that OS X will expand "localhost" as pretty much "whatever it says in
/etc/hosts".  You might want to make sure that that expansion is sane,
ie 127.0.0.1 and ::1 and nothing else.

On my not-misbehaving-now Yosemite laptop, /etc/hosts contains

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost


However, assuming that that's not your problem, I'd suggest cranking up
log_min_messages to DEBUG5 and seeing if anything more gets reported
in the postmaster log.

Another thing worth checking is whether "-h 127.0.0.1" and "-h ::1"
behave the same as "-h localhost".  That would help rule out (or not)
DNS issues.

            regards, tom lane


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

Предыдущее
От: Chris Mair
Дата:
Сообщение: Re: Cannot reach pg server using -h localhost
Следующее
От: Aviel Buskila
Дата:
Сообщение: Re: Setting up HA postgresql