Re: PostgreSQL 8.2.3 VACUUM Timings/Performance

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL 8.2.3 VACUUM Timings/Performance
Date: 2007-03-05 16:25:27
Message-ID: 45EC4477.4020702@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

Aidan Van Dyk wrote:
> * Heikki Linnakangas <heikki(at)enterprisedb(dot)com> [070305 09:46]:
>> In fact, getting rid of vacuum full, or changing it to work like
>> cluster, has been proposed in the past. The use case really is pretty
>> narrow; cluster is a lot faster if there's a lot of unused space in the
>> table, and if there's not, vacuum full isn't going to do much so there's
>> not much point running it in the first place. The reason it exists is
>> largely historical, there hasn't been a pressing reason to remove it either.
>
> I've never used CLUSTER, because I've always heard murmerings of it not
> being completely MVCC safe. From the TODO:
> * CLUSTER
> o Make CLUSTER preserve recently-dead tuples per MVCC
> requirements

Good point, I didn't remember that. Using cluster in an environment like
the OP has, cluster might actually break the consistency of concurrent
transactions.

> But the documents don't mention anything about cluster being unsafe.

Really? <checks docs>. Looks like you're right. Should definitely be
mentioned in the docs.

> AFAIK, Vacuum full doesn't suffer the same MVCC issues that cluster
> does. Is this correct?

That's right. Vacuum full goes to great lengths to be MVCC-safe.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Ellis 2007-03-05 16:25:40 aggregate planning with partitions
Previous Message Dustin Withers 2007-03-05 16:21:10 Bulk insert new and update out of temp table

Browse pgsql-performance by date

  From Date Subject
Next Message Florian G. Pflug 2007-03-05 19:26:58 Re: Aggressive freezing in lazy-vacuum
Previous Message Tom Lane 2007-03-05 16:11:08 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance