Re: pgbench randomness initialization - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: pgbench randomness initialization
Date
Msg-id 152009888095.6915.17779297218559586604.pgcf@coridan.postgresql.org
Whole thread Raw
In response to Re: Re: [HACKERS] pgbench randomness initialization  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgbench randomness initialization  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, passed
Spec compliant:           not tested
Documentation:            tested, passed

The patch 8 works and addresses the things I noticed earlier.

It needs s/explicitely/explicitly/ in the docs.

The parsing of the seed involves matters of taste, I guess: if it were a signed int, then
sscanf's built-in %i would do everything those three explicit hex/octal/decimal branches
do, but there's no unsigned version of %i. Then there's strtoul(..., base=0), which accepts
the same choice of bases, but there's no unsigned-int-width version of that. Maybe it
would still look cleaner to use strtoul and just check that the result fits in unsigned int?
As I began, it comes down to taste ... this code does work.

I am not sure about the "idem for :random_seed" part: Does this mean that a value
could be given with -Drandom_seed on the command line, and become the value
of :random_seed, possibly different from the value given to --random-seed?
Is that intended? (Perhaps it is; I'm merely asking.)

-Chap

The new status of this patch is: Waiting on Author

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP: a way forward on bootstrap data
Next
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Minor fixes for reloptions tests