Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBZMC-004g08-GS for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2024 12:53:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tBZM9-003TVc-VH for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2024 12:53:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBZM9-003TVS-1I for pgsql-hackers@lists.postgresql.org; Thu, 14 Nov 2024 12:53:54 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBZM5-001tRx-HO for pgsql-hackers@postgresql.org; Thu, 14 Nov 2024 12:53:53 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.phl.internal (Postfix) with ESMTP id 11814138020B; Thu, 14 Nov 2024 07:53:49 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Thu, 14 Nov 2024 07:53:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1731588829; x=1731675229; bh=rJaq7Kg1vYN5MRn7Q7JXkQLXxvOB1vip msaFK9ktWms=; b=Nr9WIf9EHptEKySJQ4jTT0MerUkF5dJseDSHn+vGBLmIQTLb e4tieDHUiBkibW84ZRX/rD+u6k3JAAtl+7yPpHmsA5+wN1X+3WZzx4ffLWgjO8XJ 4WY3T2i36XZpAEyeafW5B0tc5//RWWvP9kP+0S1JnbZ9R6glHbC8oRe5YztnTG9W G9wpMAaZFXz1WVROaV5mrhYhHCaYm6JyEFMFdX5ZyWmJ8wEqMQCtmj+2Sb6C4+Z3 b8IiNj7/Ive3qJXHQMKPc50/p2jijKnmuSTa+fBoWqqh9T4iQK30uAJmdDWxZ8T1 Lu3rVmdQlhnBKH1saGrMV5QtyfULIyi7RgNtpg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1731588829; x= 1731675229; bh=rJaq7Kg1vYN5MRn7Q7JXkQLXxvOB1vipmsaFK9ktWms=; b=d nGoabeL299oA6+eX9oDHTf+Scxpn/IebNz+SimBM+F/dvvGRm7nJ/m3swma6aRWR 9vpcMGVFFG6GgQC141xFQbgWDMb7DDGcpK8HAfN7Emf22VzKCP1k/MbNrvFuxB5k s9hwzOEnRa1C6Q+OqDnSLwu2tjoPmTWJmtL329PWMv2iE3fNIAPZM5K68IYrmtiN 0drfNEw8Z4vtC1c30nVtey8+IBjh1uTpcy6eRfctoUROk+ejXzbV56i6xJ702DGd S50CM4+JFq2Y5msUZODrOuwUr2GuuntihDP4u//kiG8ueggscBGmvLmpYB1RGSYb u+MHF249S9CCD4PyoSMpQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvddvgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen ucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnh htrhgruhhtrdhorhhgqeenucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheet leejgefhueeltdfhueetvdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhr ghdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepth hhohhmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhrihhsthgr nhesnhgvohhnrdhtvggthhdprhgtphhtthhopehtghhlsehsshhsrdhpghhhrdhprgdruh hspdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdho rhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Nov 2024 07:53:47 -0500 (EST) Message-ID: Date: Thu, 14 Nov 2024 13:53:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: On non-Windows, hard depend on uselocale(3) To: Thomas Munro Cc: Tristan Partin , Tom Lane , pgsql-hackers References: <12842.1700083028@sss.pgh.pa.us> <98824.1700089582@sss.pgh.pa.us> <664255.1700245108@sss.pgh.pa.us> <810814.1700261928@sss.pgh.pa.us> <1155474.1700433384@sss.pgh.pa.us> <1330178.1700498443@sss.pgh.pa.us> <423491f5-2eaa-454e-8dc9-037d69c1a8f9@eisentraut.org> Content-Language: en-US From: Peter Eisentraut In-Reply-To: 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 14.11.24 08:48, Thomas Munro wrote: > The three MinGW environments we test today are using ucrt, and > configure detects the symbol on all. Namely: fairwren > (msys2/mingw64), the CI mingw64 task and the mingw cross-build that > runs on Linux in the CI CompilerWarnings task. As far as I know these > are the reasons for, and mechanism by which, we keep MinGW support > working. We have no policy requiring arbitrary old MinGW systems > work, and we wouldn't know anyway. Right. So I think we could unwind this in steps. First, remove the configure test for _configthreadlocale() and all the associated #ifdefs in the existing ecpg code. This seems totally safe, it would just leave behind MinGW older than 2016 and MSVC older than 2015, the latter of which is already the current threshold. Then the question whether we want to re-enable the error checking on _configthreadlocale() that was reverted by 2cf91ccb, or at least something similar. This should also be okay based on your description of the different Windows runtimes. I think it would also be good to do this to make sure this works before we employ _configthreadlocale() in higher-stakes situations. I suggest doing these two steps as separate patches, so this doesn't get confused between the various thread-related threads that want to variously add or remove uses of this function.