X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DCE9C474E5C for ; Sun, 2 Mar 2003 14:03:23 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 55633-10 for ; Sun, 2 Mar 2003 14:03:23 -0500 (EST) Received: from lubitsch.akademie.de (ns.akademie.de [62.165.4.3]) by postgresql.org (Postfix) with ESMTP id CAC57474E42 for ; Sun, 2 Mar 2003 14:03:22 -0500 (EST) Received: from pd9e0e041.dip.t-dialin.net ([217.224.224.65] helo=ianb.local) by lubitsch.akademie.de with asmtp (Exim 3.33 #2) id 18pYk5-0004lD-00; Sun, 02 Mar 2003 20:03:22 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Ian Barwick To: Tom Lane , Adam Haberlach Subject: Re: perl dbd libraries keeping transactions open? Date: Sun, 2 Mar 2003 20:02:39 +0100 X-Mailer: KMail [version 1.4] Cc: pgsql-interfaces@postgresql.org References: <20030225104638.A7643@newsnipple.com> <18701.1046627743@sss.pgh.pa.us> In-Reply-To: <18701.1046627743@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200303022002.40016.barwick@gmx.net> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200303/6 X-Sequence-Number: 3755 On Sunday 02 March 2003 18:55, Tom Lane wrote: > Adam Haberlach writes: > > It seems that the implementation is for the libs to > > do a BEGIN on connect and after every transaction -- is > > this normal. Is there a way to keep it from causing > > problems with vaccuums? > > This is horrible practice for a number of reasons, not only its effect > on VACUUM. Consider what you will get from now(), for example. A new > BEGIN should only be issued when you are ready to issue the first > command of the next transaction. > > If that hasn't been fixed yet in the dbd driver, I would recommend > fixing it there. The default DBD::Pg behaviour is AutoCommit On, and AFAIK has always been that way. The DBD::Pg driver will only begin a transaction if AutoCommit was explicitly set to Off or $dbh->begin_work() was executed by the application. perldoc DBD::Pg contains more info. Ian Barwick barwick@gmx.net