From: | newsreader(at)mediaone(dot)net |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org, mark(at)epilogue(dot)net |
Subject: | Re: Postgres hangs during VACUUM (autocommit = false) |
Date: | 2001-08-22 01:39:01 |
Message-ID: | 20010821213901.A2748@dragon.universe |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Y. Mosienko | 2001-08-22 04:26:55 | Re: Sort by foreign date column |
Previous Message | Robert L Mathews | 2001-08-21 23:28:03 | Re: Postgres hangs during VACUUM (autocommit = false) |