Re: Disk buffering of resultsets - Mailing list pgsql-jdbc

From Craig Ringer
Subject Re: Disk buffering of resultsets
Date
Msg-id 54465606.6090602@2ndquadrant.com
Whole thread Raw
In response to Re: Disk buffering of resultsets  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: Disk buffering of resultsets  (Vitalii Tymchyshyn <vit@tym.im>)
List pgsql-jdbc
On 10/21/2014 07:06 PM, Dave Cramer wrote:
> Hi Vitalii,
>
> Thanks for this. I am headed for pgconf, hopefully I will have time to
> look at it on the plane.

Great that you're coming.

I'm still concerned by this patch, particularly the fact that it doesn't
properly use partial result set fetching at the protocol level, or
didn't last time I looked.

I really think it should be restricted to v3 protocol support and use
partial EXECUTE.

I'm generally opposed to the idea of the next query incurring the cost
of fetching remaining results from the prior one, and possibly throwing
an unrelated exception. That's IMO just wrong.

I'm not at all convinced we shouldn't be using server-side portals, and
possibly a client-supplied helper thread pool. I really don't like
hijacking a possibly unrelated thread (that's trying to run the next
statement) to do work deferred by a prior connection.

Instead we should probably:

    WARNING: Discarding unfetched results from prior connection
    HINT: To avoid this warning, explicitly close() the result set or
          fully read it before running a new statement.

or even make it an ERROR.

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


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Adding support for batches that return generated keys
Next
From: Vitalii Tymchyshyn
Date:
Subject: Re: Disk buffering of resultsets