Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Lumby <johnlumby(at)hotmail(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR
Date: 2019-06-25 21:56:24
Message-ID: 29176.1561499784@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John Lumby <johnlumby(at)hotmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Gauthier 2019-06-25 21:58:16 Need a referential constraint to a non-unique record
Previous Message John Lumby 2019-06-25 21:45:26 REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR