Re: Parallel Index Scan vs BTP_DELETED and BTP_HALF_DEAD

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel Index Scan vs BTP_DELETED and BTP_HALF_DEAD
Date: 2017-12-11 07:14:07
Message-ID: CAA4eK1J81sA-K--5NaiF60EufBfpF-voZ-FguLCyg98Hx-2heA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 11, 2017 at 8:21 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> Hi hackers,
>
>
> ... and then it called _bt_parallel_seize() itself, in violation of
> the rule (by my reading of the code) that you must call
> _bt_parallel_release() (via _bt_readpage()) or _bt_parallel_done()
> after seizing the scan. If you call _bt_parallel_seize() again
> without doing that first, you'll finish up waiting for yourself
> forever. Does this theory make sense?
>

Yes, I think if the current page is half-dead or deleted, we need to
set the next page to be scanned and release the parallel scan. This
has to be done for both forward and backward scans.

Thanks for looking into it. I will see if we can write some test. In
the meantime if possible, can you please request Patrick Hemmer to
verify the attached patch?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
fix_parallel_index_scan_v1.patch application/octet-stream 1.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-12-11 07:19:52 Re: SIGPIPE in TAP tests
Previous Message Amit Kapila 2017-12-11 06:50:44 Re: Added PostgreSQL internals learning materials in Developer FAQ