From: | Ian Barwick <barwick(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Adam Haberlach <adam(at)newsnipple(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: perl dbd libraries keeping transactions open? |
Date: | 2003-03-02 19:02:39 |
Message-ID: | 200303022002.40016.barwick@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On Sunday 02 March 2003 18:55, Tom Lane wrote:
> Adam Haberlach <adam(at)newsnipple(dot)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(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Rudy Lippan | 2003-03-03 02:10:31 | Re: perl dbd libraries keeping transactions open? |
Previous Message | Tom Lane | 2003-03-02 17:55:43 | Re: perl dbd libraries keeping transactions open? |