Re: Autocommit, isolation level, and vacuum behavior - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Autocommit, isolation level, and vacuum behavior
Date
Msg-id 20080910142024.GB4399@alvh.no-ip.org
Whole thread Raw
In response to Re: Autocommit, isolation level, and vacuum behavior  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout wrote:

> Vacuum can only clean up stuff older than the oldest open transaction.
> So if you have a transaction which is open for hours then stuff made
> since then it can't be vacuumed. The solution is: don't do that.

Actually it's worse than that: older than the oldest transaction that
was active at the time when the current oldest transaction created its
snapshot.

As for autocommit, my guess is that the driver is doing "COMMIT; BEGIN".
This should not cause much of a problem in 8.3 compared to previous
releases, because the transaction gets its Xid at the time the first
command write command is run (previously it was grabbed when the
transaction started).  Also, I thought recent versions of the JDBC
driver did not issue the BEGIN right after COMMIT, so I'm surprised that
there's any visible difference at all.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: "Artis Caune"
Date:
Subject: plpgsql return select from multiple tables
Next
From: "Filip Rembiałkowski"
Date:
Subject: Re: You need to rebuild PostgreSQL using --with-libxml.