On Mon, 13 Jun 2005, Greg Stark wrote:
> "Marc G. Fournier" <scrappy@postgresql.org> writes:
>
>>>> Why all the choices? What cases are there for doing one without the
>>>> other? If you want to get 'fine tuned', do a 'REINDEX TABLE' ... I can
>>>> see REINDEX SYSTEM and REINDEX DATABASE (includes SYSTEM), but not the
>>>> USER one ..
>>>
>>> The main argument I can think of for REINDEX USER is that it could be
>>> executed by someone who isn't necessarily superuser. Not sure how
>>> important that is, though.
>>
>> Couldn't behaviour of REINDEX DATABASE not take that into account, and 'skip'
>> the system indices if not superuser?
>
> I can see a reasonable argument for them to be separated like this. If I
> wanted to reindex everything in sight in a large database I would want to
> control when each of my user tables was reindexed -- some of them would take
> all night for a single table.
>
> But all the system tables together should never be so large as to be a problem
> doing them in a single batch and I would never be able to enumerate them all
> myself.
>
> So I would probably start with a REINDEX SYSTEM and then go through my tables
> and group them into chunks to run in each maintenance window available.
>
> Of course online index rebuilds would be even better :)
Right, so that would be in favor of REINDEX {SYSTEM,DATABASE}, which I
don't question ... the only one I question is adding a third USER one ...
it can't hurt, but is it required?
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664