Re: Autocommit, isolation level, and vacuum behavior

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Autocommit, isolation level, and vacuum behavior
Дата
Msg-id 20080910142024.GB4399@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Autocommit, isolation level, and vacuum behavior  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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 по дате отправления:

Предыдущее
От: "Artis Caune"
Дата:
Сообщение: plpgsql return select from multiple tables
Следующее
От: "Filip Rembiałkowski"
Дата:
Сообщение: Re: You need to rebuild PostgreSQL using --with-libxml.