Re: Parallel bitmap heap scan

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel bitmap heap scan
Date: 2016-11-26 21:45:22
Message-ID: CA+TgmoYpcuGz-0RA4Jz1ifcJ6J4z5ED+Dh9Fuc5AuYF26f1_dA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 26, 2016 at 7:40 AM, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> IMHO, barrier is used when multiple worker are doing some work
> together in phase1, and before moving to next phase all have to
> complete phase1, so we put barrier, so that before starting next phase
> all cross the barrier.
>
> But here case is different, only one worker need to finish the phase1,
> and as soon as it's over all can start phase2. But we don't have
> requirement that all worker should cross certain barrier. In this case
> even though some worker did not start, other worker can do their work.

I think the Barrier stuff has a process for choosing one worker to
conduct a particular phase. So it seems like if the Barrier API is
well-designed, you should be able to use it to decide who will conduct
the index scan, and then when that's done everyone can proceed to
scanning the heap. If that can't work for some reason, Thomas should
probably adjust his API so it does. He's presenting that as a
generally-useful primitive...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-11-26 22:13:19 Re: Alternative MATERIALIZED VIEW design and implementation with history table and other features
Previous Message Tom Lane 2016-11-26 18:51:17 Re: [sqlsmith] Failed assertion in TS_phrase_execute