Re: [COMMITTERS] pgsql: Improve postmaster's logging of listen socket creation.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Improve postmaster's logging of listen socket creation.
Date: 2017-03-13 14:12:42
Message-ID: CA+TgmoaNmzrGH_X+1Rnc6JBXKy3Jsg11V+XrEPZ1_Y8McvKE=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Fri, Mar 10, 2017 at 4:32 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Improve postmaster's logging of listen socket creation.
>
> When one of the kernel calls in the socket()/bind()/listen() sequence
> fails, include the specific address we're trying to bind to in the log
> message. This greatly eases debugging of network misconfigurations.
>
> Also, after successfully setting up a listen socket, report its address
> in the log, to ease verification that the expected addresses were bound.
> There was some debate about whether to print this message at LOG level or
> only DEBUG1, but the majority of votes were for the former.
>
> Discussion: https://postgr.es/m/9564.1489091245@sss.pgh.pa.us

So now on every startup I get this:

2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv6 address "::1"
2017-03-13 10:08:49.399 EDT [90059] LOG: listening on IPv4 address "127.0.0.1"
2017-03-13 10:08:49.400 EDT [90059] LOG: listening on Unix address
"/tmp/.s.PGSQL.5432"

I think the idea that this is worth three lines of log output (out of
a total of six) is hard to stomach. If we did logging this detailed
for everything that happens during startup, we could easily have forty
or fifty lines of log output just from starting the server.

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-03-13 14:19:37 Re: [COMMITTERS] pgsql: Improve postmaster's logging of listen socket creation.
Previous Message Peter Eisentraut 2017-03-13 13:19:49 pgsql: initdb: Re-add translatable string that got lost

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-03-13 14:18:10 Re: Parallel Append implementation
Previous Message Pavel Stehule 2017-03-13 14:07:55 Re: New CORRESPONDING clause design