Contrib: Reindex script.

From: Shaun Thomas <sthomas(at)townnews(dot)com>
To: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Contrib: Reindex script.
Date: 2002-05-08 21:52:15
Message-ID: Pine.LNX.4.44.0205081644170.16874-200000@hamster.lee.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Ok,

As before, this script is basically a vacuumdb for indexes. I call it
reindexdb on my own system, and put it in the postgres binary directory
simply because it's indispensable in my system.

This should be the last one. Someone complained that assuming that the
script will reside in the same directory as psql was silly. That's
true, though eventually I'd like to see this, or a utility like it,
included in the official postgres distribution.

The script now uses various tricks to figure out where psql is.
Starting with path, continuing with the directory the script is in,
then whereis, and finally locate. These are arranged in order of speed
so it can find psql as fast as possible. Even so, the full iteration
through all methods takes less than a second.

If your system doesn't have whereis or locate, I've directed output from
all of these search commands to /dev/null so these tests will simply
fail if the command is unavailable.

Use, and enjoy.

--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas INN Database Administrator |
| Phone: (309) 743-0812 Fax : (309) 743-0830 |
| Email: sthomas(at)townnews(dot)com AIM : trifthen |
| Web : www.townnews.com |
| |
| "Most of our lives are about proving something, either to |
| ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

Attachment Content-Type Size
reindexdb text/plain 7.2 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message grant 2002-05-08 22:21:14 OLAP idea
Previous Message Fran Fabrizio 2002-05-08 20:59:16 Re: Contrib reindex script:

Browse pgsql-patches by date

  From Date Subject
Next Message Rod Taylor 2002-05-09 02:07:13 pg_depend patch
Previous Message Patrick Welche 2002-05-08 19:39:54 Re: geometry type new code