select for update和update的同步
【测试步骤】
session1
begin;
select * from t1 for update;
session2
update t1 set id=2 ;
【流程】
1)session1, 给tuple设置Xmax
2)session2,检测tuple状态
result = HeapTupleSatisfiesUpdate(&oldtup, cid, buffer); #HeapTupleBeingUpdated,无锁场景返回HeapTupleMayBeUpdated
3)session2, 进入等待逻辑
4)session1 释放锁,给session2发信号