Thread: some questions in postgresql developping

some questions in postgresql developping

From
黄晓骋
Date:
<div class="Section1"><p align="left" class="MsoNormal" style="text-align:left"><span lang="EN-US"> </span><p
class="MsoNormal"><spanlang="EN-US">Hello,</span><p class="MsoNormal"><span lang="EN-US">I’m a student from Nankai
Universityin China. Now I and my team do a project which aims to integrate XML to Postgresql. What I do is to complete
thefunction of XML Update.</span><p class="MsoNormal"><span lang="EN-US">Now I’m researching in concurrency control. I
haveread the code about the concurrency control for a long time and I’m confident that I know it much. But I am puzzled
thatwhy we need to lock tuple. I think locking transaction is sufficient. I don’t think the tuple lock is good at
improvingexecuting rate or anything.</span><p class="MsoNormal"><span lang="EN-US">I am wishing for your
reply.</span><pclass="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">Best
Regards,</span><pclass="MsoNormal"><span lang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">--Huang
Xiaocheng</span><pclass="MsoNormal"><span lang="EN-US">--Database & Information System Lab, Nankai University,
China</span><pclass="MsoNormal"><span lang="EN-US"> </span></div><br /><br />__________ Information from ESET NOD32
Antivirus,version of virus signature database 4666 (20091207) __________<br /><br />The message was checked by ESET
NOD32Antivirus.<br /><br /><a href="http://www.eset.com">http://www.eset.com</a><br /> 

Re: some questions in postgresql developping

From
Robert Haas
Date:
2009/12/7 黄晓骋 <huangxclife@gmail.com>:
> I’m a student from Nankai University in China. Now I and my team do a
> project which aims to integrate XML to Postgresql. What I do is to complete
> the function of XML Update.
>
> Now I’m researching in concurrency control. I have read the code about the
> concurrency control for a long time and I’m confident that I know it much.
> But I am puzzled that why we need to lock tuple. I think locking transaction
> is sufficient. I don’t think the tuple lock is good at improving executing
> rate or anything.

The purpose of locking is to preserve correct semantics in the face of
concurrent activity, not to improve execution speed.  The reasons why
tuple locking is necessary should be covered in any introductory
database textbook.

...Robert