From: Alvaro Herrera <alvherre@dcc.uchile.cl>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tambet Matiisen <t.matiisen@aprote.ee>
Cc: josh@agliodbs.com, Bill Chandler <billybobc1210@yahoo.com>
Cc: pgsql-perform <pgsql-performance@postgresql.org>
Subject: Re: Question on REINDEX
Date: Tue, 19 Apr 2005 14:28:26 -0400
Message-ID: <20050419182826.GA18949@dcc.uchile.cl> (raw)
In-Reply-To: <21097.1113919600@sss.pgh.pa.us>
References: <A66A11DBF5525341AEF6B8DE39CDE77008806E@black.aprote.com>
<21097.1113919600@sss.pgh.pa.us>
On Tue, Apr 19, 2005 at 10:06:40AM -0400, Tom Lane wrote:
> BTW, VACUUM FULL does the data movement back-to-front, and stops as soon
> as it finds a tuple it cannot move down; which is a reasonable strategy
> since the goal is merely to make the file shorter. But it's entirely
> likely that there will be lots of empty space left at the end. For
> instance the final state could have one 4K tuple in the last page and
> up to 4K-1 free bytes in every earlier page.
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? Because if it doesn't work this way, it wouldn't relabel
(change Xmin/Xmax) tuples in early pages. Or does it do something
different?
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?
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Crear es tan difĂcil como ser libre" (Elsa Triolet)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alvherre@dcc.uchile.cl, tgl@sss.pgh.pa.us, t.matiisen@aprote.ee, billybobc1210@yahoo.com
Subject: Re: Question on REINDEX
In-Reply-To: <20050419182826.GA18949@dcc.uchile.cl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox