Re: REINDEX ALL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: REINDEX ALL
Date: 2005-04-05 19:25:47
Message-ID: 26690.1112729147@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <postgres(at)cybertec(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-04-05 20:19:54 Call for objections: merge Resdom with TargetEntry
Previous Message Hans-Jürgen Schönig 2005-04-05 18:54:22 Re: REINDEX ALL