Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 6A124B5DC0C for ; Thu, 27 Oct 2011 11:42:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 98978-02 for ; Thu, 27 Oct 2011 14:42:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id C3BDAB5DBC8 for ; Thu, 27 Oct 2011 11:42:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9REgGsf028327; Thu, 27 Oct 2011 10:42:16 -0400 (EDT) To: Heikki Linnakangas cc: Robert Young , Andres Freund , pgsql-bugs@postgresql.org Subject: Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost" In-reply-to: <4EA958F0.8050402@enterprisedb.com> References: <201110271412.02896.andres@anarazel.de> <4EA958F0.8050402@enterprisedb.com> Comments: In-reply-to Heikki Linnakangas message dated "Thu, 27 Oct 2011 16:13:20 +0300" Date: Thu, 27 Oct 2011 10:42:16 -0400 Message-ID: <28326.1319726536@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/261 X-Sequence-Number: 31531 Heikki Linnakangas writes: > BTW, do we have anything in place to stop any user on the same host to > send bogus stat messages to the stats collector? Yes. Use of the connect() call is supposed to guarantee that we will only receive packets originating from our own socket address. As far as the original topic goes, I agree that it seems rather pointless to worry about systems that fail to resolve "localhost". Doing so is required by relevant RFCs, eg http://www.faqs.org/rfcs/bcp/bcp32.html (That's probably not the only one, it's just the first hit I found while searching the RFC archives.) And, given that we've been doing it this way since 2001 without previous complaints, the number of systems that fail to do it must be pretty small. regards, tom lane