Re: problems with large table - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: problems with large table
Date
Msg-id 20070912170116.GA30010@alvh.no-ip.org
Whole thread Raw
In response to Re: problems with large table  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
Joshua D. Drake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > At this point, I'm at a loss.  I've searched the archives for similar
> > problems, but none of the suggestions have worked.  Is the data in this
> > table corrupted?  Why are both vacuum and reindex failing to complete?
> > Is there some sort of fine-tuning I should pay attention to?  Any help
> > is much appreciated.
>
> At this point, you are in a world of hurt :). If you stop a vacuum you
> have created a huge mess of dead rows in that table. My suggestion is
> this to create a new table that is populated from the old table, rename
> the old table to big_table new, rename new table to old table. Run analyze.

Running CLUSTER is a faster and less error-prone way of doing the same thing.

--
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"No single strategy is always right (Unless the boss says so)"
                                                  (Larry Wall)

pgsql-general by date:

Previous
From: Erik Jones
Date:
Subject: Re: Event-driven programming?
Next
From: "Josh Harrison"
Date:
Subject: Re: update problem in partitioned tables