Re: Is vacuum full lock like old's vacuum's lock?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Gregory Wood <gregw(at)com-stock(dot)com>, PostgreSQL-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is vacuum full lock like old's vacuum's lock?
Date: 2002-03-09 00:24:45
Message-ID: 26850.1015633485@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:
> Actually, it seems to me you could get this to play with MVCC by treating
> the move as a UPDATE that does nothing. Copy the tuple from the end to the
> beginning, mark the end one as deleted and the beginning one as new. Voila,
> tuple moved and everything will eventually use the new one and ignore the
> old one.

... except for scans in progress ...

VACUUM FULL is indeed like an UPDATE as far as crash recovery goes:
either the original tuple or the moved one is good, never both. The
problem is to ensure that concurrent scans will see the tuple correctly.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Crash Dummy 2002-03-09 00:29:14 Query planner problem
Previous Message Martijn van Oosterhout 2002-03-08 23:28:06 Re: How to check for successfull inserts