Re: Parallel Index-only scan

From: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
To: Rahila Syed <rahilasyed90(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel Index-only scan
Date: 2017-02-16 10:27:50
Message-ID: CAOGQiiP9uxFGdr8VYoUZRo6w4JBz7o=fT3=UvigL_qW0uGp9AQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 16, 2017 at 3:40 PM, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
wrote:

>
> On Thu, Feb 16, 2017 at 1:26 PM, Rahila Syed <rahilasyed90(at)gmail(dot)com>
> wrote:
>
>> I reviewed the patch. Overall it looks fine to me.
>>
>> One comment,
>>
>> >- if (index->amcanparallel &&
>> >- !index_only_scan &&
>> >+ if ((index->amcanparallel ||
>> >+ index_only_scan) &&
>>
>> Why do we need to check for index_only_scan in the above condition. IIUC,
>> index->amcanparallel is necessary for
>> parallel index scan to be chosen. We cannot chose parallel index only
>> scan if index_only_scan is happening
>> without worrying about index->amcanparallel value. So OR-ing
>> index->amcanparallel with index_only_scan is probably not
>> correct.
>>
>> True, we do not need this, only removing !index_only_scan should work.
> Fixed
>
>>
>>
>> On Thu, Feb 16, 2017 at 1:06 AM, Robert Haas <robertmhaas(at)gmail(dot)com>
>> wrote:
>>>
>>>
>>> This again needs minor rebasing but basically looks fine. It's a
>>> pretty straightforward extension of the parallel index scan work.
>>>
>>> Please make sure that this is pgindent-clean - i.e. that when you
>>> pgindent the files that it touches, pgindent doesn't change anything
>>> of the same parts of the file that you've changed in the patch. Also,
>>> I believe Amit may have made some adjustments to the logic in
>>> nodeIndexScan.c; if so, it would be good to make sure that the
>>> nodeIndexOnlyScan.c changes match what was done there. In particular,
>>> he's got this:
>>>
>>> if (reset_parallel_scan && node->iss_ScanDesc->parallel_s
>>> can)
>>> index_parallelrescan(node->iss_ScanDesc);
>>>
>>> And you've got this:
>>>
>>> + if (reset_parallel_scan)
>>> + index_parallelrescan(node->ioss_ScanDesc);
>>>
>>
> Fixed.
> Please find the attached patch for rebased and cleaner version.
>
> Please find the attached patch with a minor comment update.

--
Regards,
Rafia Sabih
EnterpriseDB: http://www.enterprisedb.com/

Attachment Content-Type Size
parallel_index_only_v7.patch application/octet-stream 11.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2017-02-16 10:47:28 Re: UPDATE of partition key
Previous Message Abhijit Menon-Sen 2017-02-16 10:18:30 Re: Measuring replay lag