Re: Improving REINDEX for system indexes (long) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Improving REINDEX for system indexes (long)
Date
Msg-id 20030928181553.GA5512@dcc.uchile.cl
Whole thread Raw
In response to Re: Improving REINDEX for system indexes (long)  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Sat, Sep 27, 2003 at 08:18:07PM -0400, Bruce Momjian wrote:
> Tom Lane wrote:
> > > What about creating a separate filenode anyway and renaming the files
> > > afterwards?  It would not be an atomic operation anyway, but it would be
> > > better than the current setup IMHO.
> > 
> > I think it would be difficult to persuade the buffer manager and storage
> > manager to work with this; from their point of view you'd be moving a
> > relation underneath them.  I doubt it's really worth the trouble; how
> > often do you need to reindex a shared catalog?
> 
> The point I missed originally is that he is talking about shared
> catalogs, not system catalogs, which work fine in CVS.

Well, my idea was to reduce the window of time during which the index
would be corrupt, i.e. not completely rebuilt.  This is only an issue
with shared indexes, because other system indexes do use the changing
relfilenode thingie already.

However, the main reason for reindexing is a corrupt index, so if for
some reason the new index is also corrupt (e.g. the machine crashes
midway) there's no point in having a separate index filenode anyway.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"The eagle never lost so much time, as
when he submitted to learn of the crow." (William Blake)


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: pg_dump doesn't dump binary compatible casts
Next
From: Stephan Szabo
Date:
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)