From: | Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Concurrent update failure in HEAD |
Date: | 2010-01-07 06:37:21 |
Message-ID: | 20100107153720.97AC.52131E4D@oss.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
pgbench_debug.patch | application/octet-stream | 808 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2010-01-07 07:12:40 | Re: email addresses |
Previous Message | Mike Landis | 2010-01-07 04:13:11 | email addresses |