Re: libpq sendQuery -- getResult not returning until all queries complete - Mailing list pgsql-general

From Kelly Burkhart
Subject Re: libpq sendQuery -- getResult not returning until all queries complete
Date
Msg-id AANLkTi=5SJMF_aiV3W-x8mD-HdbZmPPVUPhp7T-0uJiu@mail.gmail.com
Whole thread Raw
In response to Re: libpq sendQuery -- getResult not returning until all queries complete  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
List pgsql-general
Yes, I omitted the PQclear for simplicity.

I'm not concurrently executing queries, I'm sending multiple queries
to be executed serially by the backend.  I'm expecting the server to
send me the PQresult objects as each query completes rather than
sending them all *after* all of the queries have completed.

That will result in some amount of concurrency as my client will be
processing one result while the backend is processing the next query.

-K

On Tue, Dec 21, 2010 at 1:21 PM, Peter Geoghegan
<peter.geoghegan86@gmail.com> wrote:
> You can't concurrently execute queries from within a single
> connection. Perhaps you should use multiple connections, while
> understanding the implications of having each operate within a
> separate snapshot.
>
> Don't forget to free memory with PQclear() . I guess you omitted that
> because it's just pseudo-code.
>
> --
> Regards,
> Peter Geoghegan
>

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: libpq sendQuery -- getResult not returning until all queries complete
Next
From: Kelly Burkhart
Date:
Subject: Re: libpq sendQuery -- getResult not returning until all queries complete