Tigran Mkrtchyan <tigran(dot)mkrtchyan(at)desy(dot)de> writes:
> I got a incorrect or unexpected behavior in concurrent environment.
This is not a bug, nor even surprising. Since you haven't committed
the second transaction, there are a growing number of
dead-but-not-recyclable versions of the updated row. The active client
has to check each of these versions during its primary key uniqueness
check during each update.
regards, tom lane