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

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: enabling parallel execution for cursors explicitly (experimental)
Date: 2017-11-02 02:31:36
Message-ID: CAMsr+YEY+ozeDRPTLWMYW7MtLuBUD7AqS+FqjE9Hdz-hagpb4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2 November 2017 at 10:01, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> I think that still leaves a fair number of scenarios to consider, and
> the error handling by itself seems pretty thorny. Plus it's kind of a
> weird mode and, like Craig, I'm not really sure what it gets you.
> Maybe if somebody has the use case where this would help, they should
> just do:
>
> CREATE TEMP TABLE x AS SELECT * FROM t2 WHERE ...;
> DECLARE x CURSOR FOR SELECT * FROM x;

That forces materialization, and I'm guessing part of Tomas's goal
here is to prevent the need to materialize into a temp table /
tuplestore / etc.

It's not clear to me why an unbounded portal fetch, using the tcp
socket windows and buffers for flow control, isn't sufficient.

Tomas, can you explain the use case a bit more?

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-11-02 02:32:46 Re: Enhancements to passwordcheck
Previous Message Robert Haas 2017-11-02 02:06:38 Re: Partition-wise aggregation/grouping