Postgresql select txid\U current与select txid\U current\U快照之间的差异
有下面的Postgresql select txid\U current与select txid\U current\U快照之间的差异,postgresql,transactions,Postgresql,Transactions,有下面的 Select txid_current(); Result:txid 004 Begin; Insert into tab values(2,45); Insert into tab values(3,56); Commit; 现在当我这么做的时候 Select txid_current(); It txid shows :006 txid_current_snapshot(); 显示txid:05 这两个问题的区别是什么?好问题 txid\u当前\u快照是文本表示,是xmin
Select txid_current();
Result:txid 004
Begin;
Insert into tab values(2,45);
Insert into tab values(3,56);
Commit;
现在当我这么做的时候
Select txid_current();
It txid shows :006
txid_current_snapshot();
显示txid:05
这两个问题的区别是什么?好问题
txid\u当前\u快照是文本表示,是xmin:xmax:xip\u列表。例如,10:20:10,14,15表示xmin=10,xmax=20,xip_list=10,14,15
xmin仍然处于活动状态的最早事务ID(txid)。早早
事务要么提交并可见,要么回滚并显示
死了
xmax第一个尚未分配的txid。比这个晚的所有TXID都是
截至快照时尚未启动,因此不可见
xip_列出快照时的活动TXID。他们都是
在xmin和xmax之间。是xmin的txid