On Fri, Jan 13, 2017 at 4:25 PM, Rafia Sabih <rafia.sa...@enterprisedb.com> wrote: > > Please let me know your feedback over the same. > 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. 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 -- Thanks & Regards, Kuntal Ghosh EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers