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

From: Peter Geoghegan <pg(at)bowt(dot)ie>
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 22:12:48
Message-ID: CAH2-WzmX7FiVNuGbAhx4=AWWS1tV-w7F10jt1oMtbxMgjmT6NQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 25, 2019 at 2:45 PM John Lumby <johnlumby(at)hotmail(dot)com> wrote:
> Background : For some workloads involving high volume of INSERT/UPDATE/DELETE, It is sometimes beneficial
> to schedule regular REINDEX of high-activity indexes, so as to improve performance, or restore performance levels back to what it was earlier, by removing dead keys etc. This can result in the average page density of these indexes fluctuating up and down in a saw-tooth fashion, REINDEX causing large increase in density (large drop in total number of pages) and the workload gradually decreasing density back to some "steady-state".

I suspect that you might find that the enhancements to B-Tree indexes
that went into Postgres 12 would help with this workload, especially
if you notice that this happens with indexes that have a lot of
duplicates. For the full background, you might take a look at my pgCon
talk:

https://youtu.be/p5RaATILoiE

Fair warning: this is a very technical talk.

Does it seem at all possible that you were affected by either the
issue with duplicates, or the issue that is addressed by the "split
after new tuple" optimization? They're both causes of index bloat that
VACUUM cannot usually prevent.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2019-06-25 22:18:56 Re: Need a referential constraint to a non-unique record
Previous Message Peter Geoghegan 2019-06-25 22:06:44 Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR