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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "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 03:24:45
Message-ID: CA+TgmoYpQiZMPHfQX8x8P+RqEq0XQBSb32QHTZ8dDwU+aP3qzg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 9, 2017 at 4:01 PM, Joe Conway <mail(at)joeconway(dot)com> wrote:
> On 03/09/2017 12:27 PM, Tom Lane wrote:
>> Over in
>> https://www.postgresql.org/message-id/flat/201703072317.01345.john.iliffe%40iliffe.ca
>> we spent quite a lot of effort to diagnose what turned out to be a simple
>> networking misconfiguration. It would probably have taken a lot less
>> effort if the postmaster were more forthcoming about exactly what address
>> it's trying to bind to. I seem to recall having wanted to include that
>> info in the messages many years ago, but at the time we lacked any
>> reasonably-portable way to decode a struct addrinfo. Now we have
>> pg_getnameinfo_all(), so PFA a patch to include the specific address in
>> any complaint about failures in the socket/bind/listen sequence.
>>
>> For good measure I also added a DEBUG1 log message reporting successful
>> binding to a port. I'm not sure if there's an argument for putting this
>> out at LOG level (i.e. by default) --- any thoughts about that?
>
> +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.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-03-10 03:27:22 Re: amcheck (B-Tree integrity checking tool)
Previous Message Robert Haas 2017-03-10 03:19:52 Re: Write Ahead Logging for Hash Indexes