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 1r3Kqe-003Bh6-Ey for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 18:42:48 +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 1r3Kqd-001gj5-1o for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 18:42:47 +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 1r3Kqc-001giw-9n for pgsql-hackers@lists.postgresql.org; Wed, 15 Nov 2023 18:42:46 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3KqT-006bVg-Dt for pgsql-hackers@postgresql.org; Wed, 15 Nov 2023 18:42:44 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 9F1FF32009B2; Wed, 15 Nov 2023 13:42:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 15 Nov 2023 13:42:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1700073754; x=1700160154; bh=vD 7/n7pPHDaRqCgS4BPwrtA7YZsEqkdkplPt96erqwc=; b=Qjb8rXzj4lRbRd6fh9 Xi2mOlKP2WGuBZ8YYAD8/T+8Qp6jiddREGlve9S6OFKE6YetOzkRfb330tTczbSo 94smEb0MfPhtGB72BNkLPAAkwxR9hN2REhyQXvB+7mjJTPokGhUOrN7UUx1UNNuz sHWI7l4umdP77b7yNHXq47b7txZMlf+wGarNgS/q6eaJhpBQxUVolzjr4DFgmk+f VwIrfmIpkydsL3gmkYTbyzcRmZxxoiASh+KS5odO4qj2gS6rSuEDUz06l9QLkAeb BkL9TFjuNPZ2PCNTJFlsO/J4B37jK1efTc2LPX3qWZofOUCWF9CCNYgKdeYeeo/z hBog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1700073754; x=1700160154; bh=vD7/n7pPHDaRq CgS4BPwrtA7YZsEqkdkplPt96erqwc=; b=ZQmnKjz+FRnynmoNikOs4Qxk9l8P7 FHqv5rC7zm8K54aXxBVVDPE0MCwlkjD9/jkpj3R1em2p+VX1fHpKRyRDX8XXyx5V 1Mu5Shbp8plgAGHw5lPSP7xqFy0rMQLo4pgZPM8fEtptY/9lPZdREeoJ8vSgnlh2 nnMpFWV7logMDHRHYEifQ96DrfmFyrXPeb+5vWOBS/jttIKdtVR31CNUxYYcgx6i 7dzmH/yG67VX8/yE7cOL+HV1+6uhGLKRImbX3DeAN/FvdOSkr0KrNwfhhhIy4sRR WFNwz8dhMzMxN0pguEW01i19a0XR2bgOEP9hAJlRX4JiAnjGCPDMgs0xg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefiedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufhfffgjkfgfgggtsehttdertddtreejnecuhfhrohhmpeffrghg fhhinhhnucfklhhmrghrihcuofgrnhhnshonkhgvrhcuoehilhhmrghrihesihhlmhgrrh hirdhorhhgqeenucggtffrrghtthgvrhhnpeegtdefveelheevgeehgfelueegveetfeeu udevgfeuleegtdfghfefveeuleejvdenucffohhmrghinhepghhithhhuhgsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhlmhgr rhhisehilhhmrghrihdrohhrgh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Nov 2023 13:42:33 -0500 (EST) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Tom Lane Cc: "Tristan Partin" , "pgsql-hackers" Subject: Re: On non-Windows, hard depend on uselocale(3) References: <2689177.1700070346@sss.pgh.pa.us> Date: Wed, 15 Nov 2023 18:42:31 +0000 In-Reply-To: <2689177.1700070346@sss.pgh.pa.us> (Tom Lane's message of "Wed, 15 Nov 2023 12:45:46 -0500") Message-ID: <87y1eyn9ig.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tom Lane writes: > "Tristan Partin" writes: >> I would like to propose removing HAVE_USELOCALE, and just have WIN32, >> which means that Postgres would require uselocale(3) on anything that >> isn't WIN32. > > You would need to do some research and try to prove that that won't > be a problem on any modern platform. Presumably it once was a problem, > or we'd not have bothered with a configure check. > > (Some git archaeology might yield useful info about when and why > we added the check.) For reference, the Perl effort to use the POSIX.1-2008 thread-safe locale APIs have revealed several platform-specific bugs that cause it to disable them on FreeBSD and macOS: https://github.com/perl/perl5/commit/9cbc12c368981c56d4d8e40cc9417ac26bec2c35 https://github.com/perl/perl5/commit/dd4eb78c55aab441aec1639b1dd49f88bd960831 and work around bugs on others (e.g. OpenBSD): https://github.com/perl/perl5/commit/0f3830f3997cf7ef1531bad26d2e0f13220dd862 But Perl actually makes use of per-thread locales, because it has a separate interpereer per thread, each of which can have a different locale active. Since Postgres isn't actually multi-threaded (yet), these concerns might not apply to the same degree. > regards, tom lane - ilmari