Parallel index builds in postgres thanks to work by @petervgeoghegan and others!
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9da0cc35284bdbe8d442d732963303ff0e0a40bc …
-
Show this thread
-
@petervgeoghegan How about making JITing of the in-memory portion qsort your next task? ;)1 reply 0 retweets 2 likesShow this thread -
Replying to @AndresFreundTec
I was thinking of adding more qsort specializations to make SortTuple structs smaller in some cases (24 bytes -> 16) anyway. Found this sped up CREATE INDEX CONCURRENTLY TID sort quite nicely. Maybe JITing would be the easiest way to do this.
1 reply 0 retweets 2 likes -
Replying to @petervgeoghegan
I think it's worth a try - I suspect it'll often end up being faster and definitely less duplicative, but ...
1 reply 0 retweets 0 likes -
Replying to @AndresFreundTec @petervgeoghegan
FWIW, not having thought this through, it doesn't sound hard: Create jit context, use it to create wrapper function calling pg_qsort with constant comparator, force inlining to be enabled, use created function. ~30-60 LOC.
1 reply 0 retweets 0 likes -
Replying to @AndresFreundTec
In the case of CIC TID sorts, I actually got it down to 8 bytes per "SortTuple" -- in fact, Tuplesort was sorting raw Datums. 3x memory saving was quite nice.
1 reply 0 retweets 1 like
Not bad. But I've to admit I'm a bit more interested in making tuplesorts used in analytics queries faster ;)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.