Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Greg Nancarrow <gregn4422@gmail.com>
From: Greg Nancarrow <gregn4422@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>,
Tomas Vondra <tomas.vondra@enterprisedb.com>, Maxim Orlov <m.orlov@postgrespro.ru>, Michael Paquier <michael@paquier.xyz>, Pengchengliu <pengchengliu@tju.edu.cn>, Andres Freund <andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-08-18T13:28:20Z
Lists: pgsql-hackers
Attachments
- v9-0001-Fix-parallel-worker-failed-assertion-and-coredump.patch (application/octet-stream) patch v9-0001
On Wed, Aug 18, 2021 at 5:00 AM Robert Haas <robertmhaas@gmail.com> wrote: > > Ah ha! Thank you. So I think what I was missing here is that even > though the transaction snapshot is not a well-defined concept when > !IsolationUsesXactSnapshot(), we still need TransactionXmin to be set > to a value that's earlier than any XID we might inquire about. So the > proposal to install the leader's active snapshot as the worker's > transaction snapshot is really just a way of making that happen. Now > that I understand better, that seems OK to me when > !IsolationUsesXactSnapshot(), but otherwise I think we need to > serialize and restore the actual transaction snapshot. Do you agree? > Yes, I think I agree on that. I've updated the patch to restore the actual transaction snapshot in the IsolationUsesXactSnapshot() case, otherwise the active snapshot is installed as the transaction snapshot. I've tested the patch for the different transaction isolation levels, and the reported coredump (from assertion failure) is not occurring. (In the "serializable" case there are "could not serialize access due to read/write dependencies among transactions" errors, as Pavel has previously reported, but these occur without the patch and it appears to be an unrelated issue) Regards, Greg Nancarrow Fujitsu Australia
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