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. > If possible try to make a common function for both and use. Yes you are right. The function explain_pictas is the same as explain_parallel_append from partition_prune.sql. It's a test function, and I also see that we have serial_schedule and parallel_schedule which means that these sql files can run in any order. I'm not quite sure whether we can have it in a common test sql file and use it across other tests sql files. AFAICS, I didn't find any function being used in such a manner. Thoughts? > + if (intoclausestr && OidIsValid(objectid)) > + fpes->objectid = objectid; > + else > + fpes->objectid = InvalidOid; > Here OidIsValid(objectid) check is not required intoclausestr will be > set only if OidIsValid. Removed the OidIsValid check in the latest v16 patch set posted upthread. Please have a look. With Regards, Bharath Rupireddy. EnterpriseDB: http://www.enterprisedb.com