Re: REINDEX ALL and CLUSTER ALL - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: REINDEX ALL and CLUSTER ALL
Date
Msg-id 200208271745.g7RHjK114530@candle.pha.pa.us
Whole thread Raw
In response to Re: REINDEX ALL and CLUSTER ALL  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Is REINDEX ALL safe?  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-hackers
I am not sure, but it certainly makes sense that it would drop the index
on failure.  I would never expect it to fail, however.

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

scott.marlowe wrote:
> Sorry, that should have been:
> 
> Isn't it true that reindex's behavior ON A FAILURE is to simply, quietly 
> delete the index?  that was reported  ^^^^^^^^^^^^^
> 
> 
> On Tue, 27 Aug 2002, Bruce Momjian wrote:
> 
> > 
> > REINDEX just rebuilds the index, not just drop it.  In fact, 7.3 will
> > have a reindexdb script.
> > 
> > ---------------------------------------------------------------------------
> > 
> > scott.marlowe wrote:
> > > 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".
> > > 
> > > 
> > 
> > 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: REINDEX ALL and CLUSTER ALL
Next
From: Peter Eisentraut
Date:
Subject: Re: Large file support available