pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Fix parallel index and index-only scans to fall back to serial.
5+ messages / 4 participants
[nested] [flat]
Commits from this thread:
2018-07-19 99fdebaf2d 45fcd758a0 a1dc4ea020 8b1d2685b8 Rephrase a few comments for clarity.
* pgsql: Fix parallel index and index-only scans to fall back to serial.
@ 2017-03-08 13:17 Robert Haas <rhaas@postgresql.org>
2018-07-13 19:22 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 1 reply; 5+ messages in thread
From: Robert Haas @ 2017-03-08 13:17 UTC (permalink / raw)
To: pgsql-committers
Fix parallel index and index-only scans to fall back to serial.
Parallel executor nodes can't assume that parallel execution will
happen in every case where the plan calls for it, because it might
not work out that way. However, parallel index scan and parallel
index-only scan failed to do the right thing here. Repair.
Amit Kapila, per a report from me.
Discussion: http://postgr.es/m/CAA4eK1Kq5qb_u2AOoda5XBB91vVWz90w=LgtRLgsssriS8pVTw@mail.gmail.com
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/09529a70bb5a77935d086d651c63396767d240d7
Modified Files
--------------
src/backend/executor/nodeIndexonlyscan.c | 72 +++++++++++++------------
src/backend/executor/nodeIndexscan.c | 90 ++++++++++++++++++++------------
2 files changed, 96 insertions(+), 66 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix parallel index and index-only scans to fall back to serial.
2017-03-08 13:17 pgsql: Fix parallel index and index-only scans to fall back to serial. Robert Haas <rhaas@postgresql.org>
@ 2018-07-13 19:22 ` Heikki Linnakangas <hlinnaka@iki.fi>
2018-07-13 21:19 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. David G. Johnston <david.g.johnston@gmail.com>
2018-07-13 21:56 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. Robert Haas <robertmhaas@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Heikki Linnakangas @ 2018-07-13 19:22 UTC (permalink / raw)
To: Robert Haas <rhaas@postgresql.org>; pgsql-hackers <pgsql-hackers@postgresql.org>; Amit Kapila <amit.kapila16@gmail.com>
Hi!
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?
- Heikki
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix parallel index and index-only scans to fall back to serial.
2017-03-08 13:17 pgsql: Fix parallel index and index-only scans to fall back to serial. Robert Haas <rhaas@postgresql.org>
2018-07-13 19:22 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. Heikki Linnakangas <hlinnaka@iki.fi>
@ 2018-07-13 21:19 ` David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: David G. Johnston @ 2018-07-13 21:19 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnaka@iki.fi>; +Cc: Robert Haas <rhaas@postgresql.org>; pgsql-hackers <pgsql-hackers@postgresql.org>; Amit Kapila <amit.kapila16@gmail.com>
On Fri, Jul 13, 2018 at 12:22 PM, Heikki Linnakangas <hlinnaka@iki.fi>
wrote:
> Hi!
>
> 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?
>
>
I think...
...or if we're serially executing a[n] index only scan that was intended
to be [executed in] parallel
s/intended/planned/ ?
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix parallel index and index-only scans to fall back to serial.
2017-03-08 13:17 pgsql: Fix parallel index and index-only scans to fall back to serial. Robert Haas <rhaas@postgresql.org>
2018-07-13 19:22 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. Heikki Linnakangas <hlinnaka@iki.fi>
@ 2018-07-13 21:56 ` Robert Haas <robertmhaas@gmail.com>
2018-07-19 13:13 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. Heikki Linnakangas <hlinnaka@iki.fi>
1 sibling, 1 reply; 5+ messages in thread
From: Robert Haas @ 2018-07-13 21:56 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnaka@iki.fi>; +Cc: pgsql-hackers <pgsql-hackers@postgresql.org>; Amit Kapila <amit.kapila16@gmail.com>
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.
If you decide to rephase the comment for clarity, note that there are
three other near-copies of it cf. git grep -C4 'We reach here if'
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix parallel index and index-only scans to fall back to serial.
2017-03-08 13:17 pgsql: Fix parallel index and index-only scans to fall back to serial. Robert Haas <rhaas@postgresql.org>
2018-07-13 19:22 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. Heikki Linnakangas <hlinnaka@iki.fi>
2018-07-13 21:56 ` Re: pgsql: Fix parallel index and index-only scans to fall back to serial. Robert Haas <robertmhaas@gmail.com>
@ 2018-07-19 13:13 ` Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 0 replies; 5+ messages in thread
From: Heikki Linnakangas @ 2018-07-19 13:13 UTC (permalink / raw)
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>
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
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-07-19 13:13 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 13:17 pgsql: Fix parallel index and index-only scans to fall back to serial. Robert Haas <rhaas@postgresql.org>
2018-07-13 19:22 ` Heikki Linnakangas <hlinnaka@iki.fi>
2018-07-13 21:19 ` David G. Johnston <david.g.johnston@gmail.com>
2018-07-13 21:56 ` Robert Haas <robertmhaas@gmail.com>
2018-07-19 13:13 ` Heikki Linnakangas <hlinnaka@iki.fi>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox