Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 8D534B5DC47 for ; Mon, 30 May 2011 18:01:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 59550-01-4 for ; Mon, 30 May 2011 21:00:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.endcrypt.com (mail.endcrypt.com [74.205.105.202]) by mail.postgresql.org (Postfix) with ESMTP id BD3A4B5F3EB for ; Mon, 30 May 2011 17:53:11 -0300 (ADT) Received: from core.home (pool-96-227-80-201.phlapa.fios.verizon.net [96.227.80.201]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.endcrypt.com (Postfix) with ESMTP id 1D7C931C14; Mon, 30 May 2011 20:53:11 +0000 (UTC) Date: Mon, 30 May 2011 16:53:09 -0400 From: Greg Sabino Mullane To: pgsql-bugs@postgresql.org Subject: Re: Failed pgbench: setrandom invalid maximum number 0 Message-ID: <20110530205308.GE3012@core.home> References: <20110529031155.GA13070@core.home> <8072.1306641301@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="FN+gV9K+162wdwwF" Content-Disposition: inline In-Reply-To: <8072.1306641301@sss.pgh.pa.us> X-PGP-Key: http://www.gtsm.com/Greg_Sabino_Mullane.key.html User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/224 X-Sequence-Number: 30363 --FN+gV9K+162wdwwF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > 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 --FN+gV9K+162wdwwF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAk3kA7QACgkQvJuQZxSWSshxGwCfeAS0Q+SUPIVSY9vbdDa2dgrH 3h8AoN/r6QA8/iGmiA+xhkLVULGhhh3W =0gbN -----END PGP SIGNATURE----- --FN+gV9K+162wdwwF--