Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKMp0-0000TD-1t for pgsql-committers@arkaria.postgresql.org; Wed, 16 Feb 2022 16:06:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nKMox-0007XQ-NE for pgsql-committers@arkaria.postgresql.org; Wed, 16 Feb 2022 16:06:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKMox-0007Wd-FX for pgsql-committers@lists.postgresql.org; Wed, 16 Feb 2022 16:06:23 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKMot-0000dA-79 for pgsql-committers@lists.postgresql.org; Wed, 16 Feb 2022 16:06:22 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 38ABA5C00A9; Wed, 16 Feb 2022 11:06:16 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 16 Feb 2022 11:06:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=QulNGyGjawqXNLDHRy3N9hqneX+FHhwEOSi+uliRL dc=; b=V8fUOKZCPoB2IETNyqYC9P2ZQxt/DY9lTw1MT/pbyCoBqGibOorb0K3f0 fwuFAuA46Y7OkGAHTi8Ek/CjHqu0n/JYBZ5Br3TmpQNqPhABsTKHlMQwJQtyb36F RTBK00FUPsTmehvSqQKLi6C0Kh9F+8ScOn8sWiLULLlMAeqmlaQb+Y4eD9kYuhjb Gd6l8We37BSNrwRRbqtExpF8v6K0i5CA9WtWXJVqLvEmFRMwyeEPmegAD5z/uDGs nQU5V/LUovVcqZVIl4e+TAv4vplmo9MsAK1vLFgbkYg9wgsgktJ5BTIFbG48vKxQ pk76eNfvba8W38FO29awM8ne+LAkg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjeeigdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejre dttdefjeenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdr vghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomheqnecuggftrfgrth htvghrnhepfeejgeehteeuhfevveduleeufedtjeetiefftedvudfhtdeifefgueettdev gefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepph gvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Feb 2022 11:06:13 -0500 (EST) Message-ID: <2c53ab2c-e14d-eb00-554e-5520bdbc8d3c@enterprisedb.com> Date: Wed, 16 Feb 2022 17:06:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: pgsql: Remove IS_AF_UNIX macro Content-Language: en-US To: Tom Lane Cc: pgsql-committers@lists.postgresql.org References: <3047303.1644939704@sss.pgh.pa.us> From: Peter Eisentraut In-Reply-To: <3047303.1644939704@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 15.02.22 16:41, Tom Lane wrote: > Peter Eisentraut writes: >> Remove IS_AF_UNIX macro >> The AF_UNIX macro was being used unprotected by HAVE_UNIX_SOCKETS, >> apparently since 2008. > > I hadn't looked closely at this patch, but are you referring to > this bit in ip.h? > > #ifdef HAVE_UNIX_SOCKETS > #define IS_AF_UNIX(fam) ((fam) == AF_UNIX) > #else > #define IS_AF_UNIX(fam) (0) > #endif > > That's by no means "unprotected": we will not try to reference > AF_UNIX unless HAVE_UNIX_SOCKETS is set. In src/backend/utils/adt/pgstatfuncs.c there is a use of AF_UNIX that has been there unprotected by any #ifdef since about 2008. > We might as well just nuke > all the HAVE_UNIX_SOCKETS conditional compilation if we let > this stand. > > (Now, maybe we should indeed do that. I don't have much > interest in the possibility that we'll worry about such > platforms in future.) Maybe/probably. But there is a difference between platforms having the AF_UNIX symbol (which is required by POSIX unconditionally) and platforms actually having Unix sockets or not (which might require different default configurations or run-time behavior), so the two questions are not that closely connected.