pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Tels <nospam-pg-abuse@bloodgate.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Upgrading postmaster's log messages about bind/listen errors
Date: Fri, 10 Mar 2017 10:41:41 -0500
Message-ID: <12776.1489160501@sss.pgh.pa.us> (raw)
In-Reply-To: <20170310135656.GD9812@tamriel.snowman.net>
References: <9564.1489091245@sss.pgh.pa.us>
	<e3a1715d-dd25-d9bb-4a28-6839c242a2f7@joeconway.com>
	<CA+TgmoYpQiZMPHfQX8x8P+RqEq0XQBSb32QHTZ8dDwU+aP3qzg@mail.gmail.com>
	<19479.1489121003@sss.pgh.pa.us>
	<8371d0860a6019e5630bcdd2a96610ab.squirrel@sm.webmail.pair.com>
	<20170310135656.GD9812@tamriel.snowman.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Stephen Frost <sfrost@snowman.net> writes:
> * Tels (nospam-pg-abuse@bloodgate.com) wrote:
>> 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.

Good points both.

> 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)

That would be a problem from a couple of directions.  First, it wouldn't
be unusual for there to be half a dozen addresses to list, not just one.
Even a default configuration would probably read like

database system is ready to accept connections on (127.0.0.1, ::1, /tmp/.s.PGSQL.5432)

which doesn't seem very appetizing to me.  Second, it would be
considerably messier to implement because the "ready to accept
connections" message comes out physically distant from the
StreamServerPort function, and we don't save the struct addrinfo list
past the end of that function.  So I think the logging setup I had in
my patch is pretty much the only sane way to do it, and we just have
to decide whether it's worth exposing at default log level or not.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (18+ messages)  latest in thread

Message-ID: <12776.1489160501@sss.pgh.pa.us>
Permalink:  ../12776.1489160501@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12776.1489160501@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sfrost@snowman.net, nospam-pg-abuse@bloodgate.com, robertmhaas@gmail.com, mail@joeconway.com
  Subject: Re: Upgrading postmaster's log messages about bind/listen errors
  In-Reply-To: <12776.1489160501@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox