Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Maxim Orlov <m.orlov@postgrespro.ru>
From: Maxim Orlov <m.orlov@postgrespro.ru>
To: Greg Nancarrow <gregn4422@gmail.com>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>, Michael Paquier
<michael@paquier.xyz>, Pengchengliu <pengchengliu@tju.edu.cn>, Andres Freund
<andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-06-04T12:30:15Z
Lists: pgsql-hackers
Attachments
- max-cached-subxibds.patch (text/x-diff) patch
Just a note here. After examining the core dump I did notice something. While in XidInMVCCSnapshot call the snapshot->suboverflowed is set true although subxip == NULL and subxcnt == 0. As far as I understand, snapshot->suboverflowed is set true in the GetRunningTransactionData call. And then I decided to put elog around CurrentRunningXacts->subxcnt's assigment. diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 42a89fc5dc9..3d2db02f580 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -2781,6 +2781,9 @@ GetRunningTransactionData(void) * increases if slots do. */ + if (suboverflowed) + elog(WARNING, " >>> CurrentRunningXacts->subxid_overflow is true"); + CurrentRunningXacts->xcnt = count - subcount; CurrentRunningXacts->subxcnt = subcount; CurrentRunningXacts->subxid_overflow = suboverflowed; ... and did get a bunch of messages. I.e. subxid_overflow is set true very often. I've increased the value of PGPROC_MAX_CACHED_SUBXIDS. Once it becomes more than 120 there are no messages and no failed assertions are provided any more. --- Best regards, Maxim Orlov.
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