Re: [HACKERS] parallel index(-only) scan breaks when run without parallelism

2017-03-07 Thread Amit Kapila
On Wed, Mar 8, 2017 at 12:27 AM, Robert Haas wrote: > Amit, Rafia, > > nodeIndexscan.c, unlike nodeSeqscan.c, thinks that a parallel-aware > scan will always be executed in parallel mode. But that's not true: > an Execute message with a non-zero row count could cause us to

[HACKERS] parallel index(-only) scan breaks when run without parallelism

2017-03-07 Thread Robert Haas
Amit, Rafia, nodeIndexscan.c, unlike nodeSeqscan.c, thinks that a parallel-aware scan will always be executed in parallel mode. But that's not true: an Execute message with a non-zero row count could cause us to abandon planned parallelism and execute the plan serially. I believe this would

Re: [HACKERS] Parallel Index-only scan

2017-02-21 Thread Rafia Sabih
On Sun, Feb 19, 2017 at 4:02 PM, Robert Haas wrote: > Committed, although I neglected to incorporate this change. Not sure > if I should go back and do that; it doesn't read too badly as-is. > Thanks Robert for committing, and thanks Rahila, Amit, and Tushar for reviewing

Re: [HACKERS] Parallel Index-only scan

2017-02-19 Thread Robert Haas
On Sat, Feb 18, 2017 at 12:02 PM, Amit Kapila wrote: > + /* > +* If we are here to just update the scan keys, then don't > reset parallel > +* scan. For detailed reason behind this look in the comments for > +* ExecReScanIndexScan. > +

Re: [HACKERS] Parallel Index-only scan

2017-02-17 Thread Amit Kapila
On Fri, Feb 17, 2017 at 10:35 AM, Rafia Sabih wrote: > > > On Thu, Feb 16, 2017 at 9:25 PM, Amit Kapila > wrote: >> >> >> 4. >> ExecReScanIndexOnlyScan(IndexOnlyScanState *node) >> { >> .. >> + /* >> + * if we are here to just update the

Re: [HACKERS] Parallel Index-only scan

2017-02-16 Thread Rafia Sabih
On Thu, Feb 16, 2017 at 9:25 PM, Amit Kapila wrote: > > Few comments: > > 1. > + * ioss_PscanLen This is needed for parallel index scan > * > */ > typedef struct IndexOnlyScanState > @@ -1427,6 +1428,7 @@ typedef struct IndexOnlyScanState >

Re: [HACKERS] Parallel Index-only scan

2017-02-16 Thread Amit Kapila
On Thu, Feb 16, 2017 at 3:57 PM, Rafia Sabih wrote: > > > On Thu, Feb 16, 2017 at 3:40 PM, Rafia Sabih > wrote: >> >> >> Please find the attached patch for rebased and cleaner version. >> > Please find the attached patch with a minor

Re: [HACKERS] Parallel Index-only scan

2017-02-16 Thread Rafia Sabih
On Thu, Feb 16, 2017 at 3:40 PM, Rafia Sabih wrote: > > On Thu, Feb 16, 2017 at 1:26 PM, Rahila Syed > wrote: > >> I reviewed the patch. Overall it looks fine to me. >> >> One comment, >> >> >- if (index->amcanparallel && >> >-

Re: [HACKERS] Parallel Index-only scan

2017-02-16 Thread Rafia Sabih
On Thu, Feb 16, 2017 at 1:26 PM, Rahila Syed 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)

Re: [HACKERS] Parallel Index-only scan

2017-02-15 Thread Rahila Syed
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,

Re: [HACKERS] Parallel Index-only scan

2017-02-15 Thread Robert Haas
On Thu, Jan 19, 2017 at 7:07 AM, Rafia Sabih wrote: > Please find the attached file rebased patch of parallel index-only > scan on the latest Parallel index-scan patch [1]. This again needs minor rebasing but basically looks fine. It's a pretty straightforward

Re: [HACKERS] Parallel Index-only scan

2017-01-31 Thread Michael Paquier
On Thu, Jan 19, 2017 at 9:07 PM, Rafia Sabih wrote: > Please find the attached file rebased patch of parallel index-only > scan on the latest Parallel index-scan patch [1]. Moved to CF 2017-03. -- Michael -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Parallel Index-only scan

