Re: [HACKERS] [WIP] Zipfian distribution in pgbench

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Alik Khilazhev <a.khilazhev@postgrespro.ru>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-11-20T07:45:32Z
Lists: pgsql-hackers
Hello Alik,

Patch applies with "patch", but not with "git apply", probably because it 
is in CR-NL eol format. No big deal.

Documentation has been switched from SGML to XML, so now tags must be 
explicitely closed, i.e. use <foo>x</foo> instead of <foo>x</>.

Patch compiles with a warning:

  pgbench.c: In function ‘getZipfianRand’:
  pgbench.c:905:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

Declaration must move before assertion.

The random_zipfian(1,100,2) call result is not tested.

"1 times" -> "once".

"array overflow on \random_zipfian" remove spurious "\".



-- 
Fabien.

Commits

  1. Add approximated Zipfian-distributed random generator to pgbench.