On Mon, Oct 26, 2015 at 10:47 AM, chenhj <chjischj@163.com> wrote:
> >Can you reproduce the problem under a higher transaction isolation level?
> >
> >Cheers,
> >
> >Jeff
>
> Under higher transaction isolation level(REPEATABLE READ or SERIALIZABLE),
> only one transaction's UPDATE could be executed, the second transaction's
> UPDATE will be blocked util the first transaction committed and then
> throw "could not serialize access due to concurrent update" error.
>
Yes, this is the correct behavior. It can't serialize, so it gives an
error which the user can then decide how to handle (simply retry the same
transaction would probably be best, in this case).
It would be nice if pgbench had a mode where it would do the retry for you
upon retryable errors, but right now it doesn't.
Cheers,
Jeff