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 CE36B3A1D4E for ; Fri, 14 Jan 2005 18:16:00 +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 97363-10 for ; Fri, 14 Jan 2005 18:15:56 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id BDA813A1D24 for ; Fri, 14 Jan 2005 18:15:56 +0000 (GMT) Received: (qmail 13958 invoked from network); 14 Jan 2005 18:15:23 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 14 Jan 2005 18:15:23 -0000 Message-ID: <41E80C5E.50407@fastcrypt.com> Date: Fri, 14 Jan 2005 13:15:58 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "j.random.programmer" Cc: Csaba Nagy , pgsql-jdbc@postgresql.org Subject: Re: Weird behavior in transaction handling (Possible bug ?) References: <20050114171650.5869.qmail@web14221.mail.yahoo.com> In-Reply-To: <20050114171650.5869.qmail@web14221.mail.yahoo.com> Content-Type: multipart/alternative; boundary="------------010000020508090804070308" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.058 tagged_above=0 required=5 tests=AWL, HTML_30_40, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: X-Archive-Number: 200501/125 X-Sequence-Number: 12005 This is a multi-part message in MIME format. --------------010000020508090804070308 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Actually, reviewing your original post. Yes the commit fails silently. However the insert does not fail silently and should throw an error! Do you check for errors here ? Dave j.random.programmer wrote: >>an error. And I don't believe commit fails silently, >>it should give you >>an error. >> >> > >Nope, no error. See the original post, there isn't any >error >in the postgresql logs either, and no error at the >JDBC layer. > > > >>(notably Oracle). So I would expect you're coming >>from an oracle DB >>experience... >> >> > >Nope. I've been using Postgresql for years now (after >having >used mysql/innodb and gotten rather tired of _that_). > >:-] > > > >>Please note that setting a savepoint in postgres is >>not nearly free, so >>be careful how often you do it. >> >> > >After further testing, the standalone psql client also >shows >the same behavior so I guess this is a postgresql >database >thing, not driver specific. > >Here's my humble suggestion. If technically possible, >have >the driver throw a SQLExeption when trying to commit() > >and when the driver knows that commit() is going to >fail. > >Maybe the driver can simple track if it's recieved any >kind >of error messages on a given connection. If so, then >when >commit() is called on that connection, the driver >should >throw a SQLException ? > >Otherwise, you're asking for very esoteric bugs to say >you have >commit() succesfully yet fail silently. That's more >like a mysql >thing, *not* a postgresql thing right ? > >Best regards, > >--j > > > > > >__________________________________ >Do you Yahoo!? >Meet the all-new My Yahoo! - Try it today! >http://my.yahoo.com > > > >---------------------------(end of broadcast)--------------------------- >TIP 8: explain analyze is your friend > > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561 --------------010000020508090804070308 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Actually, reviewing your original post. Yes the commit fails silently. However the insert does not fail silently and should throw an error!

Do you check for errors here ?

Dave

j.random.programmer wrote:
an error. And I don't believe commit fails silently,
it should give you
an error.
    

Nope, no error. See the original post, there isn't any
error
in the postgresql logs either, and no error at the
JDBC layer.

  
(notably Oracle). So I would expect you're coming
from an oracle DB
experience...
    

Nope. I've been using Postgresql for years now (after
having
used mysql/innodb and gotten rather tired of _that_). 

:-]

  
Please note that setting a savepoint in postgres is
not nearly free, so
be careful how often you do it.
    

After further testing, the standalone psql client also
shows
the same behavior so I guess this is a postgresql
database
thing, not driver specific.

Here's my humble suggestion. If technically possible,
have 
the driver throw a SQLExeption when trying to commit()

and when the driver knows that commit() is going to
fail.

Maybe the driver can simple track if it's recieved any
kind
of error messages on a given connection. If so, then
when
commit() is called on that connection, the driver
should 
throw a SQLException ?

Otherwise, you're asking for very esoteric bugs to say
you have
commit() succesfully yet  fail silently. That's more
like a mysql 
thing, *not* a postgresql thing right ?

Best regards,

--j




		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


  

-- 
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561
--------------010000020508090804070308--