Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8EhQ-0005h4-HQ for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Jan 2014 19:51:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W8EhP-0007qN-R7 for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Jan 2014 19:51:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8EhO-0007pF-IN for pgsql-bugs@postgresql.org; Tue, 28 Jan 2014 19:51:54 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8EhL-0003a4-15 for pgsql-bugs@postgresql.org; Tue, 28 Jan 2014 19:51:54 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1W8EhG-00036x-Sl; Tue, 28 Jan 2014 14:51:46 -0500 Date: Tue, 28 Jan 2014 14:51:46 -0500 From: Bruce Momjian To: Paul Morie Cc: Tom Lane , Andres Freund , pgsql-bugs@postgresql.org Subject: Re: BUG #9003: Hard-coding to localhost in postmaster Message-ID: <20140128195146.GP20898@momjian.us> References: <20140127183125.26701.88068@wrigleys.postgresql.org> <20140127232050.GB25670@awork2.anarazel.de> <1274922501.13409952.1390867581243.JavaMail.root@redhat.com> <20140128001221.GC25670@awork2.anarazel.de> <1664800968.14386753.1390923709454.JavaMail.root@redhat.com> <20140128155419.GB18333@awork2.anarazel.de> <23411.1390925754@sss.pgh.pa.us> <20140128161900.GF20898@momjian.us> <1241903739.14805210.1390938412164.JavaMail.root@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1241903739.14805210.1390938412164.JavaMail.root@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Tue, Jan 28, 2014 at 02:46:52PM -0500, Paul Morie wrote: > Apologies: I should have explained more of the context in my original post to this list. > I work for Red Hat on OpenShift and discovered this while investigating error messages > in the postgres logs (the bug report in OpenShift: https://bugzilla.redhat.com/show_bug.cgi?id=1024676). > Since it impacts the autovacuum functionality for our users, I wanted to see if I could > get an upstream fix. > > In OpenShift, user processes run inside a 'gear' - which has its own /etc/passwd entry, > selinux context, etc. Each gear user gets a 127.x.x.x loopback device to bind to so it > can all use the same ports like 8080 for web traffic, 5432 for postgres. That's only > possible if each gear gets its own unique loopback address. Binding to > localhost/127.0.0.1 is explicitly disallowed. > > We are not currently using network namespaces in OpenShift because they were not available > in the RHEL kernel until 6.5 (released Nov 2013). Now that they're supported, using them > in OpenShift is one of our high-priority items. > > Hope that clarifies why I would be interested in this option :) Based on your setup, why would you not DNS-map "localhost" to whatever 127.x.x.x address you gave that gear? We specifically bind to the "localhost" string and not 127.0.0.1. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs