Re: Pipelining executions to postgresql server

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Mikko Tiihonen <Mikko(dot)Tiihonen(at)nitorcreations(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Pipelining executions to postgresql server
Date: 2014-11-03 14:13:54
Message-ID: 54578DA2.1050704@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-11-03 14:27:36 Re: Pipelining executions to postgresql server
Previous Message Michael Banck 2014-11-03 12:54:09 Re: Let's drop two obsolete features which are bear-traps for novices

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2014-11-03 14:27:36 Re: Pipelining executions to postgresql server
Previous Message Scott Harrington 2014-11-02 23:05:09 Re: [JDBC] Pipelining executions to postgresql server