Re: BUG #15290: Stuck Parallel Index Scan query

Thomas Munro <thomas.munro@enterprisedb.com>

From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Victor Yegorov <vyegorov@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2018-07-25T09:55:57Z
Lists: pgsql-bugs
On Wed, Jul 25, 2018 at 5:46 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> I think here we can release the current page lock
>> before calling _bt_parallel_seize as we don't need it to get the next
>> page.
>
> I have written a patch on the above lines and manually verified (by
> reproducing the issue via debugger) that it fixes the issue.  Thomas,
> Victor, is it possible for you guys to see if the attached fixes the
> issue for you?

The patch looks good to me.  It fixes the problem for my reproducer
(BTW that works better with an extra zero on the generate_series
number).

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


Commits

  1. Fix the buffer release order for parallel index scans.