Re: Contrib reindex script:

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Shaun Thomas <sthomas@townnews.com>
Cc: PostgreSQL general list <pgsql-general@postgresql.org>
Date: 2002-06-13T17:13:29Z
Lists: pgsql-general
Given the real file growth problems we have analyzed over the past
month, I think we need to rethink the tools we give to users.

First, I think we need a section in the admin/maintenance manual talking
about reindex.  (We already have vacuum there, and I think reindex is
something that periodically also should be done.)

Second, reindex on an entire database only works for stand-alone
databases.  Now, I know we can't reindex system tables on a live
database, but should we enable REINDEX all non-system tables  for a
database, similar to how we use vacuum?  Do we need the reindex script
like vacuumdb?

---------------------------------------------------------------------------

Shaun Thomas wrote:
> I modeled this after the vacuumdb script that is distributed in the 
> postgresql-base distribution.  It can reindex a whole database, specific 
> tables, or just a single index.  Being as we've had so much trouble with 
> things growing out of control, and the group seems to have tracked it 
> down to indexes, here it is.
> 
> I don't understand why we have a vacuumdb script, but not a reindex 
> script, considering the fact that vacuum doesn't clean up indexes.
> 
> Anyway, I didn't bother to comment it, I just copied vacuumdb and 
> changed relevant parts.  It's not pretty, but it works.  Maybe later 
> I'll produce one that doesn't look like it was coughed up by a robot.
> 
> -- 
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
> | Shaun M. Thomas                INN Database Administrator           |
> | Phone: (309) 743-0812          Fax  : (309) 743-0830                |
> | Email: sthomas@townnews.com    AIM  : trifthen                      |
> | Web  : www.townnews.com                                             |
> |                                                                     |
> |     "Most of our lives are about proving something, either to       |
> |      ourselves or to someone else."                                 |
> |                                           -- Anonymous              |
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
> 

Content-Description: 

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026