【事务】可重复读
【实验】
session1
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
select count(1) from t1;
session2
insert into t1(id) values(1);
结果:session1读不到session2已经提交的数据
【原理】
tuple.xmin>=snapshot.xmax,就不可见
HeapTupleSatisfiesMVCC
XidInMVCCSnapshot(HeapTupleHeaderGetRawXmin(tuple), snapshot)==true
if (TransactionIdFollowsOrEquals(xid, snapshot->xmax))
#两个相同,返回true
#return false