Re: Parallel bitmap heap scan - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Parallel bitmap heap scan
Date
Msg-id CA+TgmoYpcuGz-0RA4Jz1ifcJ6J4z5ED+Dh9Fuc5AuYF26f1_dA@mail.gmail.com
Whole thread Raw
In response to Re: Parallel bitmap heap scan  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: Parallel bitmap heap scan  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
On Sat, Nov 26, 2016 at 7:40 AM, Dilip Kumar <dilipbalaut@gmail.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [sqlsmith] Failed assertion in TS_phrase_execute
Next
From: Jim Nasby
Date:
Subject: Re: Alternative MATERIALIZED VIEW design and implementation with history table and other features