On Mon, Mar 1, 2021 at 9:08 AM Greg Nancarrow <gregn4...@gmail.com> wrote: > > Posting an updated set of patches that includes Amit Langote's patch > to the partition tracking scheme... > (the alternative of adding partitions to the range table needs further > investigation)
I was reviewing your latest patch and I have a few comments. In patch 0001 1. +static bool +target_rel_max_parallel_hazard_recurse(Relation rel, + CmdType command_type, + max_parallel_hazard_context *context) +{ + TupleDesc tupdesc; + int attnum; + + /* Currently only CMD_INSERT is supported */ + Assert(command_type == CMD_INSERT); ……. + /* + * Column default expressions and check constraints are only applicable to + * INSERT and UPDATE, but since only parallel INSERT is currently supported, + * only command_type==CMD_INSERT is checked here. + */ + if (command_type == CMD_INSERT) If we have an assert at the beginning of the function, then why do we want to put the if check here? 2. In patch 0004, We are still charging the parallel_tuple_cost for each tuple, are we planning to do something about this? I mean after this patch tuple will not be transferred through the tuple queue, so we should not add that cost. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com