On Sun, Dec 27, 2020 at 2:28 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > > On Sat, Dec 26, 2020 at 9:20 PM vignesh C <vignes...@gmail.com> wrote: > > +-- parallel inserts must occur > > +select explain_pictas( > > +'create table parallel_write as select length(stringu1) from tenk1;'); > > +select count(*) from parallel_write; > > +drop table parallel_write; > > > > We can change comment "parallel inserts must occur" like "parallel > > insert must be selected for CTAS on normal table" > > > > +-- parallel inserts must occur > > +select explain_pictas( > > +'create unlogged table parallel_write as select length(stringu1) from tenk1;'); > > +select count(*) from parallel_write; > > +drop table parallel_write; > > > > We can change comment "parallel inserts must occur" like "parallel > > insert must be selected for CTAS on unlogged table" > > Similar comment need to be handled in other places also. > > I think the existing comments look fine. The info like table type and > the Query CTAS or CMV is visible by looking at the test case. What I > wanted from the comments is whether we support parallel inserts or not > and if not why so that it will be easy to read. I tried to keep it as > succinctly as possible. >
I saw few inconsistencies in the patch: *+-- parallel inserts must occur*+select explain_pictas( +'create table parallel_write as select length(stringu1) from tenk1;'); + explain_pictas *+-- parallel inserts must not occur as the table is temporary*+select explain_pictas( +'create temporary table parallel_write as select length(stringu1) from tenk1;'); + explain_pictas *+-- parallel inserts must occur, as there is init plan that gets executed by+-- each parallel worker* +select explain_pictas( +'create table parallel_write as select two col1, + (select two from (select * from tenk2) as tt limit 1) col2 + from tenk1 where tenk1.four = 3;'); + explain_pictas *+-- the top node is Gather under which merge join happens, so parallel inserts+-- must occur* +set enable_nestloop to off; +set enable_mergejoin to on; *+-- parallel hash join happens under Gather node, so parallel inserts must occur*+set enable_mergejoin to off; +set enable_hashjoin to on; +select explain_pictas( Test comments are detailed in a few cases and in few others it is not detailed for similar kinds of parallelism selected tests. I felt we could make the test comments consistent across the file. Regards, Vignesh EnterpriseDB: http://www.enterprisedb.com