RE: Vacuum only with 20% old tuples - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: Vacuum only with 20% old tuples
Date
Msg-id 001201bfec6a$754c81e0$2801007e@tpf.co.jp
Whole thread Raw
In response to Re: Vacuum only with 20% old tuples  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: Vacuum only with 20% old tuples  (JanWieck@t-online.de (Jan Wieck))
List pgsql-hackers
> -----Original Message-----
> From: pgsql-hackers-owner@hub.org [mailto:pgsql-hackers-owner@hub.org]On
> Behalf Of The Hermit Hacker
> 
> how about leaving vacuum as is, but extend REINDEX so that it
> drops/rebuilds all indices on a TABLE | DATABASE?  Or does it do that
> now?  From reading \h REINDEX, my thought is that it doesn't, but ...
>

As for user tables,REINDEX could do it already,i.e  REINDEX TABLE table_name FORCE;  is possible under psql.
If REINDEX fails,PostgreSQL just ignores the indexes of the table
(i.e Indexscan is never applied) and REINDEX/VACUUM would
recover the state. Yes,VACUUM already has a hidden functionality
to reindex.

As for system indexes,you must shutdown postmaster and 
invoke standalone postgres with -P option.  REINDEX DATABASE database_name FORCE; would
reindex(shrink) all system tables of the database.
It may be possible even under postmaster if REINDEX
never fails.  

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Unix philosophy
Next
From: The Hermit Hacker
Date:
Subject: Earlier question regarding waiting processes ...