Re: Mulit-Vesions and Vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Anthony Berglas <anthony(dot)berglas(at)lucida(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Mulit-Vesions and Vacuum
Date: 2002-07-19 03:14:33
Message-ID: 9531.1027048473@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2002-07-19 03:42:51 The Linux Journal 2002 Readers Awards is now accepting votes
Previous Message Martijn van Oosterhout 2002-07-19 02:42:40 Re: Mulit-Vesions and Vacuum