X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ABB213A1AA6 for ; Fri, 14 Jan 2005 16:30:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85912-08 for ; Fri, 14 Jan 2005 16:30:01 +0000 (GMT) Received: from web14227.mail.yahoo.com (web14227.mail.yahoo.com [66.163.171.111]) by svr1.postgresql.org (Postfix) with SMTP id 2C5473A18A7 for ; Fri, 14 Jan 2005 16:29:57 +0000 (GMT) Received: (qmail 91768 invoked by uid 60001); 14 Jan 2005 16:29:56 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=JF7JlKqddlI5mNBNiZKi/uEpSIeLJ1o9fyxofwVWHB9U22Gx0MCmkumjNGXabpKPyLfIEnze7ZUKitG6BtMJUA7KKC5LQli+o1icVJ2JiloJ9fw4OK6UhauPXIV2yuqcTY5u/KgkDh+a2bVrataJmx6FF8ilQGJa5G3bX5/P55c= ; Message-ID: <20050114162956.91766.qmail@web14227.mail.yahoo.com> Received: from [141.151.83.165] by web14227.mail.yahoo.com via HTTP; Fri, 14 Jan 2005 08:29:56 PST Date: Fri, 14 Jan 2005 08:29:56 -0800 (PST) From: "j.random.programmer" Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently To: pg@fastcrypt.com Cc: pgsql-jdbc@postgresql.org In-Reply-To: <41E7F207.6050409@fastcrypt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.262 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200501/120 X-Sequence-Number: 12000 > With postgres once an error occurs in a transaction block you need > to rollback. None of the transaction will commit. > > This behaviour makes sense as it assumes that the transaction block > is atomic and it should all succeed or all fail. This is VERY counter-intuitive. I can have really important data for say 5 tables which has committed properly but at the 6th insert into a non-important auxillary table, I may encounter a transient exception. I still want to be able to commit my data. There are many similar scenarios such as the above, right ? As a programmer, shouldn't it be upto me to decide when to commit and when to rollback ? Is this even within spec ? And at the very least, commit() should then not fail SILENTLY ! (and this should be documented). :-] Best regards, --j __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail