Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixEY2-00066G-5V for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Jan 2020 18:28:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ixEY0-0000Zc-BH for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Jan 2020 18:28:12 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixEY0-0000ZV-2F for pgsql-hackers@lists.postgresql.org; Thu, 30 Jan 2020 18:28:12 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ixEXv-0006hw-B1 for pgsql-hackers@postgresql.org; Thu, 30 Jan 2020 18:28:11 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 6AA132221E; Thu, 30 Jan 2020 13:28:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 30 Jan 2020 13:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=B/L9jYPIAIXF+Oh2GRtHqhT+/HmG8r1eGFe7lnBOx NM=; b=ZrHLxdqDuDF3Z5OBjyFLtecoj2diJn/LCefR4F6+vcJRwLpol+qQFfL+D WLEzRN1qagAgSYE1gwK2m+Wz1ysMkRyahYkVsck5FFSQXoDErc13c6NAOGAVo8PF 1CmqEmg75RCbNhEan4E4r/MZFPKbH0ey3e6NWeYCO3THnr+jjIgeMMyUD+7Bz4zt TmusGa92/f4APGAmCR6GE/NCfUeR2ROg2zOmruwpebFYntZ/WxswzjL9RB+HEfqN nwiRneS89kLByYn7p/4/qqcUXT83OWz/xHx+D9+HfccoET0/pxSRiLgTojhXwa80 U+jVFWAbn5aV/ejzeouNA0la6udcA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfeekgdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffhvfhfohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmnecukfhppeektddrudekjedrleejrdduhedunecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhhtsedv nhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from april.pezone.net (tmo-097-151.customers.d1-online.com [80.187.97.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 0B1303060840; Thu, 30 Jan 2020 13:28:01 -0500 (EST) Subject: Re: Unix-domain socket support on Windows From: Peter Eisentraut To: Andrew Dunstan References: <54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com> <00d4945e-b437-f3b5-f4af-42e99321c846@2ndquadrant.com> <5974caea-1267-7708-40f2-6009a9d653b0@2ndquadrant.com> <75f72249-8ae6-322a-63df-4fe03eeccb9f@2ndquadrant.com> Cc: pgsql-hackers Organization: 2ndQuadrant Message-ID: <3b5fed50-9017-49ca-b556-303a0cc1b660@2ndquadrant.com> Date: Thu, 30 Jan 2020 19:28:00 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <75f72249-8ae6-322a-63df-4fe03eeccb9f@2ndquadrant.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-12-18 14:52, Peter Eisentraut wrote: > Next patch: This allows building *with* Unix-domain socket support but > *without* a default Unix socket path. This is needed because on Windows > we don't have a good default location like "/tmp" and we probably don't > want Unix sockets by default at run time so that older Windows versions > continue to work out of the box with the same binaries. > > We have code paths for Unix socket support and no Unix socket support. > Now add a third variant: Unix socket support but do not use a Unix > socket by default in the client or the server, only if you explicitly > specify one. > > To implement this, tweak things so that setting DEFAULT_PGSOCKET_DIR > to "" has the desired effect. This mostly already worked like that; > only a few places needed to be adjusted. Notably, the reference to > DEFAULT_PGSOCKET_DIR in UNIXSOCK_PATH() could be removed because all > callers already resolve an empty socket directory setting with a > default if appropriate. Perhaps this patch is too boring to be reviewed. If there are no objections, I'll commit it soon and then submit the final patches with the real functionality for the next commit fest. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services