Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzMY3-00046f-Uz for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Sep 2018 13:48:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzMY2-0005kN-5u for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Sep 2018 13:48:14 +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.89) (envelope-from ) id 1fzMY2-0005kG-06 for pgsql-bugs@lists.postgresql.org; Mon, 10 Sep 2018 13:48:14 +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.89) (envelope-from ) id 1fzMXu-0008GQ-N2 for pgsql-bugs@postgresql.org; Mon, 10 Sep 2018 13:48:13 +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 w8ADlloN009119; Mon, 10 Sep 2018 09:47:47 -0400 From: Tom Lane To: Christoph Berg cc: tomek@pipebreaker.pl, Sebastian Elisa Pfeifer , pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #13793: Please implement IP_FREEBIND option In-reply-to: <20180910133309.GE20917@msg.df7cb.de> References: <20180910133309.GE20917@msg.df7cb.de> Comments: In-reply-to Christoph Berg message dated "Mon, 10 Sep 2018 15:33:09 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <9117.1536587267.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 10 Sep 2018 09:47:47 -0400 Message-ID: <9118.1536587267@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Christoph Berg writes: > http://man7.org/linux/man-pages/man7/ip.7.html > IP_FREEBIND (since Linux 2.4) > If enabled, this boolean option allows binding to an IP > address that is nonlocal or does not (yet) exist. This per‐ > mits listening on a socket, without requiring the underlying > network interface or the specified dynamic IP address to be up > at the time that the application is trying to bind to it. > This option is the per-socket equivalent of the ip_nonlo‐ > cal_bind /proc interface described below. > This had been requested in 2015 in bug #13793. I think it makes sense > to support this. Especially with IPv6, it is very common that > addresses are not yet assigned when services are starting. (I don't > know yet if other OSes support this option as well.) That man page says specifically that it's Linux-only, although that shouldn't stop us from using it to solve a Linux-specific problem (which systemd is, AFAIK). > Do we want that in PostgreSQL? IIRC, the main concern expressed previously is that this would completely defeat error checking on the listen_addresses parameter. However, that doesn't apply if said parameter is "*". Would there be any sense in applying IP_FREEBIND only for "*"? regards, tom lane