RE: Vacuum only with 20% old tuples
Hiroshi Inoue <inoue@tpf.co.jp>
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "The Hermit Hacker" <scrappy@hub.org>, "Bruce Momjian" <pgman@candle.pha.pa.us>
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "PostgreSQL-development" <pgsql-hackers@postgresql.org>
Date: 2000-07-13T01:34:16Z
Lists: 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