Re: Vacuum (table performance) - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Vacuum (table performance)
Date
Msg-id 20030625232236.GC23586@dcc.uchile.cl
Whole thread Raw
In response to Re: Vacuum (table performance)  ("Claudio Lapidus" <clapidus@hotmail.com>)
List pgsql-general
On Wed, Jun 25, 2003 at 08:16:42PM -0300, Claudio Lapidus wrote:
>
> Tom Lane <tgl@sss.pgh.pa.us> writes:
> >
> >"Claudio Lapidus" <clapidus@hotmail.com> writes:
> >> ... we are seeing increasing execution times, not for the
> >> function but for the vacuum itself.
> >
> >Does a REINDEX of the table fix it?
>
> Hmm, I'm looking at the documentation and it says that REINDEX acquires an
> exclusive lock on the table. Does this mean that during the reindex
> operation the table is unavailable for read/write by other processes?

Yeah.

> An alternative suggested right there is to drop and recreate an index,
> where -it says- CREATE INDEX would get a write lock on the table. Does this
> mean that during the create index operation the whole table is unavailable
> for write by other processes?

An alternative approach would be to create a second index indentical to
the one in place and drop the first one.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Las cosas son buenas o malas segun las hace nuestra opinion" (Lisias)

pgsql-general by date:

Previous
From: "Claudio Lapidus"
Date:
Subject: Re: Vacuum (table performance)
Next
From: Tom Lane
Date:
Subject: Re: Vacuum (table performance)