Re:Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Pengchengliu <pengchengliu@tju.edu.cn>
From: 刘鹏程 <pengchengliu@tju.edu.cn>
To: Greg Nancarrow <gregn4422@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-05-15T02:37:29Z
Lists: 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
Commits
-
Fix broken snapshot handling in parallel workers.
- 96f6ef9fe451 10.19 landed
- 198cf81e2c64 11.14 landed
- f4b77e82ebf4 12.9 landed
- bc062cb93823 13.5 landed
- 11c1239881b3 14.0 landed
- a780b2fcce6c 15.0 landed
-
Doc: move some catalogs.sgml entries to the right place.
- 713a431c781f 14.0 cited
-
Stamp 13.2.
- 3fb4c75e857a 13.2 cited
-
Create an infrastructure for parallel computation in PostgreSQL.
- 924bcf4f16d5 9.5.0 cited