Re: Failed pgbench: setrandom invalid maximum number 0 - Mailing list pgsql-bugs

From Greg Sabino Mullane
Subject Re: Failed pgbench: setrandom invalid maximum number 0
Date
Msg-id 20110530205308.GE3012@core.home
Whole thread Raw
In response to Re: Failed pgbench: setrandom invalid maximum number 0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
> setrandom: invalid maximum number 0

Okay, nevermind, user error: some other process was deleting a=20
row from pgbench_branches, and the pgbench.c happily set scale=20
to 0 from the 'select count(*) from pgbench_branches' query=20
inside of it, until it gives the totally not-helpful error=20
seen above later on as it sets :scale to 0, multiplies the tpc_b=20
default number of branches by zero, and then complains when the=20
minimum number of branches (1) is less than the max allowed (0).=20

Oddly enough, the code checks for the count(*) < 0 but not <=3D 0.

--=20
Greg Sabino Mullane greg@endpoint.com
End Point Corporation
PGP Key: 0x14964AC8

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: 9.1 plperlu bug with null rows in trigger hash
Next
From: Alvaro Herrera
Date:
Subject: Re: Unlogged tables cannot be truncated twice