Re: [Again] Postgres performance problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpnmke2ftuRV.pgp
Description: PGP signature


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux