Thread: MVCC handling of updates

MVCC handling of updates

From
"Kevin Crenshaw"
Date:

How does MVCC function when two people try to update the same row at the same time?  I have read the documentation describing how MVCC functions, but I am still a little foggy on how it deals with updates. 

 

What is the best practice for dealing with concurrency for updates? 

 

 

Thanks for your help!

 

Kevin

Re: MVCC handling of updates

From
Tom Lane
Date:
"Kevin Crenshaw" <kcrenshaw@viscient.com> writes:
> How does MVCC function when two people try to update the same row at the
> same time?

Whoever gets there first will obtain a row lock on the target row,
and the later arrival(s) will block until the first one commits or
aborts.

            regards, tom lane