Re: Question on REINDEX

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Tambet Matiisen <t(dot)matiisen(at)aprote(dot)ee>, josh(at)agliodbs(dot)com, Bill Chandler <billybobc1210(at)yahoo(dot)com>, pgsql-perform <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Question on REINDEX
Date: 2005-04-19 18:34:35
Message-ID: 23413.1113935675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> Am I right in thinking that vacuum does at least two passes: one
> front-to-back to find removable tuples, and other back-to-front for
> movement?

VACUUM FULL, yes. VACUUM only does the first one.

> I know maintenance_work_mem is used for storing TIDs of to-be-moved
> tuples for index cleanup ... how does it relate to the above?

TIDs of to-be-deleted tuples, actually. Movable tuples aren't stored,
they're just found on-the-fly during the back-to-front pass.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2005-04-19 19:09:05 Bad n_distinct estimation; hacks suggested?
Previous Message Alvaro Herrera 2005-04-19 18:28:26 Re: Question on REINDEX