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 1r3D7k-002di0-KV for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 10:27:56 +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 1r3D7j-00FaaM-26 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 10:27:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3D7i-00Faa6-OX for pgsql-hackers@lists.postgresql.org; Wed, 15 Nov 2023 10:27:54 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r3D7g-005gFA-B7 for pgsql-hackers@postgresql.org; Wed, 15 Nov 2023 10:27:53 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4083dbc43cfso47927815e9.3 for ; Wed, 15 Nov 2023 02:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon-tech.20230601.gappssmtp.com; s=20230601; t=1700044070; x=1700648870; darn=postgresql.org; h=subject:from:to:message-id:date:content-transfer-encoding :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VpwqK09ehMn1+1Om2eMqRm6q5dcelIUOyWubUttn4cI=; b=fk5mEm0t2MSDKBshQjYvXkN8nHfFuj9EqK7rQVSHYdI5Fjdd3mxIBc8LwHnB2DBFHI 0mGuapZTb+ElUT6wsSeFArZHyV99Emdwf/lbD0swWHXGTsSxtESPlBiQBRXhmZOTXm+W FWmO2k7sMfEDi4kJ3oa6V4/Z6Oq6QHTXPci1A/+028Iyr3dwvOgeS9joahC4MvKlgLD6 eDypkCMXcr18Lr/ZAtKc5mzsjaxFQqgAix00u2Yg5t9iSKWJgVpm/OXSheC3dBL6HDKC E/Pewn3w9G2GQu6SRQNtb9aw0OgFDRnvEmjr51XllqqRrZz/ojSH+1QoDCDN4kMhNfMN H+3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700044070; x=1700648870; h=subject:from:to:message-id:date:content-transfer-encoding :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VpwqK09ehMn1+1Om2eMqRm6q5dcelIUOyWubUttn4cI=; b=YaZMjvWuSCy562VvpQRYoAii7aQItiOHjqtmatovu902FVxuYXWLXFkng7Kg9NLScG mVQnFchQBcWLOnDbz4u6tYJTGPAXKLhLHicNYsTeM74poUjboPw/Fx8v4mqV8MFXJKtQ qVzm5tOecRfcu6skHtRGcBc4CemcDq4N0nIT8ueA1ocoocN5X/D7LTV0jex19lE4o6BO rIasNHY5MhC+Agu9iHBOkbIZqyLDXWBr2o+WeEXiWpEwmxBsi8GT/q7UovDr+YcNGnlt xcOczMo9USb1SReutWIpB4+96i7b0YBO08QWS5UfA0+xEL8NiaH14sI0AJR6HGVCy7u4 CHzA== X-Gm-Message-State: AOJu0YzcYxwbHcbLtAySUuzDcgZk5uoDC98pK+uHvdTEYOyLtv/M6WbX z4aFqt4xx4Poq8fSKTI1d9BltFQNkEiBR8iN0NOMzA== X-Google-Smtp-Source: AGHT+IH76JsOET63AzPbh1zfGVBkmInda6nU1cCP3YyLrWdXD2f8lsg32L7iPQqD8Kc7/2L1/MTLZg== X-Received: by 2002:a05:600c:4ecc:b0:408:40e2:773b with SMTP id g12-20020a05600c4ecc00b0040840e2773bmr11040528wmq.34.1700044069994; Wed, 15 Nov 2023 02:27:49 -0800 (PST) Received: from localhost ([90.160.41.100]) by smtp.gmail.com with ESMTPSA id bi15-20020a05600c3d8f00b004095874f6d3sm14616597wmb.28.2023.11.15.02.27.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Nov 2023 02:27:49 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Wed, 15 Nov 2023 04:27:49 -0600 Message-Id: To: "pgsql-hackers" From: "Tristan Partin" Subject: On non-Windows, hard depend on uselocale(3) X-Mailer: aerc 0.16.0-68-g9b3e3d1b8803 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I have been working on adding using thread-safe locale APIs within=20 Postgres where appropriate[0]. The patch that I originally submitted=20 crashed during initdb (whoops!), so I worked on fixing the crash, which=20 led me to having to touch some code in chklocale.c, which became=20 a frustrating experience because chklocale.c is compiled in 3 different=20 configurations. > pgport_variants =3D { > '_srv': internal_lib_args + { > 'dependencies': [backend_port_code], > }, > '': default_lib_args + { > 'dependencies': [frontend_port_code], > }, > '_shlib': default_lib_args + { > 'pic': true, > 'dependencies': [frontend_port_code], > }, > } This means that some APIs I added or changed in pg_locale.c, can't be=20 used without conditional compilation depending on what variant is being=20 compiled. Additionally, I also have conditional compilation based on=20 HAVE_USELOCALE and WIN32. I would like to propose removing HAVE_USELOCALE, and just have WIN32,=20 which means that Postgres would require uselocale(3) on anything that=20 isn't WIN32. [0]: https://www.postgresql.org/message-id/CWMW5OZBWJ10.1YFLQWSUE5RE9@neon.= tech --=20 Tristan Partin Neon (https://neon.tech)