Re: A worst case for qsort - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: A worst case for qsort
Date
Msg-id alpine.DEB.2.10.1408062105240.30492@sto
Whole thread Raw
In response to Re: A worst case for qsort  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
> Random pivot selection will certainly result in more frequent lopsided 
> partitions without any malicious intent.

Yep. It makes "adversary input" attacks more or less impossible, at the 
price of higher average cost. Maybe a less randomized version would do, 
i.e. select randomly one of the "3" medians found, but would keep some 
nice better performance property. It would need proof, though.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: posix_fadvise() and pg_receivexlog
Next
From: Fabien COELHO
Date:
Subject: Re: add modulo (%) operator to pgbench