Re: [Again] Postgres performance problem

From: Decibel! <decibel(at)decibel(dot)org>
To: Erik Jones <erik(at)myemma(dot)com>
Cc: Frank Schoep <frank(at)ffnn(dot)nl>, pgsql-performance(at)postgresql(dot)org
Subject: Re: [Again] Postgres performance problem
Date: 2007-09-17 12:24:14
Message-ID: 20070917122414.GJ16759@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Sep 12, 2007 at 03:01:12PM -0500, Erik Jones wrote:
>
> On Sep 12, 2007, at 2:19 PM, Frank Schoep wrote:
>
> >On Sep 12, 2007, at 9:07 PM, Scott Marlowe wrote:
> >>On 9/12/07, Mikko Partio <mpartio(at)gmail(dot)com> wrote:
> >>>?
> >>>Aren't you mixing up REINDEX and CLUSTER?
> >>
> >>?
> >>Either one does what a vacuum full did / does, but generally does
> >>it better.
> >
> >On topic of REINDEX / VACUUM FULL versus a CLUSTER / VACUUM ANALYZE
> >I'd like to ask if CLUSTER is safe to run on a table that is in
> >active use.
> >
> >After updating my maintenance scripts from a VACUUM FULL (add me to
> >the list) to CLUSTER (which improves performance a lot) I noticed I
> >was getting "could not open relation ?" errors in the log while the
> >scripts ran so I reverted the change. This was on 8.1.9.
>
> You'd probably see the same behavior on 8.2.x. CLUSTER is not
> transactionally safe so you don't want to run CLUSTER on tables that
> are actively being used. I believe that's been fixed for 8.3.

Actually, that's a bit over-conservative... what happens prior to 8.3 is
that CLUSTER rewrites the table using it's XID for everything. That can
break semantics for any transactions that are running in serializable
mode; if you're just using the default isolation level of read
committed, you're fine with CLUSTER.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2007-09-17 12:27:15 Re: Index usage when bitwise operator is used
Previous Message Ruben Rubio 2007-09-17 12:00:59 Re: [Again] Postgres performance problem