Re: GUCs to control abbreviated sort keys

2023-02-06 Thread Thomas Munro
On Fri, Jan 27, 2023 at 12:29 PM Jeff Davis wrote: > I am using these GUCs for testing the various collation paths in my > collation refactoring branch. Speaking of testing, has anyone ever tried porting Tom's random test program[1] to ICU? [1]

Re: GUCs to control abbreviated sort keys

2023-02-06 Thread Peter Geoghegan
On Fri, Jan 27, 2023 at 12:34 PM Jeff Davis wrote: > It is non-deterministic, but I tried with two generated files, and got > similar results. Jeff and I coordinated off-list. It turned out that the nondeterministic nature of the program to generate test data was behind my initial inability to

Re: GUCs to control abbreviated sort keys

2023-01-27 Thread Jeff Davis
On Fri, 2023-01-27 at 11:41 -0800, Peter Geoghegan wrote: > I cannot recreate the issue you describe. Interesting. For my test: glibc 2.35 ICU 70.1 gcc11.3.0LLVM 14.0.0 > It's not impossible that the perl program you wrote produces > non-deterministic output It is

Re: GUCs to control abbreviated sort keys

2023-01-27 Thread Peter Geoghegan
On Thu, Jan 26, 2023 at 3:29 PM Jeff Davis wrote: > On Thu, 2023-01-26 at 22:39 +0100, Peter Eisentraut wrote: > > Maybe an easier way to enable or disable it in the source code with a > > #define would serve this. Making it a GUC right away seems a bit > > heavy-handed. Further exploration and

Re: GUCs to control abbreviated sort keys

2023-01-27 Thread Robert Haas
On Wed, Jan 25, 2023 at 4:16 PM Jeff Davis wrote: > $ perl text_generator.pl 1000 10 > /tmp/strings.txt > > CREATE TABLE s (t TEXT); > COPY s FROM '/tmp/strings.txt'; > VACUUM FREEZE s; > CHECKPOINT; > SET work_mem='10GB'; > SET max_parallel_workers = 0; > SET max_parallel_workers_per_gather

Re: GUCs to control abbreviated sort keys

2023-01-26 Thread Jeff Davis
On Thu, 2023-01-26 at 22:39 +0100, Peter Eisentraut wrote: > Maybe an easier way to enable or disable it in the source code with a > #define would serve this.  Making it a GUC right away seems a bit > heavy-handed.  Further exploration and tweaking might well require > further source code

Re: GUCs to control abbreviated sort keys

2023-01-26 Thread Peter Eisentraut
On 25.01.23 22:16, Jeff Davis wrote: I am highlighting this case because the existence of a single non- contrived case or regression suggests that we may want to explore further and tweak heuristics. That's quite natural when the heuristics are based on a complex dependency like a collation

Re: GUCs to control abbreviated sort keys

2023-01-25 Thread Jeff Davis
- AWS From 39ed011cc51ba3a4af5e3b559a7b8de25fb895a5 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Sat, 21 Jan 2023 12:44:07 -0800 Subject: [PATCH v2] Introduce GUCs to control abbreviated keys sort optimization. The setting sort_abbreviated_keys turns the optimization on or off ove

Re: GUCs to control abbreviated sort keys

2023-01-25 Thread Jeff Davis
On Tue, 2023-01-24 at 21:42 -0500, Robert Haas wrote: > I find it a bit premature to include this comment in the very first > email what if other people don't like the idea? The trust_strxfrm GUC was pulled from the larger collation refactoring patch, which has been out for a while. The

Re: GUCs to control abbreviated sort keys

2023-01-24 Thread Robert Haas
On Sat, Jan 21, 2023 at 8:16 PM Jeff Davis wrote: > This is fairly simple, so I plan to commit soon. I find it a bit premature to include this comment in the very first email what if other people don't like the idea? I would like to hear about the cases where abbreviated keys resulted in a

Re: GUCs to control abbreviated sort keys

2023-01-24 Thread Justin Pryzby
On Sat, Jan 21, 2023 at 05:16:01PM -0800, Jeff Davis wrote: > + xreflabel="sort_abbreviated_keys"> > + sort_abbreviated_keys (boolean) > + > + sort_abbreviated_keys configuration > parameter > + > + > + > + > +Enables or disables the use of

GUCs to control abbreviated sort keys

2023-01-21 Thread Jeff Davis
Davis Date: Sat, 21 Jan 2023 12:44:07 -0800 Subject: [PATCH v1] Introduce GUCs to control abbreviated keys sort optimization. The setting sort_abbreviated_keys turns the optimization on or off overall. The optimization relies on collation providers, which are complex dependencies, and the performance