Re: PostgreSQL 8.2.3 VACUUM Timings/Performance

From: Aidan Van Dyk
Subject: Re: PostgreSQL 8.2.3 VACUUM Timings/Performance
Date: ,
Msg-id: 20070305151820.GC25573@yugib.highrise.ca
(view: Whole thread, Raw)
In response to: Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  (Heikki Linnakangas)
List: pgsql-performance

Tree view

PostgreSQL 8.2.3 VACUUM Timings/Performance  ("Bruce McAlister", )
 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  (Heikki Linnakangas, )
 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  ("Bruce McAlister", )
  Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  (Heikki Linnakangas, )
   Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  (Aidan Van Dyk, )
   Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  ("Anton Melser", )
 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  (Tom Lane, )
 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  (Heikki Linnakangas, )
 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  ("Bruce McAlister", )
 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance  ("Bruce McAlister", )

* Heikki Linnakangas <> [070305 09:46]:

> >If that is the case, why would anyone use the vacuum full approach if they
> >could use the cluster command on a table/database that will regen these
> >files for you. It almost seems like the vacuum full approach would, or
> >could, be obsoleted by the cluster command, especially if the timings in
> >their respective runs are that different (in our case the vacuum full took
> >15 minutes in our worst case, and the cluster command took under 1 second
> >for the same table and scenario).
>
> 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
But the documents don't mention anything about cluster being unsafe.

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

a.

--
Aidan Van Dyk                                             Create like a god,
                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

Attachment

pgsql-performance by date:

From: ismo.tuononen@solenovo.fi
Date:
Subject: Re: query slows down after vacuum analyze
From: Richard Huxton
Date:
Subject: Re: Insert performance