Skip site navigation (1) Skip section navigation (2)

Upgrading postmaster's log messages about bind/listen errors

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Upgrading postmaster's log messages about bind/listen errors
Date: 2017-03-09 20:27:25
Message-ID: 9564.1489091245@sss.pgh.pa.us (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
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?

There are probably a couple of example messages in the SGML docs that
would need to be updated, but I've not trawled for them yet.

			regards, tom lane


Attachment: add-address-to-bind-failure-msgs.patch
Description: text/x-diff (4.6 KB)

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2017-03-09 20:34:30
Subject: Re: cast result of copyNode()
Previous:From: Sven R. KunzeDate: 2017-03-09 20:20:35
Subject: Re: adding an immutable variant of to_date

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group