Unix Technical Forum

REINDEX ALL

This is a discussion on REINDEX ALL within the pgsql Hackers forums, part of the PostgreSQL category; --> Hello, We are considering submitting a patch for REINDEX ALL. What syntax would we like? REINDEX ALL? REINDEX DATABASE ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 04:20 AM
Joshua D. Drake
 
Posts: n/a
Default REINDEX ALL

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@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 04:20 AM
=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?=
 
Posts: n/a
Default Re: REINDEX ALL

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


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2008, 04:20 AM
Tom Lane
 
Posts: n/a
Default Re: REINDEX ALL

=?ISO-8859-1?Q?Hans-J=FCrgen_Sch=F6nig?= <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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-11-2008, 04:20 AM
Joshua D. Drake
 
Posts: n/a
Default Re: REINDEX ALL

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



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-11-2008, 04:20 AM
Andreas Pflug
 
Posts: n/a
Default Re: REINDEX ALL

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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-11-2008, 04:20 AM
Russell Smith
 
Posts: n/a
Default Re: REINDEX ALL

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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-11-2008, 04:20 AM
Joshua D. Drake
 
Posts: n/a
Default Re: REINDEX ALL

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



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com