Re: REINDEX ALL and CLUSTER ALL

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: REINDEX ALL and CLUSTER ALL
Date: 2002-08-27 15:51:10
Message-ID: Pine.LNX.4.33.0208270949021.562-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 27 Aug 2002, Bruce Momjian wrote:

> Christopher Kings-Lynne wrote:
> > Would it be worth adding REINDEX ALL and CLUSTER ALL as actual SQL commands?
> > This would be neat. Plus, it means we don't have to worry about having
> > unix-only script in the distro once we have Win32 support.
> >
> > Actually, we should just leave the 'ALL' off. That will make them behave
> > like VACUUM without arguments...
>
> Wow, now that is a nify idea! Let me add it to TODO and we can get rid
> of the shell scripts entirely:
>
> o Allow CLUSTER to cluster all tables, remove clusterdb
> o Allow REINDEX to rebuild all indexes, remove /contrib/reindex
>
> If we ever get the index growth fixed, we will not need the reindex
> change, I guess, but maybe if they have some index corruption but they
> are not sure where it may be helpful.

Isn't it true that reindex's behavior is to simply, quietly delete the
index? that was reported by someone when all this was going around
before. I wrote my own reindex script that basically (in a single
transaction) grabbed the definition of the index, dropped said index, then
recreated it, then committed the transaction, so that if it failed for any
reason, the old index was still there.

If reindex does "lose" the index on failure then we need to look at
changing how it works before we recommend it as a "daily maintenance
routine".

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-27 15:53:49 Re: heap_delete, heap_mark4update must reset t_ctid
Previous Message Bruce Momjian 2002-08-27 15:50:06 Re: heap_delete, heap_mark4update must reset t_ctid