Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 367131337BF0 for ; Wed, 30 Mar 2011 10:49:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 39348-04 for ; Wed, 30 Mar 2011 13:49:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from web33203.mail.mud.yahoo.com (web33203.mail.mud.yahoo.com [209.191.69.151]) by mail.postgresql.org (Postfix) with SMTP id 98FD31337BD3 for ; Wed, 30 Mar 2011 10:49:30 -0300 (ADT) Received: (qmail 70560 invoked by uid 60001); 30 Mar 2011 13:49:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1301492970; bh=p45yziFrnBHCuKYbThs+776RTLj/63FMhiX0WAyVr1A=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jQYMwhUc1Jg/nmeae1P/Z9PUw5H5n1iYmc6FcuIlYORlPEE7m2RyH6FynWoCwq0S61x1XREByim5cjCjAWtSjTXAagFnN7CulyUXotplrlJTZke/VBvpRIIMsDBRTA5Me83d3MFmYWzX4HaTUjL7JNhfpVFaXzgJaqho2o+D8n0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=MePaiLqsxM+lRnqD3tCS5+XeZ7HPI/EFPfm8nl96tDVE4sEo4A/El5CrLglk+Nxx8gulyN4JGqda98NN7Nn30S0wFqhsH/JwqaaJSEitXLHz9rRDJO1zMl9FYsmm5Wn1YMhg+zvM2k7nn2d7PzutqZlTN5ebaPOjjSgOxxSkenk=; Message-ID: <343012.69342.qm@web33203.mail.mud.yahoo.com> X-YMail-OSG: 5M4a7xoVM1kwGDocQHemK63qW22bsqC6RfZ.uFrJYtI1N6R 7QZlrWiCiT9_28CIX..7C2qHD5.FBz3KF5sz7fqoi92zbmTXZv.lVa9lyt.t ay252DzDSmPRTukdZzmXzk8Qr3xsms3RRLAO4kxV8aOkJS9GRMdyM3O_tyqc nS8gJaM_k0XwZE9PvQnqyNTk1FYeZR7_nOVZSlwl_lM4iP5yn9pDEe2yQ0Xo n0uBcbRquiI9l0LhP.gQcZkoZ5hEQMgmEy_hSbUWC2vMmLHaLpoejuiOOMfT yySEV0X1h49mUnjkXWvdKQPWc6drtiMAvUzdbrHZEnbP32LEOpYg4olJ0gJ_ qBWZSh_84QF_FLphEZe5NBWQzGxdMPh2HD7oSUWaPWNOvFhz_hRoOoqxhKA8 42fCk8kLY.vQX Received: from [199.84.5.210] by web33203.mail.mud.yahoo.com via HTTP; Wed, 30 Mar 2011 06:49:30 PDT X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.109.295617 Date: Wed, 30 Mar 2011 06:49:30 -0700 (PDT) From: Quartz Subject: Re: JDBC gripe list (the autocommit subthread) Cc: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.877 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201103/132 X-Sequence-Number: 21687 > Well in the postgresql world every statement is a transaction.=0A=0AI agr= ee with that. But a batch with autocommit=3Dtrue is "many" statements, as p= er the doc.=0A=0A=0A> That being said=A0=A0the concept of batch processing = in postgres is that it=0A> would be done in a transaction otherwise what is= the point ?=0A=0A=0AIf addBatch was not meant to be called when autocommit= =3Dtrue, then it would have thrown an exception. The point is to enable mul= tiple statement in 1 executeBatch call. Just imagine a system that separate= s who makes statements and who executes them. Like event logging lets say. = Meanwhile, there are infinite cases where multiple statements are not (and = must not) be in a all-or-nothing transaction. This is why applications choo= se to set autocommit=3Dtrue to obtain the batch behavior without a TX. It's= in the API for such reasons.=0A=0AIt is just incorrect to consider the bat= ch is 1 transaction when the API clearly exposes the ability to avoid it. A= s I wrote earlier, calling applications that just pile up updates in a batc= h not expecting any deadlock due to row locking by each statement, will not= work anymore.=0A=0AThe fact the API have autocommit independant from batch= es means it serve a purpose. I see it. But even if I didn't, the API says s= o and I can't second guess it.=0A=0AI know it hurts to learn such truth aft= er such a long delay. You'll get over it! lol! I have found a 4 year old bu= g lately, in my own code. I know the feeling. But I can't decide to call it= a feature...lol=0A=0A=0A=0A> If you agree with that then in the postgres w= orld it would be natural=0A> for all of it to fail. At least thats how I wo= uld expect postgres to act.=0A> =0A> Dave=0A