From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Lumby <johnlumby@hotmail.com>
Cc: pgsql general <pgsql-general@postgresql.org>
Subject: Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR
Date: Tue, 25 Jun 2019 17:56:24 -0400
Message-ID: <29176.1561499784@sss.pgh.pa.us> (raw)
In-Reply-To: <DM6PR06MB5562CE0EB876CD6C30430D36A3E30@DM6PR06MB5562.namprd06.prod.outlook.com>
References: <DM6PR06MB5562CE0EB876CD6C30430D36A3E30@DM6PR06MB5562.namprd06.prod.outlook.com>
John Lumby <johnlumby@hotmail.com> writes:
> Suggestion : it would be useful if REINDEX could , when some new parameter is set , first determine current average leaf page density in the index to be rebuilt, (e.g. the value of pgstatindex().avg_leaf_density from the pgstattuple extension ), and then adopt this density as the temporary override FILLFACTOR while rebuilding index pages, as to to minimize change in density.
Um ... why bother reindexing at all, then?
> This would avoid the saw-tooth effect on number of pages, and also reduce the number of index page-splits which occur during the period immediately following a REINDEX done with default FILLFACTOR of 90%. In effect, it lessens the need for the physical reorganization aspect of REINDEX and focusses more on the function of removing dead keys.
I think you've confused REINDEX with VACUUM. It seems like a pretty poor
substitute for that --- it's much more expensive and has worse locking
requirements.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, johnlumby@hotmail.com
Subject: Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR
In-Reply-To: <29176.1561499784@sss.pgh.pa.us>
References: <DM6PR06MB5562CE0EB876CD6C30430D36A3E30@DM6PR06MB5562.namprd06.prod.outlook.com> <29176.1561499784@sss.pgh.pa.us>
* 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