Re: REINDEX ALL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: REINDEX ALL
Date
Msg-id 26690.1112729147@sss.pgh.pa.us
Whole thread Raw
In response to Re: REINDEX ALL  (Hans-Jürgen Schönig <postgres@cybertec.at>)
Responses Re: REINDEX ALL  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> What is this patch supposed to do?
> As far as I can see, there is already a reindex command ...

> test=# \h reindex
> Command:     REINDEX
> Description: rebuild indexes
> Syntax:
> REINDEX { DATABASE | TABLE | INDEX } name [ FORCE ]

IIRC, "REINDEX DATABASE" only reindexes the system catalogs.  I suppose
Joshua is thinking of reindexing all non-system tables --- whether in
addition to the system catalogs, or just the user tables, isn't clear
... and it makes a difference to what I think the syntax should be ...

Another variant possibly worth considering is REINDEX TABLESPACE to hit
everything within a particular tablespace (defined with respect to the
table's tablespace, or the index's?  I dunno)

Really the question that needs to be answered for any of these is what's
the use-case driving the need for the feature.  Without that you have no
idea what it ought to do.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hans-Jürgen Schönig
Date:
Subject: Re: REINDEX ALL
Next
From: Tom Lane
Date:
Subject: Call for objections: merge Resdom with TargetEntry