Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XlSdW-0008Dn-GI for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2014 01:10:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XlSdW-0000N5-0i for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2014 01:10:18 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XlSdV-0000Ma-5Q; Tue, 04 Nov 2014 01:10:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XlSdR-0003b9-KJ; Tue, 04 Nov 2014 01:10:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sA41A5Y5032087; Mon, 3 Nov 2014 20:10:05 -0500 From: Tom Lane To: Mikko Tiihonen cc: Craig Ringer , Andres Freund , "pgsql-hackers@postgresql.org" , "pgsql-jdbc@postgresql.org" Subject: Re: Pipelining executions to postgresql server In-reply-to: <1415058981678.77807@nitorcreations.com> 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> Comments: In-reply-to Mikko Tiihonen message dated "Mon, 03 Nov 2014 23:56:22 +0000" Date: Mon, 03 Nov 2014 20:10:05 -0500 Message-ID: <32086.1415063405@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Mikko Tiihonen writes: > I do not quite grasp why not sending Sync is so important. My proof of concept setup was for queries with autocommit enabled. The point is that that will be very, very much harder to use than doing it the other way. It's fairly easy to reason about the results of single-transaction pipelined queries: they're all or nothing. If you fire off queries that are going to autocommit independently, then you have to worry about all combinations of success/failure, and you won't have the opportunity to adjust on the fly. It'll be very much like sending a fixed (predetermined) SQL script to the server using a scripting language that lacks any conditionals. People certainly do use fixed scripts sometimes, but they usually find out they want them wrapped into single transactions, because otherwise they're left with a horrible mess if the script goes off the rails at all. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers