parallel quicksort

From: Mark Wong <markwkm(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: parallel quicksort
Date: 2010-08-08 22:04:07
Message-ID: AANLkTinwQ=kGC=4sHqUvTgGWKVLh43WW7_ossJSUfXk3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi everyone,

I've been playing around with a process based parallel quicksort
(http://github.com/markwkm/quicksort) and I tried to shoehorn it into
postgres because I wanted to see if I could sort more than integers.
I've attached a patch that creates a new GUC to control the degree of
parallelism and only modified the quicksort algorithm in quicksort.c.
Trying to 'make install' quickly shows me the patch breaks zic and
Andrew Gierth further pointed out on irc (a couple months back now)
that user defined comparison functions won't work as expected in the
forked processes (if I remember that correctly).

Hoping this could be useful, I wanted to put out what I had so far and
see how far away this is from something workable. Not to mention that
there are probably some improvements that could be make to the
parallel quicksort algorithm.

In case anyone is interested in a parallel merge sort algorithm, I
have started something fairly basic here:
http://github.com/markwkm/mergesort

Regards,
Mark

Attachment Content-Type Size
pqs-1.patch application/octet-stream 11.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-08-08 22:17:14 Re: review: psql: edit function, show function commands patch
Previous Message Robert Haas 2010-08-08 21:40:48 Re: review: xml_is_well_formed