Re: pgbench - add pseudo-random permutation function

From: Hironobu SUZUKI <hironobu(at)interdb(dot)jp>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: David Steele <david(at)pgmasters(dot)net>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Subject: Re: pgbench - add pseudo-random permutation function
Date: 2019-03-30 04:33:17
Message-ID: 307a532c-bc16-8b00-9395-15ca8f5129db@interdb.jp
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On 2019/03/21 17:27, David Steele wrote:
> Hi Hironobu,
>

Sorry for the late reply. I reviewed this patch.

Function nbits(), which was previously discussed, has been simplified by
using the function pg_popcount64().

By adding the mathematical explanation, it has been easier to understand
the operation of this function.

I believe that these improvements will have a positive impact on
maintenance.

The patch could be applied successfully and the tests passed without
problems.

So, I think the latest patch is fine.

Best regards,

> On 3/3/19 12:55 PM, Fabien COELHO wrote:
>>
>>> Indeed, the patch needs a rebase & conflit resolution. I'll do it.
>>> Later.
>>
>> Here is an update:
>>
>>   - take advantage of pg_bitutils (although I noted that the "slow"
>>     popcount there could be speeded-up and shorten with a bitwise
>> operator
>>     implementation that I just removed from pgbench).
>>
>>   - add comments about the bijective transformations in the code.
>>
>> As already stated, this function makes sense for people who want to
>> test performance with pgbench using non uniform rands. If you do not
>> want to do that, you will probably find the function pretty useless. I
>> can't help it.
>>
>> Also, non uniform rands is also a way to test pg lock contention
>> behavior.
>
> You have signed up as a reviewer for this patch.  Do you know when
> you'll have time to do the review?
>
> Regards,

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-03-30 05:09:47 Re: monitoring CREATE INDEX [CONCURRENTLY]
Previous Message Amit Langote 2019-03-30 02:19:58 Re: speeding up planning with partitions