Seeing the following on an old box I use for testing various things. Thought it was something to do with my box at first, but the problem seems to only occur in >= 8.4. But it's also not pgbench alone, as it was working fine one day, and not the next. Here's what I now get on 8.4, 9.0, and 9.1:
$ pgbench btest1 -n setrandom: invalid maximum number 0 Client 0 aborted in state 3. Execution meta-command failed. transaction type: TPC-B (sort of) scaling factor: 0 query mode: simple number of clients: 1 number of threads: 1 number of transactions per client: 10 number of transactions actually processed: 0/10 tps = 0.000000 (including connections establishing) tps = 0.000000 (excluding connections establishing) What I get on 8.3 and older is this: $ pgbench btest1 -n transaction type: TPC-B (sort of) scaling factor: 1 number of clients: 1 number of transactions per client: 10 number of transactions actually processed: 10/10 tps = 332.005312 (including connections establishing) tps = 372.703216 (excluding connections establishing) Here's a snippet of strace for the failing run: <<closing .pgpass>> munmap(0xb773b000, 4096) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 3 fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 connect(3, {sa_family=AF_FILE, path="/tmp/.s.PGSQL.5900"}, 110) = 0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 getsockname(3, {sa_family=AF_FILE, NULL}, [2]) = 0 time(NULL) = 1306638084 time(NULL) = 1306638084 poll([{fd=3, events=POLLOUT|POLLERR}], 1, 10000) = 1 ([{fd=3, revents=POLLOUT}]) send(3, "\0\0\0#\0\3\0\0user\0greg\0database\0btest"..., 35, MSG_NOSIGNAL) = 35 time(NULL) = 1306638084 poll([{fd=3, events=POLLIN|POLLERR}], 1, 10000) = 1 ([{fd=3, revents=POLLIN}]) recv(3, "R\0\0\0\10\0\0\0\0S\0\0\0\26application_name\0\0"..., 16384, 0) = 332 gettimeofday({1306638084, 217401}, NULL) = 0 write(2, "setrandom: invalid maximum numbe"..., 36setrandom: invalid maximum number 0 ) = 36 write(2, "Client 0 aborted in state 3. Exe"..., 60Client 0 aborted in state 3. Execution meta-command failed. ) = 60 <<writing all the other lines seen above>> -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8
pgpDcL0wQEaVM.pgp
Description: PGP signature