On Sat, Sep 27, 2003 at 06:37:22PM -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom, would you summarize what REINDEX currently _doesn't_ do?
>
> As of CVS tip I think the only deficiency is that indexes on the shared
> catalogs (pg_database, pg_shadow, pg_group) have to be reindexed in
> place, rather than being rebuilt with a new relfilenode as is done for
> CLUSTER or TRUNCATE. In-place reindexing isn't crash-safe, since if
> you fail you're left with a half-built (effectively corrupt) index.
>
> I don't see any way to avoid that, though, since we cannot change the
> relfilenode value for a shared index.
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.
(It seems unlikely that one would have > 1GB indexes for shared
relations...)
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La espina, desde que nace, ya pincha" (Proverbio africano)