Re:Re: Parallel scan with SubTransGetTopmostTransaction assert coredump - Mailing list pgsql-hackers

From 刘鹏程
Subject Re:Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Date
Msg-id AMkAGwA2DuDLiuCUBBPk1KoS.3.1621046249310.Hmail.2008202116@tju.edu.cn
Whole thread Raw
In response to Re: Parallel scan with SubTransGetTopmostTransaction assert coredump  (Greg Nancarrow <gregn4422@gmail.com>)
Responses Re: Re: Parallel scan with SubTransGetTopmostTransaction assert coredump  (Greg Nancarrow <gregn4422@gmail.com>)
List pgsql-hackers
Hi Greg,
  It is really weird. Could you make sure is the SnapShot overflow in you ENV? It is very impoint. 
  Abount SnapShot overflow and Subtrans, you can refer this https://www.cybertec-postgresql.com/en/subtransactions-and-performance-in-postgresql/. 
 
  In the script sub_120.sql, for one transaction, we use 120 transcations. So this pgxact->overflowed will be set to true. 
  Then snapshot must be overflow. When MVCC, it will call SubTransGetTopmostTransaction. 
  So the snapshot overflow is requirement.
  
  Even though there is no coredump in you ENV, from the codes, we can find some clue.
 
  First, in main process , ActiveSnapshot xmin is very likely preceds TransactionSnapShot xmin.
  Second, in parallel work process, it sets TransactionXmin with TransactionSnapShot from main process. But table Scan with ative Snapshot from main process.
  So in parallel work process SubTransGetTopmostTransaction, the Assert TransactionIdFollowsOrEquals(xid, TransactionXmin) is not correct. 
  At least this assert is unsuitable for parallel work process. 
  For my analyze, if there is any incorrect, please corret me.
  
  BTW, I test it in a high performance server. It is verly easily be reproduced. My colleague and me use different environment both can reproduce it. 
  
  
  Thanks
  Pengcheng

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Next
From: vignesh C
Date:
Subject: Re: Added missing tab completion for alter subscription set option