Transform the pg_lock_status() ids in tinc cases.
The ids in "(relation,*)" lines are not transformed, this would cause
failures if executed on segments, like below:
SELECT pg_lock_status() FROM foo
pg_lock_status
----------------------------------------------------------------------
- (relation,151955,151957,,,,,,,,2/4,29461,AccessShareLock,t,1117,t,0)
- (relation,151955,151957,,,,,,,,2/4,29461,AccessShareLock,t,1117,t,0)
- (relation,151955,151957,,,,,,,,2/4,29462,AccessShareLock,t,1117,t,1)
- (relation,151955,151957,,,,,,,,2/4,29462,AccessShareLock,t,1117,t,1)
+ (relation,151955,151957,,,,,,,,2/4,29453,AccessShareLock,t,1116,t,0)
+ (relation,151955,151957,,,,,,,,2/4,29453,AccessShareLock,t,1116,t,0)
+ (relation,151955,151957,,,,,,,,2/4,29454,AccessShareLock,t,1116,t,1)
+ (relation,151955,151957,,,,,,,,2/4,29454,AccessShareLock,t,1116,t,1)
(virtualxid,,,,,VIRTUAL/XID,,,,,VIRTUAL/XID,PID,ExclusiveLock,t,SESSIONID,t,0)
(virtualxid,,,,,VIRTUAL/XID,,,,,VIRTUAL/XID,PID,ExclusiveLock,t,SESSIONID,t,0)
(virtualxid,,,,,VIRTUAL/XID,,,,,VIRTUAL/XID,PID,ExclusiveLock,t,SESSIONID,t,1)
(virtualxid,,,,,VIRTUAL/XID,,,,,VIRTUAL/XID,PID,ExclusiveLock,t,SESSIONID,t,1)
(8 rows)
So we should transform them like the "(virtualxid,*)" lines.
Signed-off-by: NNing Yu <nyu@pivotal.io>
Showing
想要评论请 注册 或 登录