Re: [HACKERS] Pipelining executions to postgresql server - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: [HACKERS] Pipelining executions to postgresql server
Date
Msg-id 32086.1415063405@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Pipelining executions to postgresql server  (Mikko Tiihonen <Mikko.Tiihonen@nitorcreations.com>)
Responses Re: [HACKERS] Pipelining executions to postgresql server  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-jdbc
Mikko Tiihonen <Mikko.Tiihonen@nitorcreations.com> 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


pgsql-jdbc by date:

Previous
From: Mikko Tiihonen
Date:
Subject: Re: [HACKERS] Pipelining executions to postgresql server
Next
From: Craig Ringer
Date:
Subject: Re: [HACKERS] Pipelining executions to postgresql server