Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 95A9B9FB65D for ; Mon, 5 Mar 2007 07:56:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 07596-08 for ; Mon, 5 Mar 2007 07:56:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.unl.edu.ar (mail.unl.edu.ar [168.96.132.10]) by postgresql.org (Postfix) with SMTP id 7FB899FB2B4 for ; Mon, 5 Mar 2007 07:56:32 -0400 (AST) Received: (qmail 28938 invoked by uid 1010); 5 Mar 2007 11:56:02 -0000 Received: from 168.96.132.199 by scanner-pc-m- (envelope-from , uid 1002) with qmail-scanner-0.2 (sophie: 3.04/2.38/4.10. spamassassin: 3.1.0-rc2. perlscan: 0.2. Clear:RC:1(168.96.132.199):. Processed in 0.115887 secs); 05 Mar 2007 11:56:02 -0000 Received: from xennon.unl.edu.ar (HELO ?192.168.1.68?) (168.96.132.199) by mail.unl.edu.ar with SMTP; 5 Mar 2007 11:56:02 -0000 Message-ID: <45EC055B.80007@bugs.unl.edu.ar> Date: Mon, 05 Mar 2007 08:56:11 -0300 From: Martin Marques User-Agent: Icedove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: mikie CC: pgsql-php@postgresql.org Subject: Re: transactions from PHP - double COMMIT required? References: <45E70C9A.200@bugs.unl.edu.ar> <200703011353.07621.xzilla@users.sourceforge.net> <45E81DC5.6090308@bugs.unl.edu.ar> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.041 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200703/21 X-Sequence-Number: 3733 mikie wrote: > 2007/3/2, Martin Marques : >> mikie wrote: >> > 2007/3/1, Robert Treat : >> >> Yeah, do the above recommendation to see if all of your statements are >> >> making >> >> thier way into pg >> > >> > OK, I have checked the logs. I can see both COMMIT statements in the >> > log - the first commit from my transaction and then the other that I >> > send to workaround the problem. >> >> There must be some other problem. Do you have trasaction ID on the logs? >> See if both commits go in the same transaction. > > Could you please advise me how to check the transaction ID in the log? Edit postgresql.conf: log_line_prefix = '<%t %x>' And restart postmaster. >> Any errors during the transaction? > > As I wrote in my first post, I make this error intentionally to check > if transaction works (if something fails, then the entire transaction > should be rolled back). I intentionally give wrong data in the "date" > field for example. > Perhaps I should ask again: is it my responsibility to check if the > transaction failed and issue a ROLLBACK command, or will the PG server > do it automatically? One question: Why dont you but each query in a diferent pg_exec() command? -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 --------------------------------------------------------- Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador ---------------------------------------------------------