Re: Latest plans for Utilities with HOT

From: "Pavan Deolasee" <pavan(dot)deolasee(at)enterprisedb(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Nikhil S" <nikhil(dot)sontakke(at)enterprisedb(dot)com>
Subject: Re: Latest plans for Utilities with HOT
Date: 2007-03-05 16:09:39
Message-ID: 45EC40C3.10506@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
>
> - VACUUM FULL - The best solution, for now, is to make VACUUM FULL
> perform a reindex on all indexes on the table. Chilling may require us
> to modify considerably more index entries than previously. UPDATE & WAIT
> would be very good, but probably should wait for the next release now,
> since we now have changes to make to 4 utilities.

On my way back home, I was thinking about VACUUM FULL. Is there really
a problem with VACUUM FULL and HOT ? VF moves tuple chains in the
table and does that while holding AccessExclusive lock on the table.

If we prune the HOT-update chains (which we anyways do for lazy vacuum),
we can guarantee that the entire HOT-update chain will be moved, if
any of the tuples in the chain is moved. Also, when VF moves a tuple
chain appropriate index entries are inserted into all the indexes.
If we don't carry the HEAP_HOT_UPDATED or HEAP_ONLY_TUPLE flags
to the moved location, the HOT-update chain will be broken, but
that should not have any correctness problems. If VACUUM FULL
crashes before completeing its operation, the original HOT-update
chain would still remain valid and the new tuples will be discarded.

Is there something I am missing ?

Thanks,
Pavan

EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-03-05 16:28:06 Re: PrivateRefCount (for 8.3)
Previous Message Simon Riggs 2007-03-05 16:03:15 Re: HOT - whats next ?