Re: Upgrading postmaster's log messages about bind/listen errors

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tels <nospam-pg-abuse(at)bloodgate(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Upgrading postmaster's log messages about bind/listen errors
Date: 2017-03-10 13:56:56
Message-ID: 20170310135656.GD9812@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Tels (nospam-pg-abuse(at)bloodgate(dot)com) wrote:
> On Thu, March 9, 2017 11:43 pm, Tom Lane wrote:
> > Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> >> On Thu, Mar 9, 2017 at 4:01 PM, Joe Conway <mail(at)joeconway(dot)com> wrote:
> >>> +1 for making it LOG instead of DEBUG1
> >
> >> I would tend to vote against that, because startup is getting
> >> gradually chattier and chattier, and I think this isn't likely to be
> >> of interest to very many people most of the time.
> >
> > Yeah, my thought was that if we've gotten along without this for 20 years,
> > it's probably not of interest to most people most of the time.
> >
> > However, if we're measuring this on a scale of usefulness to the average
> > DBA, I would argue that it's of more interest than any of these messages
> > that currently appear by default:
>
> My 0.02$:
>
> I'd argue that from a security standpoint it is important to log at
> startup what addresses the service binds to, just so it is visible,
> explicit and logged.

It's also terribly useful for realizing there's an issue. I'd
definitely like to see what address we're binding to on startup in the
log and I agree that the other messages mentioned aren't nearly as
useful to the DBA.

Perhaps we could compromise by simply including the bind information in
the 'ready to accept connections' message, like so:

database system is ready to accept connections on (1.2.3.4)

Or something along those lines?

> Granted, there should be firewall rules preventing access, but
> misconfigurations, or simple changes can happen and go unnoticed. If later
> the postmaster bind address changes, maybe due to an update or human
> error, you got the stars aligned just right for an unauthorized access.

I was helping someone with a "connection refused" message just this week
where it would have been quite helpful if the log had said which IP we
were binding on.

> OTOH, that the "logical replication launcher started" isn't really useful
> to know to me as a user, I'd rather know when it failed to launch.

Agreed.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-10 14:00:14 Re: WIP: Faster Expression Processing v4
Previous Message Alvaro Herrera 2017-03-10 13:53:29 Re: tzdata2017a breaks timestamptz regression test