Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D2C39475FF9 for ; Mon, 18 Nov 2002 11:39:08 -0500 (EST) Received: from mail01.svc.cra.dublin.eircom.net (mail01.svc.cra.dublin.eircom.net [159.134.118.17]) by postgresql.org (Postfix) with SMTP id 0A21B475FD4 for ; Mon, 18 Nov 2002 11:39:08 -0500 (EST) Received: (qmail 22614 messnum 124655 invoked from network[159.134.165.241/p497.as1.limerick1.eircom.net]); 18 Nov 2002 16:39:12 -0000 Received: from p497.as1.limerick1.eircom.net (HELO dansat.data-plan.com) (159.134.165.241) by mail01.svc.cra.dublin.eircom.net (qp 22614) with SMTP; 18 Nov 2002 16:39:12 -0000 Received: from dansat.data-plan.com (localhost [127.0.0.1]) by dansat.data-plan.com (8.12.6/8.12.6) with ESMTP id gAIGdCOs002668; Mon, 18 Nov 2002 16:39:12 GMT (envelope-from timbo@dansat.data-plan.com) Received: (from timbo@localhost) by dansat.data-plan.com (8.12.6/8.12.6/Submit) id gAIGd87B002667; Mon, 18 Nov 2002 16:39:08 GMT Date: Mon, 18 Nov 2002 16:39:08 +0000 From: Tim Bunce To: Tom Lane Cc: David Wheeler , dbi-dev@perl.org, pgsql-interfaces@postgresql.org Subject: Re: DBD::PostgreSQL Message-ID: <20021118163908.GD1444@dansat.data-plan.com> References: <0907BA9A-FB11-11D6-93B3-0003931A964A@wheeler.net> <29660.1037636365@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29660.1037636365@sss.pgh.pa.us> User-Agent: Mutt/1.4i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/69 X-Sequence-Number: 3317 On Mon, Nov 18, 2002 at 11:19:25AM -0500, Tom Lane wrote: > David Wheeler writes: > > On Sunday, November 17, 2002, at 10:15 PM, Tom Lane wrote: > >> Both of these seem pretty bogus to me. Ideally the driver should not > >> issue a "begin" until the application issues the first command of the > >> new transaction. Otherwise you get into scenarios where idle > >> connections are holding open transactions, and ain't nobody gonna be > >> happy with that. > > > Okay. I think I'll use a flag in the driver to track when it's in a > > transaction, and do the right thing in the begin and rollback functions. > > I think someone else said that the DBD framework already includes such a > flag ("BegunWork"?) --- if so, you should surely use that one. BegunWork _only_ relates to the begin_work method. It's not used unless that method is used, so it's not appropriate for your use here. Just add a flag to the drivers private structure. Tim.