pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Decibel! <decibel@decibel.org>
To: Erik Jones <erik@myemma.com>
Cc: Frank Schoep <frank@ffnn.nl>
Cc: pgsql-performance@postgresql.org
Subject: Re: [Again] Postgres performance problem
Date: Mon, 17 Sep 2007 07:24:14 -0500
Message-ID: <20070917122414.GJ16759@decibel.org> (raw)
In-Reply-To: <2752E5D2-6FA0-4416-8FF4-4CE20573F67A@myemma.com>
References: <46E636CB.8080008@rentalia.com>
	<43393.192.121.104.48.1189495883.squirrel@zigo.dhs.org>
	<46E64891.9080005@rentalia.com>
	<20070911225242.GG38801@decibel.org>
	<46E79865.906@rentalia.com>
	<dcc563d10709121128o1e5883a9n96b1f9ed74901be9@mail.gmail.com>
	<2ca799770709121156l7ddbb20agf8086e8bfcbc881a@mail.gmail.com>
	<dcc563d10709121207q66f09c33ldcd181e4a2876904@mail.gmail.com>
	<A9ADD88B-83D8-43FC-A58F-A7D2D38B9311@ffnn.nl>
	<2752E5D2-6FA0-4416-8FF4-4CE20573F67A@myemma.com>

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@gmail.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@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

view thread (36+ messages)  latest in thread

Message-ID: <20070917122414.GJ16759@decibel.org>
Permalink:  ../20070917122414.GJ16759@decibel.org/
Also on:    postgresql.org/message-id/20070917122414.GJ16759@decibel.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: decibel@decibel.org, erik@myemma.com, frank@ffnn.nl
  Subject: Re: [Again] Postgres performance problem
  In-Reply-To: <20070917122414.GJ16759@decibel.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox