REINDEX ALL

Lists: pgsql-hackers
From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: REINDEX ALL
Date: 2005-04-05 18:47:50
Message-ID: Pine.LNX.4.61.0504051146420.6793@hosting.commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello,

We are considering submitting a patch for REINDEX ALL. What syntax would
we like?

REINDEX ALL?
REINDEX DATABASE ALL?

Sincerely,

Joshua D. Drake

-- Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564
Custom programming, 24x7 support, managed services, and hosting
Open Source Authors: plPHP, pgManage, Co-Authors: plPerlNG
Reliable replication, Mammoth Replicator - http://www.commandprompt.com/


From: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: REINDEX ALL
Date: 2005-04-05 18:54:22
Message-ID: 4252DEDE.8010600@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Joshua D. Drake wrote:
> Hello,
>
> We are considering submitting a patch for REINDEX ALL. What syntax would
> we like?
>
> REINDEX ALL?
> REINDEX DATABASE ALL?
>
>
> Sincerely,
>
> Joshua D. Drake
>
>
> -- Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564
> Custom programming, 24x7 support, managed services, and hosting
> Open Source Authors: plPHP, pgManage, Co-Authors: plPerlNG
> Reliable replication, Mammoth Replicator - http://www.commandprompt.com/
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

Joshua,

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 ]

test=#

Best regards,

Hans

--
Cybertec Geschwinde u Schoenig
Schoengrabern 134, A-2020 Hollabrunn, Austria
Tel: +43/664/393 39 74
www.cybertec.at, www.postgresql.at


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
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


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

The question is coming from the TODO:

Allow REINDEX to rebuild all database indexes, remove
contrib/reindexdb

We can do whatever the community wants :) Just tell us what it is.

Sincerely,

Joshua D. Drake

>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 ...
>
>


From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: REINDEX ALL
Date: 2005-04-05 22:18:45
Message-ID: 42530EC5.8010300@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Joshua D. Drake wrote:
> The question is coming from the TODO:
>
> Allow REINDEX to rebuild all database indexes, remove
> contrib/reindexdb
>
> We can do whatever the community wants :) Just tell us what it is.

RECREATE option that performs like DROP/CREATE INDEX (best without
changing the indexes OID)

Regards,
Andreas


From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: REINDEX ALL
Date: 2005-04-05 23:27:00
Message-ID: 200504060927.00544.mr-russ@pws.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, 6 Apr 2005 08:18 am, Andreas Pflug wrote:
> Joshua D. Drake wrote:
> > The question is coming from the TODO:
> >
> > Allow REINDEX to rebuild all database indexes, remove
> > contrib/reindexdb
> >
> > We can do whatever the community wants :) Just tell us what it is.
>
Does this pose a problem where everything will run inside one transaction,
effectively blocking some db functions until every table has been reindexed?

Regards

Russell Smith


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: REINDEX ALL
Date: 2005-04-05 23:34:45
Message-ID: 42532095.5040705@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Russell Smith wrote:

>On Wed, 6 Apr 2005 08:18 am, Andreas Pflug wrote:
>
>
>>Joshua D. Drake wrote:
>>
>>
>>>The question is coming from the TODO:
>>>
>>>Allow REINDEX to rebuild all database indexes, remove
>>>contrib/reindexdb
>>>
>>>We can do whatever the community wants :) Just tell us what it is.
>>>
>>>
>Does this pose a problem where everything will run inside one transaction,
>effectively blocking some db functions until every table has been reindexed?
>
>
No... only for the table that is being indexed.

>Regards
>
>Russell Smith
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>