Re: Enabling parallelism for queries coming from SQL or other PL functions

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Enabling parallelism for queries coming from SQL or other PL functions
Date: 2017-02-24 05:03:25
Message-ID: CAA4eK1Jo8XOoCV=h9FJRQyiQWcqSyetSd3T7NEVv14CREHvoqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 23, 2017 at 9:20 PM, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> On Thu, Feb 23, 2017 at 8:58 PM, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>> Few more comments.
>> 1.I don't see any check in the code which will prevent the parallel
>> execution of the query inside a function if its called from a DML
>> statement.
>> e.g. If we use a function in the update statement's which has the
>> select statement.
>
> Having said that, I am thinking do we really need to block such cases?
> It just looks fine to me that an update statement calls a function (in
> targetlist or condition), which launches a bunch of workers for the
> internal query inside PL; finishes the work and shutdown them, only
> after this, the update will change any record. So basically I want to
> make a point that between the worker launch and shutdown there is no
> change in the database state.
>

+1. I also think you are right that there should not be a problem in
such a case.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Venkata B Nagothi 2017-02-24 05:11:40 Re: Range Partitioning behaviour - query
Previous Message Ashutosh Sharma 2017-02-24 04:41:41 Re: Should we cacheline align PGXACT?