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
Re: questions about concurrency control in Postgresql
List pgsql-hackers

Hello,

I think in Postgresql, concurrency control acts like this:

tuple's infomask shows if it is being updated. If it is being updated now, the latter transaction should reread the tuple and get the newer tuple. During the progress of getting the newer tuple, it must use transaction lock, I mean XactLockTableWait(...).

From the above, I think the tuple lock is unnecessary, because it uses transaction lock.

Besides, tuple lock is unlocked after the tuple is updated but not after the transaction commits. I mean it's not 2PL.

So, may you tell me why there is tuple lock in Postgresql ? Is the tuple lock necessary?

 

Thanks,

 

--Huang Xiaocheng

--Database & Information System Lab, Nankai University

 



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4668 (20091207) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

pgsql-hackers by date:

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