From: | Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com> |
---|---|
To: | Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Passing query string to workers |
Date: | 2017-02-07 04:49:24 |
Message-ID: | CAOGQiiP0kQO6mvzD12iXFOVjjcTeaR94-jseTKw0zHPF_mR1tw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 23, 2017 at 2:46 PM, Kuntal Ghosh
<kuntalghosh(dot)2007(at)gmail(dot)com> wrote:
> I've looked into the patch. I've some comments regarding that.
>
> +#define PARALLEL_KEY_QUERY_TEXT UINT64CONST(0xE000000000000010)
> It should be UINT64CONST(0xE00000000000000A)
>
> + query_len = strlen(query_data) + 1;
> + shm_toc_estimate_chunk(&pcxt->estimator, query_len);
> + shm_toc_estimate_keys(&pcxt->estimator, 1);
> +
> Adding a comment before this will be helpful. You should maintain the
> same order for estimating and storing the query string. For example,
> as you've estimated the space for query string after estimation of dsa
> space, you should store the same after creating dsa. Besides, I think
> the appropriate place for this would be before planned statement.
Fixed.
> The regression test for select_parallel is failing after applying the
> patch. You can reproduce the scenario by the following sql statements:
>
> CREATE TABLE t1(a int);
> INSERT INTO t1 VALUES (generate_series(1,100000));
> SET parallel_setup_cost=0;
> SET parallel_tuple_cost=0;
> SET min_parallel_relation_size=0;
> SET max_parallel_workers_per_gather=4;
> SELECT count(*) FROM t1;
>
> It is showing the following warning.
> WARNING: problem in alloc set ExecutorState: detected write past
> chunk end in block 0x14f5310, chunk 0x14f6c50
Fixed.
Thanks a lot Kuntal for the review, please find attached patch for the
revised version.
--
Regards,
Rafia Sabih
EnterpriseDB: http://www.enterprisedb.com/
Attachment | Content-Type | Size |
---|---|---|
pass_queryText_to_workers_v3.patch | application/octet-stream | 5.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Mithun Cy | 2017-02-07 05:14:56 | Re: Proposal : For Auto-Prewarm. |
Previous Message | Peter Geoghegan | 2017-02-07 04:43:35 | Re: Parallel tuplesort (for parallel B-Tree index creation) |