Re: pgsql: Fix parallel index and index-only scans to fall back to serial.
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Amit Kapila <amit.kapila16@gmail.com>,
David G Johnston <david.g.johnston@gmail.com>
Date: 2018-07-19T13:13:18Z
Lists: pgsql-hackers
On 14/07/18 00:56, Robert Haas wrote: > On Fri, Jul 13, 2018 at 2:22 PM, Heikki Linnakangas <hlinnaka@iki.fi> wrote: >> I just bumped into this comment, from commit 09529a70bb5, and I can't make >> sense of it: >> >>> + /* >>> + * We reach here if the index only scan is not parallel, >>> or if we're >>> + * executing a index only scan that was intended to be >>> parallel >>> + * serially. >>> + */ >> >> >> What was that intended to say? > > There are two ways that you can reach that code. One is that you have > the thing that shows up in EXPLAIN output as "Index-Only Scan". The > other is that you have the thing that shows up in EXPLAIN output as > "Parallel Index-Only Scan", but you didn't get any workers, so now > you're falling back to running what was intended to be a parallel plan > without parallelism i.e. serially. The comment is intended to alert > you to the fact that an intended-as-parallel scan can end up here in > corner cases where the plan doesn't end up being parallel. We've had > some difficulty in consistently getting that case correct. Ah, gotcha. I changed that (and the other copies) per David's suggestion. - Heikki
Commits
-
Rephrase a few comments for clarity.
- 8b1d2685b82f 9.6.10 landed
- a1dc4ea02044 10.5 landed
- 45fcd758a07f 11.0 landed
- 99fdebaf2da9 12.0 landed
-
Fix parallel index and index-only scans to fall back to serial.
- 09529a70bb5a 10.0 cited