From: Ian Barwick <barwick@gmx.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Adam Haberlach <adam@newsnipple.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: perl dbd libraries keeping transactions open?
Date: Sun, 2 Mar 2003 20:02:39 +0100
Message-ID: <200303022002.40016.barwick@gmx.net> (raw)
In-Reply-To: <18701.1046627743@sss.pgh.pa.us>
References: <20030225104638.A7643@newsnipple.com>
<18701.1046627743@sss.pgh.pa.us>
On Sunday 02 March 2003 18:55, Tom Lane wrote:
> Adam Haberlach <adam@newsnipple.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: barwick@gmx.net, tgl@sss.pgh.pa.us, adam@newsnipple.com
Subject: Re: perl dbd libraries keeping transactions open?
In-Reply-To: <200303022002.40016.barwick@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox