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