Re: [HACKERS] questions about concurrency control in Postgresql

2009-12-08 Thread Greg Stark
2009/12/8 黄晓骋 : > 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. It's a two step process. An update marks the tuple locked. Anoth

Re: [HACKERS] questions about concurrency control in Postgresql

2009-12-07 Thread Daniel Farina
2009/12/7 黄晓骋 : > 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

[HACKERS] questions about concurrency control in Postgresql

2009-12-07 Thread 黄晓骋
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