Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XlYxj-00045d-AQ for pgsql-jdbc@arkaria.postgresql.org; Tue, 04 Nov 2014 07:55:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XlYxi-0006JZ-Iu for pgsql-jdbc@arkaria.postgresql.org; Tue, 04 Nov 2014 07:55:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XlYxh-0006JO-Kc; Tue, 04 Nov 2014 07:55:33 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XlYxd-0001mu-6H; Tue, 04 Nov 2014 07:55:32 +0000 Received: from ayaki.localdomain (106-68-211-225.dyn.iinet.net.au [106.68.211.225]) by mrelayeu.kundenserver.de (node=mreue004) with ESMTP (Nemesis) id 0MSFaB-1XbUz13xpz-00TQre; Tue, 04 Nov 2014 08:55:27 +0100 Message-ID: <54588668.2090305@2ndquadrant.com> Date: Tue, 04 Nov 2014 15:55:20 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Mikko Tiihonen , Andres Freund CC: "pgsql-hackers@postgresql.org" , "pgsql-jdbc@postgresql.org" Subject: Re: [HACKERS] Pipelining executions to postgresql server References: <1414850643686.34687@nitorcreations.com> <20141101173116.GR13584@awork2.anarazel.de> <1414930308808.49160@nitorcreations.com>, <20141102122320.GB28295@alap3.anarazel.de> <1414934833900.88748@nitorcreations.com>, <545790D8.9090201@2ndquadrant.com> <1415058981678.77807@nitorcreations.com> In-Reply-To: <1415058981678.77807@nitorcreations.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:bhdh2pV8orlHbsH9GxJqDzZeQ2LhR3LY28xgcOOyw/5 CIW9qo9aems0sdlmioAjDJWCwSqD8ROz4tBcne66aPOWacFJFm f+XYCSmLppjw+skGIcKLe1ZrQXV16x6MGyRw/piy7Dgeh4ecIN TTMzYiaX/EL29dOLAg1JID4T6UpTwUgLAD0oYa/peOrqqsYmS6 Ek+NOBV4eBKWuucgvbntdU+h+x6afyHhsPXe+Igjr2oB5fC1Kn C5Ur2GOHtbN1jDm+sd98IJ5zsTIlJhBKmpbKpAWRvMBEPSJlh/ D+zU3R5fRbhFJuqN4RuEbQmL8jqrShzs9PLuybfmeJLPYVKjYz fn2LAPZIFkiFiuLH2r7CIxyO+gglLZLCnWLnWKioH X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On 11/04/2014 07:56 AM, Mikko Tiihonen wrote: > I also think the async I/O is the way to go. Luckily that has already been done > in the pgjdbc-ng (https://github.com/impossibl/pgjdbc-ng), built on top > of netty java NIO library. It has quite good feature parity with the original > pgjdbc driver. Huh, it does seem to now. The big omission, unless I'm blind, is support for COPY. (It also lacks support for JDBC3 and JDBC4, requiring JDK 7 and JDBC 4.1, but that's reasonable enough.) It now has LISTEN/NOTIFY by the looks, and of course it's built around binary protocol support. I freely admit I haven't looked at it too closely. I'm a tad frustrated by the parallel development of a different driver when the "official" driver has so much in the way of low hanging fruit to improve. I have to say I like some aspects of how pgjdbc-ng is being done - in particular use of Maven and being built around non-blocking I/O. OTOH, the use of Google Guava I find pretty inexplicable in a JDBC driver, and since it hard-depends on JDK 7 I don't understand why Netty was used instead of the async / non-blocking features of the core JVM. That may simply be my inexperience with writing non-blocking socket I/O code on Java though. I'm also concerned about how it'll handle new JDBC versions, as it seems to lack the JDBC interface abstraction of the core driver. > I do not think the JDBC batch interface even allow doing updates to multiple > tables when using prepared statements? Ah, I missed this before. That's correct. You get prepared statements _or_ multiple different statements. That's a more understandable reason to concoct a new API, and explains why you're not just solving the issues with batches. Though I still think you're going to have to fix the buffer management code before you do anything like this. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc