Re: PGXAConnection and autocommit problem - Mailing list pgsql-jdbc
From | Maurin, Marion |
---|---|
Subject | Re: PGXAConnection and autocommit problem |
Date | |
Msg-id | C7BBBF767EA7F7458E9537859DB4FBFB016207@se-ex024.groupinfra.com Whole thread Raw |
In response to | PGXAConnection and autocommit problem ("Maurin, Marion" <marion.maurin@logica.com>) |
Responses |
Re: PGXAConnection and autocommit problem
|
List | pgsql-jdbc |
Hi, I checked the two links you proposed. Concerning this one: http://archives.postgresql.org/message-id/201003021629.07368.achill%40matrix.gatewaynet.com The problem of autocommit described in the conclusion seemed to be caused by the reuse of a connexion by different transactions.So I tried to run my tests while assuring that the connection used was really a new one (checked the ids indebug mode), and nothing changed for me. Thus I don't think it is the same problem I'm facing. I also followed the adviceof activating the debug mode for postgresql logs, and I got that: ----- 18:15:22.623 (1) simple execute, handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@d458ab, maxRows=0,fetchSize=0, flags=17 18:15:22.623 (1) FE=> Parse(stmt=null,query=" UPDATE ACTUALITE SET TITRE = $1, CONTENU = $2, IMPORTANTE = $3, ETAT_ESPACE_DISCUSSION_ID = $4, MODERATION_ID = $5, AUTEUR_MAJ = $6, ESPACE_DISCUSSION = $7, DATE_PUBLICATION= $8, DATE_EXPIRATION = $9, DATE_MAJ = $10, IMAGE_POSITION = $11, IMAGE_DIMENSION= $12, TYPE_ACTUALITE_ID = $13 WHERE ACTUALITE_ID = $14",oids={1043,1043,16,0,0,20,16,0,0,0,20,20,20,20}) 18:15:22.623 (1) FE=> Bind(stmt=null,portal=null,$1=<'transactions'>,$2=<'<p>test transactions mmau prepare modif</p>'>,$3=<'1'>,$4=<NULL>,$5=<NULL>,$6=<'110000000000007027'>,$7=<'0'>,$8=<'2011-01-1700:00:00.000000 +01:00:00'>,$9=<'2011-07-0500:00:00.000000 +02:00:00'>,$10=<'2011-02-15 18:15:21.733000 +01:00:00'>,$11=<'1'>,$12=<'100'>,$13=<'0'>,$14=<'182'>) 18:15:22.623 (1) FE=> Describe(portal=null) 18:15:22.623 (1) FE=> Execute(portal=null,limit=0) 18:15:22.623 (1) FE=> Sync 18:15:22.639 (1) <=BE ParseComplete [null] 18:15:22.639 (1) <=BE BindComplete [null] 18:15:22.639 (1) <=BE NoData 18:15:22.639 (1) <=BE CommandStatus(UPDATE 1) 18:15:22.639 (1) <=BE ReadyForQuery(I) ----- As we can see, there is no BEGIN order before the update. For the second link: http://archives.postgresql.org/message-id/4D01DFA8.3060207@emaze.net I applied the patch you proposed for the prepare() method. Nothing changed either. The update was still commited and thepostgresql logs did not change. I tried to check what it was actually doing in the prepare() method, to see if everythingwas going correctly, but I couldn't succeed in seeing either the breakpoints or the debug logs I added. I don'tsee the default PGXAConnection class logs either. Could it be possible that it doesn't even go in the prepare() method? Thanks for any help. Marion -----Message d'origine----- De : Maurin, Marion Envoyé : jeudi 10 février 2011 19:45 À : 'Achilleas Mantzios'; pgsql-jdbc@postgresql.org Objet : RE: [JDBC] PGXAConnection and autocommit problem Thanks for those two inputs. I couldn't save time today to check but it seems interesting. I'll test to see if it's related. -----Message d'origine----- De : pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] De la part de Achilleas Mantzios Envoyé : jeudi 10 février 2011 10:45 À : pgsql-jdbc@postgresql.org Objet : Re: [JDBC] PGXAConnection and autocommit problem Στις Thursday 10 February 2011 10:42:44 ο/η Heikki Linnakangas έγραψε: > On 10.02.2011 09:50, Maurin, Marion wrote: > > Yes, I think I saw that too, that the autocommit shouldn't be set from outside. But shouldn't the driver itself set itto false at the beginning of the transaction? > > ________________________________________ > > De : pgsql-jdbc-owner@postgresql.org [pgsql-jdbc-owner@postgresql.org] de la part de rsmogura [rsmogura@softperience.eu] > > Date d'envoi : mercredi 9 février 2011 21:13 > > À : pgsql-jdbc@postgresql.org > > Objet : Re: [JDBC] PGXAConnection and autocommit problem > > > > Driver should prevent set auto commit, or change it value in any case. > > I thought I saw exception in code preventing this. > > On Wed, 9 Feb 2011 14:28:44 +0000, Maurin, Marion wrote: > >> Hi, > >> > >> I hope I'm in the right mailing list. > >> > >> I'm currently facing a problem with Postgresql XA connections. I'm > >> trying to have my transactions working but no rollback seems to take > >> effect. After searching, I think the problem is about the autoCommit > >> mode which is set to true even during the transaction. > > It's quite possible that there's a bug somewhere in the XA driver - > we've had several bugs related to autocommit and XA in the past. > I remember my similar case one year ago : http://archives.postgresql.org/message-id/201003021629.07368.achill%40matrix.gatewaynet.com Anyways Heikki helped a lot on this one i remember, and also wrote a patch. Thanx Heikki! > And I think this one is still pending: > http://archives.postgresql.org/message-id/4D01DFA8.3060207@emaze.net. > Could it be related? > > Can you create a small self-contained test program to reproduce the > issue, and post it to the list? > > -- > Heikki Linnakangas > EnterpriseDB http://www.enterprisedb.com > -- Achilleas Mantzios -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material,confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained orused by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachmentand all copies and inform the sender. Thank you.
pgsql-jdbc by date: