Re: Parallel bitmap heap scan

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel bitmap heap scan
Date: 2016-11-28 03:50:02
Message-ID: CAEepm=33AdVUK9t1yk2QbA11QJQV31WHbL=AhUOqE46fktcz-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 28, 2016 at 3:49 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> Do you think that using barrier's will simplify the patch as compared
> to using condition variables because in that case, it will make sense
> to use barriers?

It would work, but I suppose you might call it overkill. If they were
cooperating to build the bitmap in parallel then a barrier might look
more tempting, because then they'd all be waiting for each other to
agree that they've all finished doing that and are ready to scan.
When they're all just waiting for one guy to flip a single bit, then
it's debatable whether a barrier is any simpler than a condition
variable + a spinlock + a bit!

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2016-11-28 03:53:23 Re: Parallel bitmap heap scan
Previous Message Amit Kapila 2016-11-28 03:44:27 Re: UNDO and in-place update