Concurrent update failure in HEAD - Mailing list pgsql-bugs

From Takahiro Itagaki
Subject Concurrent update failure in HEAD
Date
Msg-id 20100107153720.97AC.52131E4D@oss.ntt.co.jp
Whole thread Raw
Responses Re: Concurrent update failure in HEAD  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Concurrent update failure in HEAD  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5267: initdb fails on AIX: could not identify current directory
Next
From: "Mike Landis"
Date:
Subject: BUG #5268: PQgetvalue incorrectly returns 0