Re: strange parallel query behavior after OOM crashes
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Kuntal Ghosh <kuntalghosh.2007@gmail.com>, Thomas Munro <thomas.munro@enterprisedb.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-04-05T13:39:07Z
Lists: pgsql-hackers
On Tue, Apr 4, 2017 at 1:52 PM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote: > In any case, the comment right before BackgroundWorkerArray says this: > > * These counters can of course overflow, but it's not important here > * since the subtraction will still give the right number. > > which means that this assert > > + Assert(BackgroundWorkerData->parallel_register_count >= > + BackgroundWorkerData->parallel_terminate_count); > > is outright broken, just like any other attempts to rely on simple > comparisons of these two counters, no? Yeah, that's busted. Good catch. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Add an Assert() to max_parallel_workers enforcement.
- 6599c9ac3340 10.0 landed
-
Fix confusion of max_parallel_workers mechanism following crash.
- 8ff518699f19 10.0 landed
-
Add max_parallel_workers GUC.
- b460f5d66931 10.0 cited