questions about concurrency control in Postgresql - Mailing list pgsql-hackers

From 黄晓骋
Subject questions about concurrency control in Postgresql
Date
Msg-id 000901ca77bb$b9e961b0$2dbc2510$@com
Whole thread Raw
Responses Re: questions about concurrency control in Postgresql  (Daniel Farina <drfarina@gmail.com>)
Re: questions about concurrency control in Postgresql  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
<div class="Section1"><p class="MsoNormal"><span lang="EN-US">Hello,</span><p class="MsoPlainText"><span lang="EN-US">I
thinkin Postgresql, concurrency control acts like this:</span><p class="MsoPlainText"><span lang="EN-US">tuple's
infomaskshows if it is being updated. If it is being updated now, the latter transaction should reread the tuple and
getthe newer tuple. During the progress of getting the newer tuple, it must use transaction lock, I mean
XactLockTableWait(...).</span><pclass="MsoPlainText"><span lang="EN-US">From the above, I think the tuple lock is
unnecessary,because it uses transaction lock.</span><p class="MsoPlainText"><span lang="EN-US">Besides, tuple lock is
unlockedafter the tuple is updated but not after the transaction commits. I mean it's not 2PL.</span><p
class="MsoPlainText"><spanlang="EN-US">So, may you tell me why there is tuple lock in Postgresql ? Is the tuple lock
necessary?</span><pclass="MsoPlainText"><span lang="EN-US"> </span><p class="MsoNormal"><span
lang="EN-US">Thanks,</span><pclass="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><span
lang="EN-US">--HuangXiaocheng</span><p class="MsoNormal"><span lang="EN-US">--Database & Information System Lab,
NankaiUniversity</span><p class="MsoNormal"><span lang="EN-US"> </span></div><br /><br />__________ Information from
ESETNOD32 Antivirus, version of virus signature database 4668 (20091207) __________<br /><br />The message was checked
byESET NOD32 Antivirus.<br /><br /><a href="http://www.eset.com">http://www.eset.com</a><br /> 

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: EXPLAIN BUFFERS
Next
From: Takahiro Itagaki
Date:
Subject: Re: EXPLAIN BUFFERS