Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Pavel Borisov <pashkin.elfe@gmail.com>
Cc: Greg Nancarrow <gregn4422@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-03T17:20:59Z
Lists: pgsql-hackers
On Tue, Aug 3, 2021 at 9:59 AM Pavel Borisov <pashkin.elfe@gmail.com> wrote: > I've looked at v5 patch. It is completely similar to v2 patch, which I've already tested using the workflow, I've described in the comments above. Before the patch I get the errors quite soon, the patch corrects them. Furthermore I've tested the same patch under REPEATABLE READ and SERIALIZABLE and detected no flaws. So, now, when we've got Robert's explanation, it seems to me that v2 (aka v5) patch can be committed (leaving possible REPEATABLE READ and SERIALIZABLE improvements for the future). I don't really sure it is still possible on 07/21 СF, but I'd change status of the patch to the ready-for-committer. Also I'd like the bugfix to be backported to the previous PG versions. I agree that the fix should be back-ported, but I'm not keen to commit anything unless it works for all isolation levels. The idea I sort of had floating around in my mind is a little different than what Greg has implemented. I was thinking that we could just skip SerializeSnapshot and the corresponding shm_toc_allocate() if !IsolationUsesXactSnapshot(). Then on the restore side we could just call shm_toc_lookup() with noError = true and skip RestoreTransactionSnapshot/RestoreSnapshot if it returns NULL. I don't know why Greg's patch is changing anything related to the active snapshot (as opposed to the transaction snapshot). Maybe there's a reason why we need that change, but I don't know what it is. -- Robert Haas EDB: http://www.enterprisedb.com
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