Re: General purpose hashing func in pgbench - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: General purpose hashing func in pgbench
Date
Msg-id alpine.DEB.2.20.1801260714070.26762@lancre
Whole thread Raw
In response to Re: General purpose hashing func in pgbench  (Ildar Musin <i.musin@postgrespro.ru>)
Responses Re: General purpose hashing func in pgbench
List pgsql-hackers
Hello Ildar,

Applies, compiles, runs.

I still have a few very minor comments, sorry for this (hopefully) last 
iteration from my part. I'm kind of iterative...

The XML documentation source should avoid a paragraph on one very long 
line, but rather be indented like other sections.

I'd propose simplify the second part:

   Hash functions can be used, for example, to modify the distribution of
   <literal>random_zipfian</literal> or <literal>random_exponential</literal>
   functions in order to obtain scattered distribution.
   Thus the following pgbench script simulates possible real world workload
   typical for social media and blogging platforms where few accounts
   generate excessive load:

->

   Hash functions can be used to scatter the distribution of random
   functions such as <literal>random_zipfian</literal> or
   <literal>random_exponential</literal>.
   For instance, the following pgbench script simulates possible real
   world workload typical for social media and blogging platforms where
   few accounts generate excessive load:

Comment the Assert(0) as an internal error that cannot happen.

I'd suggest to compact the execution code by declaring int64 variable and 
coerce to int in one go, like the integer bitwise functions. I'm in favor 
to keeping them in their own case and not reuse this one.

-- 
Fabien.


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Restrict concurrent update/delete with UPDATE ofpartition key