On Fri, Sep 25, 2020 at 2:31 PM Bharath Rupireddy <bharath.rupireddyforpostg...@gmail.com> wrote: > > On Tue, Sep 22, 2020 at 10:26 AM Greg Nancarrow <gregn4...@gmail.com> wrote: > > > > For cases where it can't be allowed (e.g. INSERT into a table with > > foreign keys, or INSERT INTO ... SELECT ... ON CONFLICT ... DO UPDATE > > ...") it at least allows parallelism of the SELECT part. > > > > Thanks Greg for the patch. > > 2. What happens if the target table has triggers(before statement, > after statement, before row, after row) that are parallel unsafe? >
In such a case, the parallel insert shouldn't be selected. However, we should still be able to execute the Select part in parallel. > 3. Will each worker be doing single row insertions or multi inserts? > If single row insertions, will the buffer lock contentions be more? > I don't think the purpose of this patch is to change the basic flow of how Insert works and also I am not sure if it is worth the effort as well. I have answered this earlier in a bit more detailed way [1]. [1] - https://www.postgresql.org/message-id/CAA4eK1Ks8Sqs29VHPS6koNj5E9YQdkGCzgGsSrQMeUbQfe28yg%40mail.gmail.com -- With Regards, Amit Kapila.