Re: index files still growing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: Doug McNaught <doug(at)wireboard(dot)com>, carex <bk226157(at)skynet(dot)be>, pgsql-general(at)postgresql(dot)org
Subject: Re: index files still growing
Date: 2001-10-24 17:20:25
Message-ID: 21388.1003944025@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)atentus(dot)com> writes:
> But at least in 7.1 REINDEX has to be run under stand-alone Postgres, or
> so say the docs:

The docs are not very well phrased (I've just made a note to fix that).
If you are trying to recover from a corrupted system index then indeed
you have to do all the pushups mentioned, because you don't want the
backend trying to use the broken index along the way:

> REINDEX is used to recover corrupted system indexes. In order to run
> REINDEX command, postmaster must be shut down and stand-alone Postgres
> should be started instead with options -O and -P (an option to ignore
> system indexes).

If you are trying to optimize an index on a user table, you can just do
REINDEX INDEX or REINDEX TABLE without the funny stuff.

> Whereas the DROP INDEX/CREATE INDEX method works on-the-fly. You may end
> up running a seqscan somewhere, but that's not so big a problem, IMHO.

True, that way doesn't lock out concurrent readers of the table while
the index is rebuilt.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex Pilosov 2001-10-24 17:25:11 Re: plperl and table/record access
Previous Message Ben-Nes Michael 2001-10-24 16:31:34 Re: Disable Transaction - plans ?