pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Bill Chandler <billybobc1210@yahoo.com>
Cc: pgsql-perform <pgsql-performance@postgresql.org>
Subject: Re: Question on REINDEX
Date: Mon, 18 Apr 2005 12:33:56 -0700
Message-ID: <200504181233.56784.josh@agliodbs.com> (raw)
In-Reply-To: <20050418192142.84419.qmail@web51405.mail.yahoo.com>
References: <20050418192142.84419.qmail@web51405.mail.yahoo.com>

Bill,

> 1) When is it necessary to run REINDEX or drop/create
> an index?  All I could really find in the docs is:

If you need to VACUUM FULL, you need to REINDEX as well.  For example, if you 
drop millions of rows from a table.

> 2) If reindexing is necessary, how can this be done in
> a non-obtrusive way in a production environment.  Our
> database is being updated constantly.  REINDEX locks
> client apps out while in progress.  Same with "CREATE
> INDEX" when we drop/create.  The table can have over
> 10 million row.  Recreating the indexes seems to take
> hours.  This is too long to lock the client apps out.
> Is there any other solution?

Better to up your max_fsm_pages and do regular VACUUMs regularly and 
frequently so that you don't have to REINDEX at all.


-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco



view thread (12+ messages)  latest in thread

Message-ID: <200504181233.56784.josh@agliodbs.com>
Permalink:  ../200504181233.56784.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200504181233.56784.josh@agliodbs.com

 · 

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: josh@agliodbs.com, billybobc1210@yahoo.com
  Subject: Re: Question on REINDEX
  In-Reply-To: <200504181233.56784.josh@agliodbs.com>

* 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