Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental) - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)
Date
Msg-id CAMsr+YEhqXTw6fzEmQzanLJ4Q7p6mxVBTZ0z9k1FxR5PMgqH=w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> Now, I agree this is somewhat more limited than I hoped for, but OTOH it
> still solves the issue I initially aimed for (processing large query
> results in efficient way).

I don't quite understand this part.

We already send results to the client in a stream unless it's
something we have to materialize, in which case a cursor won't help
anyway.

If the client wants to fetch in chunks it can use a portal and limited
size fetches. That shouldn't (?) be parallel-unsafe, since nothing
else can happen in the middle anyway.

But in most cases the client can just fetch all, and let the socket
buffering take care of things, reading results only when it wants
them, and letting the server block when the windows are full.

That's not to say that SQL-level cursor support wouldn't be nice. I'm
just trying to better understand what it's solving.

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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw
Next
From: Craig Ringer
Date:
Subject: Re: [HACKERS] Dynamic result sets from procedures