Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zkjju-00065a-7K for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Oct 2015 02:18:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zkjjs-0002Qk-GD for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Oct 2015 02:18:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZkjiX-0000xz-FU for pgsql-hackers@postgresql.org; Sat, 10 Oct 2015 02:17:01 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZkjiS-0007yo-Fe for pgsql-hackers@postgresql.org; Sat, 10 Oct 2015 02:16:58 +0000 Received: by pacex6 with SMTP id ex6so102228182pac.0 for ; Fri, 09 Oct 2015 19:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=9ikMJlQX01STdLvRehU243TlYmb98UCbThu3TCUedUI=; b=ZovS9dyKsiXM3LlJ64d1EXEpsNU8ULF/8/JVQySbBoYNFX/ORoLV6tgQ/xnfD5/yT2 Oj7iXj2n8qWoETXRPL9HtKG5mtaICicxzvPZdWiRetj6qsN7JAhZT8DB2tVU+OsqTMPj JIZ+mRXk7dQ5DQ1X5YS/Ie3mZarMCDx84vX0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=9ikMJlQX01STdLvRehU243TlYmb98UCbThu3TCUedUI=; b=kjU7Zy8g+P6FeM3Sr51bRk/teWSdz7wf/xvWKPfOlT7Z3YMu3XewoUY+d6XzQAyJw4 7/lS64rG7i7yPjx/rCtxlSTS3HXqN3UJ08UtECy1B2ADDUfwnIFmode8HNdG4c4M3BjJ QLRNiQcalME8YZ5721+L2Nt8cSLYhOmQ0NXdJ+6J1EfS2kbFsnzR5g6l6R2E4jVnv2B0 l29lTEQ3QyvJEDmgNBg733DYPPYdEmx7rcZXMBaNe1wbWubW0QOOvNIZLntnLBR/Lsll kZRS9TnTp48nNCyaU7ajOGGBgHB2McWf3FbVdS+Tpp9IU0Viqi5qgttn1KpUFNRNLR0p TnCw== X-Gm-Message-State: ALoCoQkOHMs+A7G7WRpL7+uMHEUAjnlAEKgI8CaYCKDCCCFIX4GoBL1AWjC6nLDJcNkfsquvk04P X-Received: by 10.66.219.74 with SMTP id pm10mr19099225pac.93.1444443414335; Fri, 09 Oct 2015 19:16:54 -0700 (PDT) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id fb1sm5012862pab.9.2015.10.09.19.16.53 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 09 Oct 2015 19:16:53 -0700 (PDT) Date: Fri, 9 Oct 2015 22:16:51 -0400 From: Noah Misch To: Robert Haas Cc: Tom Lane , Tatsuo Ishii , kondo@sraoss.co.jp, "pgsql-hackers@postgresql.org" Subject: Re: Re: [BUGS] BUG #13611: test_postmaster_connection failed (Windows, listen_addresses = '0.0.0.0' or '::') Message-ID: <20151010021651.GA85148@tornado.leadboat.com> References: <20150910041518.635.87615@wrigleys.postgresql.org> <20150914.131534.102176843624802952.t-ishii@sraoss.co.jp> <11077.1442205374@sss.pgh.pa.us> <20151009032649.GA62964@tornado.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.7 (--) 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 On Fri, Oct 09, 2015 at 03:14:26PM -0400, Robert Haas wrote: > On Thu, Oct 8, 2015 at 11:26 PM, Noah Misch wrote: > >> In particular, magically > >> substituting 127.0.0.1 for 0.0.0.0 seems utterly without principle. > > > > Binding a listening socket to "0.0.0.0" listens on every local IPv4 address, > > and 127.0.0.1 is one of those addresses. That's the principle. It's > > inelegant, but I expect it to work everywhere. > > But... what about the machine's other addresses? > > If Windows doesn't treat 0.0.0.0 to mean listen on every interface, > that's a shame. But making it only listen on 127.0.0.1 and not any of > the others does not seem better. Then, instead of 0.0.0.0 failing on > Windows, it would instead work but with different behavior. That > doesn't seem good either. The listening side is in good shape today. This thread is about the address that pg_ctl uses in PQping("host=..."). Listening on 0.0.0.0 is portable. PQping("host='0.0.0.0'") relies on non-portable semantics in the underlying connect() syscall. PQping("host='127.0.0.1'") is a portable substitute. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers