pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Matt Newell <newellm@blur.com>
To: pgsql-hackers@postgresql.org
Subject: Re: libpq pipelining
Date: Thu, 4 Dec 2014 11:08:40 +0200
Message-ID: <54802498.7020704@vmware.com> (raw)
In-Reply-To: <2059418.jZQvL3lH90@obsidian>
References: <2059418.jZQvL3lH90@obsidian>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 12/04/2014 03:11 AM, Matt Newell wrote:
> The recent discussion about pipelining in the jodbc driver prompted me to look
> at what it would take for libpq.

Great!

> I have a proof of concept patch working.  The results are even more promising
> than I expected.
>
> While it's true that many applications and frameworks won't easily benefit, it
> amazes me that this hasn't been explored before.
>
> I developed a simple test application that creates a table with a single auto
> increment primary key column, then runs a 4 simple queries x times each:
> ...
>
> I plan to write documentation, add regression testing, and do general cleanup
> before asking for feedback on the patch itself.  Any suggestions about
> performance testing or api design would be nice.  I haven't played with
> changing the sync logic yet, but I'm guessing that an api to allow manual sync
> instead of a sync per PQsendQuery will be needed.  That could make things
> tricky though with multi-statement queries, because currently the only way to
> detect when results change from one query  to the next are a ReadyForQuery
> message.

A good API is crucial for this. It should make it easy to write an 
application that does pipelining, and to handle all the error conditions 
in a predictable way. I'd suggest that you write the documentation 
first, before writing any code, so that we can discuss the API. It 
doesn't have to be in SGML format yet, a plain-text description of the 
API will do.

- Heikki



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



view thread (11+ messages)  latest in thread

Message-ID: <54802498.7020704@vmware.com>
Permalink:  ../54802498.7020704@vmware.com/
Also on:    postgresql.org/message-id/54802498.7020704@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: hlinnakangas@vmware.com, newellm@blur.com
  Subject: Re: libpq pipelining
  In-Reply-To: <54802498.7020704@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox