pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@2ndquadrant.com>
To: Mikko Tiihonen <Mikko.Tiihonen@nitorcreations.com>
To: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Pipelining executions to postgresql server
Date: Mon, 03 Nov 2014 22:13:54 +0800
Message-ID: <54578DA2.1050704@2ndquadrant.com> (raw)
In-Reply-To: <1414850643686.34687@nitorcreations.com>
References: <1414850643686.34687@nitorcreations.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 11/01/2014 10:04 PM, Mikko Tiihonen wrote:
> Hi,
> 
> I created a proof of concecpt patch for postgresql JDBC driver that allows the caller to do pipelining of requests within a transaction. The pipelining here means same as for HTTP: the client can send the next execution already before waiting for the response of the previous request to be fully processed.

... but ... it already does that.

Use batches, and that's exactly what it'll do.

Statement.addBatch(String)
or
PreparedStatement.addBatch()

> What kind of problems could pipelining cause (assuming we limit it to rather simple use cases only)?

Client/server pipleline deadlocks due to how PgJDBC manages it.

See the details:

https://github.com/pgjdbc/pgjdbc/issues/195

and

https://github.com/pgjdbc/pgjdbc/issues/194

-- 
 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



view thread (18+ messages)  latest in thread

Message-ID: <54578DA2.1050704@2ndquadrant.com>
Permalink:  ../54578DA2.1050704@2ndquadrant.com/
Also on:    postgresql.org/message-id/54578DA2.1050704@2ndquadrant.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: craig@2ndquadrant.com, Mikko.Tiihonen@nitorcreations.com, pgsql-hackers@postgresql.org
  Subject: Re: Pipelining executions to postgresql server
  In-Reply-To: <54578DA2.1050704@2ndquadrant.com>
  References: <1414850643686.34687@nitorcreations.com> <54578DA2.1050704@2ndquadrant.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