Re: Collation & ctype method table, and extension hooks - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Collation & ctype method table, and extension hooks
Date
Msg-id 25e8c88b2567ba4deb82d6752eef9bc1f9753919.camel@j-davis.com
Whole thread Raw
In response to Re: Collation & ctype method table, and extension hooks  (Andreas Karlsson <andreas@proxel.se>)
List pgsql-hackers
On Fri, 2024-11-01 at 14:08 +0100, Andreas Karlsson wrote:
> > Agreed -- a lot of work has gone into optimizing the regex code,
> > and we
> > don't want a perf regression there. But I'm also not sure exactly
> > which
> > kinds of tests I should be running for that.
>
> I think we should at least try to find the worst case to see how big
> the
> performance hit for that is. And then after that try to figure out a
> more typical case benchmark.

What I had in mind was:

  * a large table with a single ~100KiB text field
  * a scan with a case insensitive regex that uses some character
classes

Does that sound like a worst case?

> The painful part was mostly just a reference to that without a
> catalog
> table where new providers can be added we would need to add
> collations
> for our new custom provider on some already existing provider and
> then
> do for example some pattern matching on the name of the new
> collation.
> Really ugly but works.

To add a catalog table for the locale providers, the main challenge is
around the database default collation and, relatedly, initdb. Do you
have some ideas around that?

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: AIO writes vs hint bits vs checksums
Next
From: Andres Freund
Date:
Subject: Re: Adding NetBSD and OpenBSD to Postgres CI