Re: [HACKERS] PATCH: enabling parallel execution for cursors explicitly (experimental)

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] PATCH: enabling parallel execution for cursors explicitly (experimental)
Date: 2018-02-09 12:53:39
Message-ID: CAA4eK1+O8S9CRHc7VjLrJv9GzBJa3Cw6giVDk0HudTvu6Prpug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 8, 2018 at 7:49 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Feb 8, 2018 at 9:04 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>> Also, if you're OK with not being able to do anything except fetch
>>> from the cursor until you reach the end, then couldn't you just issue
>>> the query without the cursor and use PQsetSingleRowMode?
>>
>> I think there is a lot of cursor usage via plpgsql in which it could be useful.
>
> I don't see how. If you can't do anything but fetch from the cursor
> while the cursor is open, then you can't go start doing things in
> plpgsql code either.
>

I am not saying to allow other things. I am just replying to your
question that why can't we use PQsetSingleRowMode. I mean to say that
one can fetch the data parallelly via the usage of cursors (by having
restrictions like don't allow other parallel unsafe statements) in
plpgsql.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2018-02-09 12:55:32 Re: [HACKERS] FOSDEM PGDay_2018_Developer_Meeting notes
Previous Message Alvaro Herrera 2018-02-09 12:42:18 Re: Proposal: partition pruning by secondary attributes