pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Generate parallel sequential scan plans in simple cases.
10+ messages / 9 participants
[nested] [flat]
* pgsql: Generate parallel sequential scan plans in simple cases.
@ 2015-11-11 14:03 Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 17:22 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. David Fetter <david@fetter.org>
0 siblings, 2 replies; 10+ messages in thread
From: Robert Haas @ 2015-11-11 14:03 UTC (permalink / raw)
To: pgsql-committers
Generate parallel sequential scan plans in simple cases.
Add a new flag, consider_parallel, to each RelOptInfo, indicating
whether a plan for that relation could conceivably be run inside of
a parallel worker. Right now, we're pretty conservative: for example,
it might be possible to defer applying a parallel-restricted qual
in a worker, and later do it in the leader, but right now we just
don't try to parallelize access to that relation. That's probably
the right decision in most cases, anyway.
Using the new flag, generate parallel sequential scan plans for plain
baserels, meaning that we now have parallel sequential scan in
PostgreSQL. The logic here is pretty unsophisticated right now: the
costing model probably isn't right in detail, and we can't push joins
beneath Gather nodes, so the number of plans that can actually benefit
from this is pretty limited right now. Lots more work is needed.
Nevertheless, it seems time to enable this functionality so that all
this code can actually be tested easily by users and developers.
Note that, if you wish to test this functionality, it will be
necessary to set max_parallel_degree to a value greater than the
default of 0. Once a few more loose ends have been tidied up here, we
might want to consider changing the default value of this GUC, but
I'm leaving it alone for now.
Along the way, fix a bug in cost_gather: the previous coding thought
that a Gather node's transfer overhead should be costed on the basis of
the relation size rather than the number of tuples that actually need
to be passed off to the leader.
Patch by me, reviewed in earlier versions by Amit Kapila.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/80558c1f5aa109d08db0fbd76a6d370f900628a8
Modified Files
--------------
src/backend/nodes/outfuncs.c | 1 +
src/backend/optimizer/path/allpaths.c | 190 ++++++++++++++++++++++++++++++++-
src/backend/optimizer/path/costsize.c | 2 +-
src/backend/optimizer/plan/planmain.c | 12 +++
src/backend/optimizer/plan/planner.c | 9 +-
src/backend/optimizer/util/clauses.c | 183 +++++++++++++++++++++++++------
src/backend/optimizer/util/relnode.c | 21 ++++
src/backend/utils/cache/lsyscache.c | 22 ++++
src/include/nodes/relation.h | 1 +
src/include/optimizer/clauses.h | 2 +-
src/include/utils/lsyscache.h | 1 +
11 files changed, 400 insertions(+), 44 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] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
@ 2015-11-11 15:32 ` Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Magnus Hagander <magnus@hagander.net>
1 sibling, 1 reply; 10+ messages in thread
From: Simon Riggs @ 2015-11-11 15:32 UTC (permalink / raw)
To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers
On 11 November 2015 at 14:03, Robert Haas <rhaas@postgresql.org> wrote:
> Generate parallel sequential scan plans in simple cases.
>
Congratulations!
--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/;
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
@ 2015-11-11 15:35 ` Magnus Hagander <magnus@hagander.net>
2015-11-11 15:54 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <robertmhaas@gmail.com>
2015-11-11 17:08 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Peter Geoghegan <pg@heroku.com>
0 siblings, 2 replies; 10+ messages in thread
From: Magnus Hagander @ 2015-11-11 15:35 UTC (permalink / raw)
To: Simon Riggs <simon@2ndquadrant.com>; +Cc: Robert Haas <rhaas@postgresql.org>; pgsql-committers
On Wed, Nov 11, 2015 at 4:32 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 11 November 2015 at 14:03, Robert Haas <rhaas@postgresql.org> wrote:
>
>
>> Generate parallel sequential scan plans in simple cases.
>>
>
> Congratulations!
>
>
+1. That's an exciting milestone!
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Magnus Hagander <magnus@hagander.net>
@ 2015-11-11 15:54 ` Robert Haas <robertmhaas@gmail.com>
2015-11-11 19:06 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Joe Conway <mail@joeconway.com>
1 sibling, 1 reply; 10+ messages in thread
From: Robert Haas @ 2015-11-11 15:54 UTC (permalink / raw)
To: Magnus Hagander <magnus@hagander.net>; +Cc: Simon Riggs <simon@2ndquadrant.com>; pgsql-committers
On Wed, Nov 11, 2015 at 10:35 AM, Magnus Hagander <magnus@hagander.net> wrote:
> On Wed, Nov 11, 2015 at 4:32 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> On 11 November 2015 at 14:03, Robert Haas <rhaas@postgresql.org> wrote:
>>> Generate parallel sequential scan plans in simple cases.
>> Congratulations!
>
> +1. That's an exciting milestone!
Thank you, both of you! I'm pretty excited.
Needless to say, there is a ton of work left. But I hope that getting
to this point will make it easier for other people to participate in
the work, or anyway, test.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
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] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Magnus Hagander <magnus@hagander.net>
2015-11-11 15:54 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <robertmhaas@gmail.com>
@ 2015-11-11 19:06 ` Joe Conway <mail@joeconway.com>
2015-11-11 23:58 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Joe Conway @ 2015-11-11 19:06 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; Magnus Hagander <magnus@hagander.net>; +Cc: Simon Riggs <simon@2ndquadrant.com>; pgsql-committers
On 11/11/2015 10:54 AM, Robert Haas wrote:
> On Wed, Nov 11, 2015 at 10:35 AM, Magnus Hagander <magnus@hagander.net> wrote:
>> On Wed, Nov 11, 2015 at 4:32 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>> On 11 November 2015 at 14:03, Robert Haas <rhaas@postgresql.org> wrote:
>>>> Generate parallel sequential scan plans in simple cases.
>>> Congratulations!
>>
>> +1. That's an exciting milestone!
>
> Thank you, both of you! I'm pretty excited.
>
> Needless to say, there is a ton of work left. But I hope that getting
> to this point will make it easier for other people to participate in
> the work, or anyway, test.
This is a huge milestone! Congratulations and many thanks for making it
happen.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Attachments:
signature.asc (application/pgp-signature, 835B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Magnus Hagander <magnus@hagander.net>
2015-11-11 15:54 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <robertmhaas@gmail.com>
2015-11-11 19:06 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Joe Conway <mail@joeconway.com>
@ 2015-11-11 23:58 ` Michael Paquier <michael.paquier@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Michael Paquier @ 2015-11-11 23:58 UTC (permalink / raw)
To: Joe Conway <mail@joeconway.com>; +Cc: Robert Haas <robertmhaas@gmail.com>; Magnus Hagander <magnus@hagander.net>; Simon Riggs <simon@2ndquadrant.com>; pgsql-committers
On Thu, Nov 12, 2015 at 4:06 AM, Joe Conway <mail@joeconway.com> wrote:
> On 11/11/2015 10:54 AM, Robert Haas wrote:
>> On Wed, Nov 11, 2015 at 10:35 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>> On Wed, Nov 11, 2015 at 4:32 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>>> On 11 November 2015 at 14:03, Robert Haas <rhaas@postgresql.org> wrote:
>>>>> Generate parallel sequential scan plans in simple cases.
>>>> Congratulations!
>>>
>>> +1. That's an exciting milestone!
>>
>> Thank you, both of you! I'm pretty excited.
>>
>> Needless to say, there is a ton of work left. But I hope that getting
>> to this point will make it easier for other people to participate in
>> the work, or anyway, test.
>
> This is a huge milestone! Congratulations and many thanks for making it
> happen.
Yay.
--
Michael
--
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] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Magnus Hagander <magnus@hagander.net>
@ 2015-11-11 17:08 ` Peter Geoghegan <pg@heroku.com>
2015-11-11 17:36 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Peter Geoghegan <pg@heroku.com>
1 sibling, 1 reply; 10+ messages in thread
From: Peter Geoghegan @ 2015-11-11 17:08 UTC (permalink / raw)
To: Magnus Hagander <magnus@hagander.net>; +Cc: Simon Riggs <simon@2ndquadrant.com>; Robert Haas <rhaas@postgresql.org>; pgsql-committers
On Wed, Nov 11, 2015 at 7:35 AM, Magnus Hagander <magnus@hagander.net> wrote:
>> Congratulations!
>>
>
> +1. That's an exciting milestone!
Congratulations, Robert.
--
Peter Geoghegan
--
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] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Magnus Hagander <magnus@hagander.net>
2015-11-11 17:08 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Peter Geoghegan <pg@heroku.com>
@ 2015-11-11 17:36 ` Peter Geoghegan <pg@heroku.com>
2015-11-18 11:51 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Amit Kapila <amit.kapila16@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Peter Geoghegan @ 2015-11-11 17:36 UTC (permalink / raw)
To: Magnus Hagander <magnus@hagander.net>; +Cc: Simon Riggs <simon@2ndquadrant.com>; Robert Haas <rhaas@postgresql.org>; pgsql-committers
On Wed, Nov 11, 2015 at 9:08 AM, Peter Geoghegan <pg@heroku.com> wrote:
> Congratulations, Robert.
I should certainly extend my congratulations to Amit too.
--
Peter Geoghegan
--
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] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Magnus Hagander <magnus@hagander.net>
2015-11-11 17:08 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Peter Geoghegan <pg@heroku.com>
2015-11-11 17:36 ` Re: pgsql: Generate parallel sequential scan plans in simple cases. Peter Geoghegan <pg@heroku.com>
@ 2015-11-18 11:51 ` Amit Kapila <amit.kapila16@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Amit Kapila @ 2015-11-18 11:51 UTC (permalink / raw)
To: Peter Geoghegan <pg@heroku.com>; +Cc: Magnus Hagander <magnus@hagander.net>; Simon Riggs <simon@2ndquadrant.com>; Robert Haas <rhaas@postgresql.org>; pgsql-committers
On Wed, Nov 11, 2015 at 11:06 PM, Peter Geoghegan <pg@heroku.com> wrote:
>
> On Wed, Nov 11, 2015 at 9:08 AM, Peter Geoghegan <pg@heroku.com> wrote:
> > Congratulations, Robert.
>
> I should certainly extend my congratulations to Amit too.
>
Thanks!
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: pgsql: Generate parallel sequential scan plans in simple cases.
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
@ 2015-11-11 17:22 ` David Fetter <david@fetter.org>
1 sibling, 0 replies; 10+ messages in thread
From: David Fetter @ 2015-11-11 17:22 UTC (permalink / raw)
To: pgsql-committers
On Wed, Nov 11, 2015 at 02:03:05PM +0000, Robert Haas wrote:
> Generate parallel sequential scan plans in simple cases.
Yay!!!!!
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
--
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] 10+ messages in thread
end of thread, other threads:[~2015-11-18 11:51 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-11-11 14:03 pgsql: Generate parallel sequential scan plans in simple cases. Robert Haas <rhaas@postgresql.org>
2015-11-11 15:32 ` Simon Riggs <simon@2ndQuadrant.com>
2015-11-11 15:35 ` Magnus Hagander <magnus@hagander.net>
2015-11-11 15:54 ` Robert Haas <robertmhaas@gmail.com>
2015-11-11 19:06 ` Joe Conway <mail@joeconway.com>
2015-11-11 23:58 ` Michael Paquier <michael.paquier@gmail.com>
2015-11-11 17:08 ` Peter Geoghegan <pg@heroku.com>
2015-11-11 17:36 ` Peter Geoghegan <pg@heroku.com>
2015-11-18 11:51 ` Amit Kapila <amit.kapila16@gmail.com>
2015-11-11 17:22 ` David Fetter <david@fetter.org>
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