Re: [HACKERS] Passing query string to workers
От | Rafia Sabih |
---|---|
Тема | Re: [HACKERS] Passing query string to workers |
Дата | |
Msg-id | CAOGQiiP0kQO6mvzD12iXFOVjjcTeaR94-jseTKw0zHPF_mR1tw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Passing query string to workers (Kuntal Ghosh <kuntalghosh.2007@gmail.com>) |
Ответы |
Re: [HACKERS] Passing query string to workers
|
Список | pgsql-hackers |
On Mon, Jan 23, 2017 at 2:46 PM, Kuntal Ghosh <kuntalghosh.2007@gmail.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/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: