X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3A3B752DE8; Fri, 19 Aug 2005 22:02:07 -0300 (ADT) 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 44917-04; Sat, 20 Aug 2005 01:02:02 +0000 (GMT) Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by svr1.postgresql.org (Postfix) with ESMTP id 4657652B0C; Fri, 19 Aug 2005 22:01:47 -0300 (ADT) Received: from cookie.varlena.com (64-142-36-103.dsl.static.sonic.net [64.142.36.103]) by b.mail.sonic.net (8.13.3/8.13.3) with ESMTP id j7K11nEl031239; Fri, 19 Aug 2005 18:01:49 -0700 Received: by cookie.varlena.com (Postfix, from userid 1000) id 2ACC3CCE; Fri, 19 Aug 2005 18:01:40 -0700 (PDT) Date: Fri, 19 Aug 2005 18:01:40 -0700 To: pgsql-interfaces@postgresql.org, Junaili Lie , pgsql-general@postgresql.org Cc: elein Subject: Re: in transaction Message-ID: <20050820010140.GC5365@varlena.com> Mail-Followup-To: pgsql-interfaces@postgresql.org, Junaili Lie , pgsql-general@postgresql.org References: <8d04ce990508181616c93fbbc@mail.gmail.com> <20050819000218.GS5365@varlena.com> <20050819185519.GY5365@varlena.com> <20050819230602.GM15622@surnet.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050819230602.GM15622@surnet.cl> User-Agent: Mutt/1.5.6+20040907i From: elein@varlena.com (elein) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.056 required=5 tests=[AWL=0.006, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/1062 X-Sequence-Number: 82470 On Fri, Aug 19, 2005 at 07:06:02PM -0400, Alvaro Herrera wrote: > On Fri, Aug 19, 2005 at 11:55:19AM -0700, elein wrote: > > I'm cross posting to INTERFACES. Please follow up > > on INTERFACES and not on general. Cross posting is evil. > > Well, I'm not on -interfaces, so I'll reply to both :-) I don't worry > too much about crossposting, because a) it's commonplace in PostgreSQL > lists, and b) majordomo can deliver a single copy of the message if you > configure it to do so. > > > > > Some of these I-i-t connections come and go after a while. > > > Some stick around for DAYS. > > > > > > If ANYONE has any brilliant ideas as to the source and > > > dare I say correction to this problem, many people, especially > > > myself would be very very happy. > > While this is a purely client-side problem, which is the client issuing > a BEGIN right after a COMMIT, we talked about coding around it > server-side, back in the time when I was doing nested transactions. > It didn't get done though. I think if you push hard enough, somebody > (myself?) may do it for 8.2. To replicate the situation is psql: BEGIN; select something; In another window I see that I have not only shared access locks but an exclusive access lock. I do not understand why the exclusive lock is there. Am I seeing ghosts? Also, for some relief we found a piece of code that forgot its commit. That helped a lot but I'm not convinced it was the only place this occurred. --elein > > Of course, this is no solution if the client started a transaction, did > some work, and then sat on the connection with the transaction open for > days. But this is not a common case and is certainly much more broken, > if only because other RDBMS behave more reasonably in the COMMIT-BEGIN > scenario. > > -- > Alvaro Herrera () > "La persona que no quería pecar / estaba obligada a sentarse > en duras y empinadas sillas / desprovistas, por cierto > de blandos atenuantes" (Patricio Vogel) > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org >