X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 19C0111F8B8A for ; Wed, 19 Apr 2006 15:51:20 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.246 X-Spam-Level: X-Spam-Status: No, score=-2.246 required=5 tests=[AWL=0.352, BAYES_00=-2.599, HTML_MESSAGE=0.001] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id ca-ZvP8MTNpV for ; Wed, 19 Apr 2006 15:51:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.zanthus.com.br (mail.zanthus.com.br [200.212.65.85]) by postgresql.org (Postfix) with ESMTP id 049C211F8A4A for ; Wed, 19 Apr 2006 15:51:08 -0300 (ADT) Received: from cprsakai ([192.168.0.71]) by mail.zanthus.com.br (8.13.4/8.13.4/Debian-3) with SMTP id k3JIqah9024987; Wed, 19 Apr 2006 15:52:37 -0300 Message-ID: <004a01c663e2$4860a5d0$4700a8c0@TREEZANTHUS> Reply-To: "Rodrigo Sakai" From: "Rodrigo Sakai" To: Cc: References: <20060419120510.B01C611F60B4@postgresql.org> Subject: Re: IDLE IN TRANSACTION Date: Wed, 19 Apr 2006 15:51:33 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0047_01C663C9.22086670" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Zanthus-MailScanner: Found to be clean X-Zanthus-MailScanner-From: rodrigo.sakai@zanthus.com.br X-Archive-Number: 200604/186 X-Sequence-Number: 21355 This is a multi-part message in MIME format. ------=_NextPart_000_0047_01C663C9.22086670 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >No problem really, all it means is the application has issued a start = of transaction command, it just isn't doing anything at the moment. >Transactions allow any data added during the application's running to = be rolled back should, for example, the application crash - it'll = prevent half-written data remaining >stale in your database. >My guess is when you Exit the application correctly, it'll issue a = COMMIT statement to store the transactional data to your database. Ok Andy, but what if I do an UPDATE operation on the database within = this transaction, it will acquire exclusivelock on that table and will = release only at the commit (or rollback) of this transaction, is that = right?? So, if this transaction only finishes with the exit of the = application the UPDATE operation will cause a lot of locks and = deadlocks, won't they??? Thanks! ------=_NextPart_000_0047_01C663C9.22086670 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

>No = problem really,=20 all it means is the application has issued a start of transaction = command, it=20 just isn=92t doing anything at the moment.


>Transactions=20 allow any data added during the application=92s running to be rolled = back should,=20 for example, the application crash =96 it=92ll prevent half-written data = remaining=20 >stale in your database.

>My guess = is when=20 you Exit the application correctly, it=92ll issue a COMMIT statement to = store the=20 transactional data to your database.

 

  Ok = Andy, but=20 what if I do an UPDATE operation on the database within this = transaction, it=20 will acquire exclusivelock on that table and will release only at the = commit (or=20 rollback) of this transaction, is that right?? So, if this transaction = only=20 finishes with the exit of the application the UPDATE operation will = cause a lot=20 of locks and deadlocks, won't they???

 

 =20 Thanks!

------=_NextPart_000_0047_01C663C9.22086670--