Re: BUG #16531: listen_addresses wide open?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bee(dot)Lists" <bee(dot)lists(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16531: listen_addresses wide open?
Date: 2020-07-08 22:35:05
Message-ID: 1736744.1594247705@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Bee.Lists" <bee(dot)lists(at)gmail(dot)com> writes:
> On Jul 8, 2020, at 5:57 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Well, my point here is that you didn't close the loop to establish that
>> what you thought you'd set listen_addresses to had actually taken effect.
>> The default value is 'localhost', and there are several ways that that
>> might still be the active value even if you'd edited the config file to
>> say something else.

> OK, then why even have a config file if it’s ignored, or possibly not ignored? Isn’t that the point of a config file?

You might have forgotten to restart (not just reload) the service after
editing. There'd have been a postmaster log message telling you that the
new value wasn't applied yet, but you wouldn't know it if you didn't think
to check the log file.

Or you might've forgotten to uncomment that config file line, or edited
the wrong copy of the config file (we've all been there). Or there might
have been another entry in the config file (or the pg.auto.conf file)
overriding the one you changed.

And there's still the possibility of multiple postmasters on the machine.
Or other mistakes I'm not thinking of at the moment.

Checking the "show" result would have been a handy way to start narrowing
down the possibilities.

Anyway, while it remains possible that you saw a Postgres or kernel bug,
I think pilot error is a far more likely explanation --- especially since
I reproduced what you said you did on a similar platform (RHEL8) and did
not see any such problem.

> Well, all of a sudden, my app was complaining that Pogtgres wasn’t accepting on that port, when the app had been using just that. Nothing changed and it suddenly went deaf. People suggested looking at the listen_addresses directive.

Well, that does NOT square with how you've been describing the problem.
You've been claiming that applications are successfully connecting when
they shouldn't, which seems the exact opposite of this.

Also, it's difficult to make much headway with a report that "nothing
changed" but things stopped working. Evidently *something* changed.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bee.Lists 2020-07-08 23:11:26 Re: BUG #16531: listen_addresses wide open?
Previous Message David G. Johnston 2020-07-08 22:21:02 Re: BUG #16531: listen_addresses wide open?