Re: Parallel Seq Scan

From: Thom Brown <thom(at)linux(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel Seq Scan
Date: 2015-01-20 16:58:19
Message-ID: CAA-aLv4MWZEVa1eA2O6apTF-+3oEYXo-RKWvbkq8eHmv6EKvog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 January 2015 at 16:55, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:

>
> On Tue, Jan 20, 2015 at 9:43 PM, Thom Brown <thom(at)linux(dot)com> wrote:
> >
> > On 20 January 2015 at 14:29, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> wrote:
> >>
> >> On Thu, Jan 15, 2015 at 6:57 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
> wrote:
> >> > On Mon, Jan 12, 2015 at 3:25 AM, Robert Haas <robertmhaas(at)gmail(dot)com>
> wrote:
> >> > >
> >> > > Yeah, you need two separate global variables pointing to shm_mq
> >> > > objects, one of which gets used by pqmq.c for errors and the other
> of
> >> > > which gets used by printtup.c for tuples.
> >> > >
> >> >
> >> > Okay, I will try to change the way as suggested without doing
> >> > switching, but this way we need to do it separately for 'T', 'D', and
> >> > 'C' messages.
> >> >
> >>
> >> I have taken care of integrating the parallel sequence scan with the
> >> latest patch posted (parallel-mode-v1.patch) by Robert at below
> >> location:
> >>
> http://www.postgresql.org/message-id/CA+TgmoZdUK4K3XHBxc9vM-82khourEZdvQWTfgLhWsd2R2aAGQ@mail.gmail.com
> >>
> >> Changes in this version
> >> -----------------------------------------------
> >> 1. As mentioned previously, I have exposed one parameter
> >> ParallelWorkerNumber as used in parallel-mode patch.
> >> 2. Enabled tuple queue to be used for passing tuples from
> >> worker backend to master backend along with error queue
> >> as per suggestion by Robert in the mail above.
> >> 3. Involved master backend to scan the heap directly when
> >> tuples are not available in any shared memory tuple queue.
> >> 4. Introduced 3 new parameters (cpu_tuple_comm_cost,
> >> parallel_setup_cost, parallel_startup_cost) for deciding the cost
> >> of parallel plan. Currently, I have kept the default values for
> >> parallel_setup_cost and parallel_startup_cost as 0.0, as those
> >> require some experiments.
> >> 5. Fixed some issues (related to memory increase as reported
> >> upthread by Thom Brown and general feature issues found during
> >> test)
> >>
> >> Note - I have yet to handle the new node types introduced at some
> >> of the places and need to verify prepared queries and some other
> >> things, however I think it will be good if I can get some feedback
> >> at current stage.
> >
> >
> > Which commit is this based against? I'm getting errors with the latest
> master:
> >
>
> It seems to me that you have not applied parallel-mode patch
> before applying this patch, can you try once again by first applying
> the patch posted by Robert at below link:
>
> http://www.postgresql.org/message-id/CA+TgmoZdUK4K3XHBxc9vM-82khourEZdvQWTfgLhWsd2R2aAGQ@mail.gmail.com
>
> commit-id used for this patch - 0b49642
>

D'oh. Yes, you're completely right. Works fine now.

Thanks.

Thom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-01-20 17:12:32 Re: proposal: searching in array function - array_position
Previous Message Amit Kapila 2015-01-20 16:55:49 Re: Parallel Seq Scan