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: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A worst case for qsort
Date: 2014-08-06 13:56:24
Message-ID: alpine.DEB.2.10.1408061548010.28413@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> If so, adding some randomness in the decision process would suffice to
>> counter the adversarial input argument you raised.
>
> This is specifically addressed by the paper. Indeed, randomly choosing
> a pivot is a common strategy. It won't fix the problem.

Too bad. I must admit that I do not see how to build a test case which
would trigger a worst case behavior against a qsort which chooses the
pivot randomly, but I have not read the paper, and possibly there is an
element of context which is eluding me.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2014-08-06 14:12:45 Re: Enhancing pgbench parameter checking
Previous Message Marko Tiikkaja 2014-08-06 12:46:40 pgcrypto: PGP signatures