pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Andreas Karlsson <andreas@proxel.se>
To: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers@postgresql.org
Subject: Re: tiny step toward threading: reduce dependence on setlocale()
Date: Wed, 14 Aug 2024 15:55:03 -0700
Message-ID: <96a559be83329bc66074a3925ebcfa8ceb16dfc5.camel@j-davis.com> (raw)
In-Reply-To: <69c2a864-846f-4309-bd5a-aaa1c34f9a11@proxel.se>
References: <2228884bb1f1a02614b39f71a90c94d2cc8a3a2f.camel@j-davis.com>
	<239b7ef6ce058c6b1c77b3a0cfcc70c1cd8968b1.camel@j-davis.com>
	<f1935bc481438c9d86c2e0ac537b1c110d41a00a.camel@j-davis.com>
	<cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org>
	<56af65bde2190cc5ee20c807be7b7bdcda54f40c.camel@j-davis.com>
	<468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se>
	<59ea4275d75829a055fc55d8fe139eb85764cf2b.camel@j-davis.com>
	<ece40520-ca74-4b22-8463-f48215854511@proxel.se>
	<de1f1788-93bb-45cc-bef8-6f27119b2f3e@eisentraut.org>
	<89475ee5487d795124f4e25118ea8f1853edb8cb.camel@j-davis.com>
	<23cc1f3cfcdbdd3b2d3bb956d57ae422aa9d0b9e.camel@j-davis.com>
	<cfe99144-e1a3-458b-93c6-09b2eac1746e@eisentraut.org>
	<96d51fbb8b6f338a210cee97abb63c0162bcb781.camel@j-davis.com>
	<69c2a864-846f-4309-bd5a-aaa1c34f9a11@proxel.se>

On Wed, 2024-08-14 at 01:31 +0200, Andreas Karlsson wrote:
> 0001-Remove-lc_collate_is_c.patch
> 
> 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
> 
> Removes lc_ctype_is_c() and POSIX_COLLATION_OID which is no longer 
> 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
> 
> This patch removes a check against DEFAULT_COLLATION_OID which I
> thought 
> looked really dubious. Shouldn't this just be a simple check for if
> the 
> locale is deterministic? Since we know we have a valid locale that 
> 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
> 
> It is redundant to check both for "collation_is_c && deterministic",
> right?

+1.

> 0005-Remove-pg_collate_deterministic-and-check-field-dire.patch
> 
> Since after my patches we look a lot directly at the collation_is_c
> and 
> ctype_is_c fields I think the thin wrapper around the deterministic 
> field makes it seem like there is more to it so I suggest that we
> should 
> 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
> 
> Small refactor to make a hard to read function a bit easier to read.

Looks good to me.

Regards,
	Jeff Davis






view thread (33+ messages)  latest in thread

Message-ID: <96a559be83329bc66074a3925ebcfa8ceb16dfc5.camel@j-davis.com>
Permalink:  ../96a559be83329bc66074a3925ebcfa8ceb16dfc5.camel@j-davis.com/
Also on:    postgresql.org/message-id/96a559be83329bc66074a3925ebcfa8ceb16dfc5.camel@j-davis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, andreas@proxel.se, peter@eisentraut.org
  Subject: Re: tiny step toward threading: reduce dependence on setlocale()
  In-Reply-To: <96a559be83329bc66074a3925ebcfa8ceb16dfc5.camel@j-davis.com>
  References: <2228884bb1f1a02614b39f71a90c94d2cc8a3a2f.camel@j-davis.com> <239b7ef6ce058c6b1c77b3a0cfcc70c1cd8968b1.camel@j-davis.com> <f1935bc481438c9d86c2e0ac537b1c110d41a00a.camel@j-davis.com> <cfd9eb85-c52a-4ec9-a90e-a5e4de56e57d@eisentraut.org> <56af65bde2190cc5ee20c807be7b7bdcda54f40c.camel@j-davis.com> <468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se> <59ea4275d75829a055fc55d8fe139eb85764cf2b.camel@j-davis.com> <ece40520-ca74-4b22-8463-f48215854511@proxel.se> <de1f1788-93bb-45cc-bef8-6f27119b2f3e@eisentraut.org> <89475ee5487d795124f4e25118ea8f1853edb8cb.camel@j-davis.com> <23cc1f3cfcdbdd3b2d3bb956d57ae422aa9d0b9e.camel@j-davis.com> <cfe99144-e1a3-458b-93c6-09b2eac1746e@eisentraut.org> <96d51fbb8b6f338a210cee97abb63c0162bcb781.camel@j-davis.com> <69c2a864-846f-4309-bd5a-aaa1c34f9a11@proxel.se> <96a559be83329bc66074a3925ebcfa8ceb16dfc5.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox