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 1seMtc-006NrS-SR for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Aug 2024 22:55:13 +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 1seMta-00DM4c-Uq for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Aug 2024 22:55:10 +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 1seMta-00DM4M-Fp for pgsql-hackers@lists.postgresql.org; Wed, 14 Aug 2024 22:55:10 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1seMtW-004ljl-HE for pgsql-hackers@postgresql.org; Wed, 14 Aug 2024 22:55:08 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-710d1de6ee5so314179b3a.0 for ; Wed, 14 Aug 2024 15:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1723676105; x=1724280905; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Vs4QPZZScaQkEiUYp3e/UaWqNI9x61AVGUco18BPdsE=; b=xSqFDUBQSZ0ITTJvvfVbnMFmmfsLGUnVZuT4G/EEN3G2F5uZugkylzce9SFNjuNHvB VyQQtgNjifVPeJchm+Q6EDwx2lwYFxluPgteh5iAKZhAKEdB+pIeMJYPdqR/HfqUre/g X4eAxt9h6IgTUQZRAxYefoY9sXoaVOtNCkNJJV17Cr43bnl9tmz82+6F7cLDWYHd75xG XTmXjdGg8s4RHI8Rp3ZsW52sZlOz1Rv1+RFTd8d7EK6A6PY9YMHgQN2CpL0ApiMYlVlb Nn7gtfTGH/JnaYhDXyepuYwyrSx9FexpnlpKTM/mNvNNbWELtB/ycbnrgm+ejjiVAJWp ctMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723676105; x=1724280905; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Vs4QPZZScaQkEiUYp3e/UaWqNI9x61AVGUco18BPdsE=; b=utFEHJmI6UqrARDPCTQlM0jQ/qbKkakqSclsD0ziWymFZs2Eo9H1wkd1M+gd8sjEPh cUzMpKUw1nh/tkaT75GG+Yk07MnNtWhKZLHBzL2Z6wWom4dd7sE5a7aNtaaNaZjOoJq1 wf5FJLi32OWUgIxmvKPVwfmMHsKLvZEd8kj1+4AYRmMQT88XQZL8/RHjF16/ylRAX6Rs q9iCzapfHYzKeWrjfhMjuaYTI7joDSKz/34ot45U8WvP8zoVm9E9LJVSbGUK1xC0bBz9 tQJS5n3WeSDZzUbaGeeRcCT/hFHvBk3osZmL39TQjskTiFyUV4W628p1ozXJcUQPgKLe 9EnQ== X-Forwarded-Encrypted: i=1; AJvYcCX69gHmByjztjRPl3MOeD/B8b/cS+Gsf2bT4n0gUSH4pnbHC3hyUoow4fPUvUNobD7EdBaEeOiBoK2z61Gf@postgresql.org X-Gm-Message-State: AOJu0YxJZSGqL3N4cTpTS/pA5Iw6h4fsi5R/BGV3MyiLIZtZy/LF8ZgF 88x+Csqg6v7qx7Fhk5oZBhP5bAzXq3CtofPGWuHw0xl5loin+vnG1XNeBoCXPQ== X-Google-Smtp-Source: AGHT+IGeibWIrxYZK5t2r/WQ3JnKfU6i2musL96DqIbReLgTg4fPYNt86JdlWSrC5KwMuT/f5Riryw== X-Received: by 2002:a05:6a00:2e90:b0:70d:2837:6089 with SMTP id d2e1a72fcca58-71267102244mr5341291b3a.11.1723676105289; Wed, 14 Aug 2024 15:55:05 -0700 (PDT) Received: from jeff-laptop.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef5210sm82996b3a.126.2024.08.14.15.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 15:55:04 -0700 (PDT) Message-ID: <96a559be83329bc66074a3925ebcfa8ceb16dfc5.camel@j-davis.com> Subject: Re: tiny step toward threading: reduce dependence on setlocale() From: Jeff Davis To: Andreas Karlsson , Peter Eisentraut , pgsql-hackers@postgresql.org Date: Wed, 14 Aug 2024 15:55:03 -0700 In-Reply-To: <69c2a864-846f-4309-bd5a-aaa1c34f9a11@proxel.se> References: <2228884bb1f1a02614b39f71a90c94d2cc8a3a2f.camel@j-davis.com> <239b7ef6ce058c6b1c77b3a0cfcc70c1cd8968b1.camel@j-davis.com> <56af65bde2190cc5ee20c807be7b7bdcda54f40c.camel@j-davis.com> <468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se> <59ea4275d75829a055fc55d8fe139eb85764cf2b.camel@j-davis.com> <89475ee5487d795124f4e25118ea8f1853edb8cb.camel@j-davis.com> <23cc1f3cfcdbdd3b2d3bb956d57ae422aa9d0b9e.camel@j-davis.com> <96d51fbb8b6f338a210cee97abb63c0162bcb781.camel@j-davis.com> <69c2a864-846f-4309-bd5a-aaa1c34f9a11@proxel.se> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2024-08-14 at 01:31 +0200, Andreas Karlsson wrote: > 0001-Remove-lc_collate_is_c.patch >=20 > Removes lc_collate_is_c(). This could use some performance testing, as the commit message says, otherwise it looks good. > 0002-Remove-lc_ctype_is_c.patch >=20 > Removes lc_ctype_is_c() and POSIX_COLLATION_OID which is no longer=20 > necessary. This overlaps a bit with what Peter already proposed here: https://www.postgresql.org/message-id/4f562d84-87f4-44dc-8946-01d6c437936f%= 40eisentraut.org right? > 0003-Remove-dubious-check-against-default-locale.patch >=20 > This patch removes a check against DEFAULT_COLLATION_OID which I > thought=20 > looked really dubious. Shouldn't this just be a simple check for if > the=20 > locale is deterministic? Since we know we have a valid locale that=20 > should be enough, right? Looks good to me. The code was correct in the sense that the default collation is always deterministic, but (a) Peter is working on non- deterministic default collations; and (b) it was a redundant check. > 0004-Do-not-check-both-for-collate_is_c-and-deterministic.patch >=20 > It is redundant to check both for "collation_is_c && deterministic", > right? +1. > 0005-Remove-pg_collate_deterministic-and-check-field-dire.patch >=20 > Since after my patches we look a lot directly at the collation_is_c > and=20 > ctype_is_c fields I think the thin wrapper around the deterministic=20 > field makes it seem like there is more to it so I suggest that we > should=20 > just remove it. +1. When I added that, there was also a NULL check, but that was removed so we might as well just read the field. > 0006-Slightly-refactor-varstr_sortsupport-to-improve-read.patch >=20 > Small refactor to make a hard to read function a bit easier to read. Looks good to me. Regards, Jeff Davis