2017-01-30 Thread tushar
On 01/19/2017 05:37 PM, Rafia Sabih wrote: Please find the attached file rebased patch of parallel index-only scan on the latest Parallel index-scan patch [1]. We did some testing of this feature and written few testcases. PFA the sql script(along with the expected .out files) In addition

Re: [HACKERS] Parallel Index-only scan

2017-01-19 Thread Rafia Sabih
On Fri, Jan 13, 2017 at 2:19 PM, Rafia Sabih wrote: > On Thu, Jan 12, 2017 at 5:39 PM, Rahila Syed wrote: >> Hello, >> >> On applying the patch on latest master branch and running regression tests >> following failure occurs. >> I applied it

Re: [HACKERS] Parallel Index-only scan

2017-01-13 Thread Rafia Sabih
On Thu, Jan 12, 2017 at 5:39 PM, Rahila Syed wrote: > Hello, > > On applying the patch on latest master branch and running regression tests > following failure occurs. > I applied it on latest parallel index scan patches as given in the link > above. > > *** >

Re: [HACKERS] Parallel Index-only scan

2017-01-12 Thread Rahila Syed
Hello, On applying the patch on latest master branch and running regression tests following failure occurs. I applied it on latest parallel index scan patches as given in the link above. *** /home/rahila/postgres/postgres/src/test/regress/expected/select_parallel.out 2017-01-03

Re: [HACKERS] Parallel Index-only scan

2016-12-27 Thread Amit Kapila
On Wed, Dec 28, 2016 at 12:18 PM, Rafia Sabih wrote: > Rebased patch of parallel-index only scan based on the latest version of > parallel index scan [1] is attached. > > [1] >

Re: [HACKERS] Parallel Index-only scan

2016-12-27 Thread Rafia Sabih
Rebased patch of parallel-index only scan based on the latest version of parallel index scan [1] is attached. [1] https://www.postgresql.org/message-id/CAA4eK1LiNi7_Z1% 2BPCV4y06o_v%3DZdZ1UThE%2BW9JhthX4B8uifnA%40mail.gmail.com On Sat, Dec 24, 2016 at 7:55 PM, Rafia Sabih

Re: [HACKERS] Parallel Index-only scan

2016-12-24 Thread Rafia Sabih
Extremely sorry for the inconvenience caused, please find the attached file for the latest version of the patch. On Sat, Dec 24, 2016 at 1:41 AM, Robert Haas wrote: > On Fri, Dec 23, 2016 at 3:03 PM, Tom Lane wrote: > > Or in words of one syllable:

Re: [HACKERS] Parallel Index-only scan

2016-12-23 Thread Robert Haas
On Fri, Dec 23, 2016 at 3:03 PM, Tom Lane wrote: > Or in words of one syllable: please do not use nabble to post to the > community mailing lists. Many of those words have two syllables, and one has four. Anyhow, I think three castigating emails from committers in a span of

Re: [HACKERS] Parallel Index-only scan

2016-12-23 Thread Tom Lane
Robert Haas writes: > On Fri, Dec 23, 2016 at 12:04 AM, rafia.sabih > wrote: >> Please find the attached file for the latest version of patch. >> parallel_index_only_v2.patch >>

Re: [HACKERS] Parallel Index-only scan

2016-12-23 Thread Alvaro Herrera
Robert Haas wrote: > On Fri, Dec 23, 2016 at 12:04 AM, rafia.sabih > wrote: > > Please find the attached file for the latest version of patch. > > > > parallel_index_only_v2.patch > > > > We

Re: [HACKERS] Parallel Index-only scan

2016-12-23 Thread Robert Haas
On Fri, Dec 23, 2016 at 12:04 AM, rafia.sabih wrote: > Please find the attached file for the latest version of patch. > > parallel_index_only_v2.patch > We want to have the patch actually

Re: [HACKERS] Parallel Index-only scan

2016-12-22 Thread rafia.sabih
Please find the attached file for the latest version of patch. parallel_index_only_v2.patch -- View this message in context: http://postgresql.nabble.com/Parallel-Index-only-scan-tp5934352p5936010.html Sent from the

[HACKERS] Parallel Index-only scan

2016-12-11 Thread Rafia Sabih
Hello all, This is to propose a patch for enabling parallel index-only scans. With the patch of parallel index scan around [1], adding the mechanism for parallelising index-only scans makes sense. Without this mechanism for the queries preferring index-only scans, it is likely that at higher scale