On Mon, Aug 20, 2012 at 9:13 PM, Alexander Korotkov <aekorot...@gmail.com>wrote:

> Current gistchoose code has a bug. I've started separate thread about it.
> http://archives.postgresql.org/pgsql-hackers/2012-08/msg00544.php
> Also, it obviously needs more comments.
>
> Current state of patch is more proof of concept than something ready. I'm
> going to change it in following ways:
> 1) We don't know how expensive user penalty function is. So, I'm going to
> change randomization algorithm so that it doesn't increase number of
> penalty calls in average.
> 2) Since, randomization could produce additional IO, there are probably no
> optimal solution for all the cases. We could introduce user-visible option
> which enables or disables randomization. However, default value of this
> option is another question.
>
>
>> Also, I think you should use random() rather than rand().
>>
>
> Thanks, will fix.
>

New version of patch is attached. Parameter "randomization" was introduced.
It controls whether to randomize choose. Choose algorithm was rewritten.

------
With best regards,
Alexander Korotkov.

Attachment: gist_choose_bloat-0.2.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to