Re: Failed pgbench: setrandom invalid maximum number 0

From: Greg Sabino Mullane <greg(at)endpoint(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Failed pgbench: setrandom invalid maximum number 0
Date: 2011-05-30 20:53:09
Message-ID: 20110530205308.GE3012@core.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> setrandom: invalid maximum number 0

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

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

--
Greg Sabino Mullane greg(at)endpoint(dot)com
End Point Corporation
PGP Key: 0x14964AC8

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2011-05-30 21:18:20 Re: Unlogged tables cannot be truncated twice
Previous Message Alvaro Herrera 2011-05-30 17:02:12 Re: 9.1 plperlu bug with null rows in trigger hash