On Sat, Feb 25, 2017 at 2:45 AM, Dilip Kumar <dilipbal...@gmail.com> wrote:
> On Fri, Feb 24, 2017 at 11:43 AM, Haribabu Kommi > <kommi.harib...@gmail.com> wrote: > > Here I attached an implementation patch that allows > > utility statements that have queries underneath such as > > CREATE TABLE AS, CREATE MATERIALIZED VIEW > > and REFRESH commands to benefit from parallel plan. > > > > These write operations not performed concurrently by the > > parallel workers, but the underlying query that is used by > > these operations are eligible for parallel plans. > > > > Currently the write operations are implemented for the > > tuple dest types DestIntoRel and DestTransientRel. > > > > Currently I am evaluating other write operations that can > > benefit with parallelism without side effects in enabling them. > > The Idea looks good to me. > > Since we are already modifying heap_prepare_insert, I am thinking that > we can as well enable queries like "insert into .. select from .." > with minor modification? > Thanks for the review. I am finding it not so easy in supporting write operations like INSERT, DELETE and UPDATE commands to use parallelism benefits for the queries that are underneath. Currently the parallelism is enabled only for the tables that don't have any triggers and indexes with expressions. This limitation can be removed after a though testing. To support the same, I removed all the errors from heap functions and functions to get a new transaction and updating the command id to the current snapshot (Required for the cases where a single command validates the input). Attached a WIP patch for the support for DML write operations. There is no functional change in base utility write support patch. Regards, Hari Babu Fujitsu Australia
0002_dml_write_using_parallel_1.patch
Description: Binary data
0001_utility_write_using_parallel_1.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers