On Wed, Sep 30, 2015 at 7:05 AM, Robert Haas <robertmhaas@gmail.com> wrote: > > On Thu, Sep 24, 2015 at 2:31 PM, Amit Kapila <amit.kapila16@gmail.com> wrote: > > [ parallel_seqscan_partialseqscan_v18.patch ] > > I spent a bit of time reviewing the heapam.c changes in this patch > this evening, and I think that your attempt to add support for > synchronized scans has some problems. >
Thanks for the review and I agree with all the suggestions provided
by you. Fixed all of them in attached patch
(parallel_seqscan_heapscan_v1.patch).
I have rebased partial seq scan patch (as attached with this mail) to
test synchronized scan and parallelheapscan patch. Also I have added
Log (parallel_seqscan_heapscan_test_v1.patch) to see the start positions
during synchronized parallel heap scans. I have done various tests
with parallel scans and found that it works fine for sync scans as well
as without sync scan.
Basic test to verify the patch:
CREATE TABLE t1(c1, c2) AS SELECT g, repeat('x', 5) FROM
generate_series(1, 10000000) g;
CREATE TABLE t2(c1, c2) AS SELECT g, repeat('x', 5) FROM
generate_series(1, 1000000) g;
set parallel_tuple_cost=0.001
set max_parallel_degree=2;
set parallel_setup_cost=0;
SELECT count(*) FROM t1 JOIN t2 ON t1.c1 = t2.c1 AND t1.c1 BETWEEN 100 AND 200;
Run the above Select query from multiple clients and notice start scan
positions and Results of the query. It returns the expected results