Re: BUG #16531: listen_addresses wide open?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16531: listen_addresses wide open?
Дата
Msg-id 1715900.1594225485@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16531: listen_addresses wide open?  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I only had this in postgresql.conf:
> listen_adresses = '192.168.1.50'

Just to be sure, "show listen_addresses" actually shows that,
and not something else?

> The machine was properly functioning on 'localhost' in an application I had
> on the same machine.

When I set the server's listen_addresses to just the machine's TCP
address, trying to connect to "localhost" gives me what I'd expect:

$ psql -h localhost -l
psql: error: could not connect to server: could not connect to server: Connection refused
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 5432?
could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432?

That's entirely independent of what's in pg_hba.conf: there's simply
no open socket on localhost.

So basically, it works for me, and you haven't shown what sort of
configuration problem is making it not work for you.

It could be that there's something odd about the way "localhost"
resolves on your machine; you could check "dig localhost." to be
sure.  But probably a more likely theory is that you didn't make
the listen_addresses setting take effect (you need to restart the
postmaster to change that).  Or possibly you've got more than one
postmaster active on the machine, and the other one is answering
localhost?

            regards, tom lane



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

Предыдущее
От: "Thompson, Shon"
Дата:
Сообщение: RE: Re: Invalid memory alloc querying field type bytea
Следующее
От: Soumyadeep Chakraborty
Дата:
Сообщение: Re: posgres 12 bug (partitioned table)