Re: Postgres hangs during VACUUM (autocommit = false) - Mailing list pgsql-general

From newsreader@mediaone.net
Subject Re: Postgres hangs during VACUUM (autocommit = false)
Date
Msg-id 20010821213901.A2748@dragon.universe
Whole thread Raw
In response to Re: Postgres hangs during VACUUM (autocommit = false)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tue, Aug 21, 2001 at 07:19:42PM -0400, Tom Lane wrote:
>
> What I suspect is that "autocommit off" causes the DBD driver to send a
> fresh BEGIN immediately after the COMMIT.  You might be better off with
> "autocommit on" which I think suppresses any automatic issuance of
> BEGIN/COMMIT.  Then you'd need to issue "BEGIN" and "COMMIT" explicitly
> to turn your module into a transaction block.
>


$ perldoc DBD::Pg

------------- snip
.
.
       According to the DBI specification the default for AutoCommit is TRUE.  In
       this mode, any change to the database becomes valid immediately. Any
       'begin', 'commit' or 'rollback' statement will be rejected.

       If AutoCommit is switched-off, immediately a transaction will be started by
       issuing a 'begin' statement. Any 'commit' or 'rollback' will start a new
       transaction. A disconnect will issue a 'rollback' statement.

-------------

Suggestion to the original poster: don't use persistent
connections then or else temporarily stop the front
ends.  Vacuuming locks the tables anyhow and
they won't be able to access them during vacuuming

pgsql-general by date:

Previous
From: Robert L Mathews
Date:
Subject: Re: Postgres hangs during VACUUM (autocommit = false)
Next
From: "Andrey Y. Mosienko"
Date:
Subject: Re: Sort by foreign date column