Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmMfz-0005wX-69 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Mar 2017 15:41:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cmMfy-00062n-Ig for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Mar 2017 15:41:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cmMfx-00062d-Tk for pgsql-hackers@postgresql.org; Fri, 10 Mar 2017 15:41:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cmMfq-0000dm-5e for pgsql-hackers@postgresql.org; Fri, 10 Mar 2017 15:41:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v2AFffYJ012777; Fri, 10 Mar 2017 10:41:41 -0500 From: Tom Lane To: Stephen Frost cc: Tels , Robert Haas , Joe Conway , "pgsql-hackers@postgresql.org" Subject: Re: Upgrading postmaster's log messages about bind/listen errors In-reply-to: <20170310135656.GD9812@tamriel.snowman.net> References: <9564.1489091245@sss.pgh.pa.us> <19479.1489121003@sss.pgh.pa.us> <8371d0860a6019e5630bcdd2a96610ab.squirrel@sm.webmail.pair.com> <20170310135656.GD9812@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Fri, 10 Mar 2017 08:56:56 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12775.1489160501.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 10 Mar 2017 10:41:41 -0500 Message-ID: <12776.1489160501@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Stephen Frost 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 --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers