Re: Mulit-Vesions and Vacuum - Mailing list pgsql-general

From Tom Lane
Subject Re: Mulit-Vesions and Vacuum
Date
Msg-id 9531.1027048473@sss.pgh.pa.us
Whole thread Raw
In response to Re: Mulit-Vesions and Vacuum  (Martijn van Oosterhout <kleptog@svana.org>)
List 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 by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Mulit-Vesions and Vacuum
Next
From: Justin Clift
Date:
Subject: The Linux Journal 2002 Readers Awards is now accepting votes