I found pgbench sometimes receives responces of "UPDATE 0" from HEAD server. When I re-tested pgbench with 8.4.2 server, all of the results were "UPDATE 1". Are there known issues in HEAD for concurrent updates?
There were no problems if I used a few (1 or 2) connections, but 3 or more connections returns 0-UPDATEs. Since it also failed with -j1, multi-threading has nothing to do with the issue. So, there might be a bug in the server. I wrote the attached just for debugging. Strangely, even if it returns "UPDATE 0", I can retrive a row with the same condition after pgbench. $ pgbench -i $ pgbench -c3 -j1 -T10 starting vacuum...end. [0] miss update: UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid; => UPDATE 0 [0] variable: aid = 16625 [0] variable: bid = 1 [0] variable: delta = 1169 [0] variable: naccounts = 100000 [0] variable: nbranches = 1 [0] variable: ntellers = 10 [0] variable: scale = 1 [0] variable: tid = 1 $ psql -c "SELECT * FROM pgbench_branches WHERE bid = 1;" bid | bbalance | filler -----+----------+-------- 1 | -27026 | (1 row) I found the issue when I tested pg_stat_statements with pgbench. There were differences in 'calls' and 'rows' fields in it, but it should be same because pgbench always updates a row per query. Regards, --- Takahiro Itagaki NTT Open Source Software Center
pgbench_debug.patch
Description: Binary data
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs