Re: A worst case for qsort

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: John Cochran <j69cochran(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A worst case for qsort
Date: 2014-08-06 19:13:52
Message-ID: alpine.DEB.2.10.1408062105240.30492@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2014-08-06 19:22:30 Re: add modulo (%) operator to pgbench
Previous Message Heikki Linnakangas 2014-08-06 18:59:31 Re: posix_fadvise() and pg_receivexlog