Re: Mulit-Vesions and Vacuum

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Mulit-Vesions and Vacuum
Дата
Msg-id 9531.1027048473@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Mulit-Vesions and Vacuum  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
>> 3. What does Vacuum really do?  Will it interfere with open transactions, or
>> will it know to leave multi version copies for existing transactions?

> Old vacuum used to interfere. There is the new non-blocking vacuum which can
> cleanup a lot of stuff but not everything. VACUUM FULL is required to free
> up disk-space.

VACUUM has never removed any tuples that could be seen by open transactions.

> This bit I'm less sure about. Each tuple does contain a pointer to the
> previous incarnation, but I'm not exactly sure what it's used for.

Actually, the links run from tuple versions to newer tuple versions,
not older ones.  The purpose is to let UPDATE in READ COMMITTED mode
easily find the latest version of a tuple --- you just chain through
the forward links till you get to the end of the chain.  There isn't
any common operation that would want to chain backwards.

> Look in the docs for Time Travel. It used to be supported but was tossed a
> while ago since it could be more efficiently implemented using triggers and
> it had a tendency to use a lot of disk space.

There's been some discussion of re-allowing it as an optional feature...
but I'm not clear on how that would work.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Mulit-Vesions and Vacuum
Следующее
От: Justin Clift
Дата:
Сообщение: The Linux Journal 2002 Readers Awards is now accepting votes