pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Lumby <johnlumby@hotmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql general <pgsql-general@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR
Date: Tue, 9 Jul 2019 18:27:47 +0000
Message-ID: <BYAPR06MB55596AEDE781F2EC8F7F2137A3F10@BYAPR06MB5559.namprd06.prod.outlook.com> (raw)
In-Reply-To: <BYAPR06MB5559195178EF8C5588854F91A3F10@BYAPR06MB5559.namprd06.prod.outlook.com>
References: <DM6PR06MB5562CE0EB876CD6C30430D36A3E30@DM6PR06MB5562.namprd06.prod.outlook.com>
	<CAH2-WzmX7FiVNuGbAhx4=AWWS1tV-w7F10jt1oMtbxMgjmT6NQ@mail.gmail.com>
	<DM6PR06MB55621884223DF97D296E2E4DA3E20@DM6PR06MB5562.namprd06.prod.outlook.com>
	<CAH2-WzkrwRfdw82Se7SdUBivuVy9-o7zByq=p5=ZKSdz=tVdcw@mail.gmail.com>
	<DM6PR06MB5562839D0229D832E1AE4742A3F60@DM6PR06MB5562.namprd06.prod.outlook.com>
	<CAH2-Wz=+RKhc96UjQ6+SV9NWoBfw2GzKt4D4k8te7BRR8bPLZg@mail.gmail.com>
	<BYAPR06MB555963F83B69BCACBCA703F9A3F10@BYAPR06MB5559.namprd06.prod.outlook.com>
	<CAH2-WzmCKO+umQEAs615FXj5HKm8qqk-tUVPN=vERZa5+JZB9A@mail.gmail.com>
	<BYAPR06MB5559195178EF8C5588854F91A3F10@BYAPR06MB5559.namprd06.prod.outlook.com>

And the point of the REINDEX at that point (below) is to remove dead tuple keys-tids
and  reorganize those split pages back into physical order without losing the freespace.

> From: Peter Geoghegan <pg@bowt.ie>
> Sent: July 9, 2019 1:47 PM
> Subject: Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR
>  
> On Tue, Jul 9, 2019 at 10:31 AM John Lumby <johnlumby@hotmail.com> wrote:
> > Yes,   I see that.     But surely "making splits occur less often" is a desirable
> > objective in itself, is it not?     And I believe that a parameter to preserve the "steady-state"
> > density in high-traffic indexes would help achieve that goal,   wouldn't you agree?
> 
> Anything that reliably reduces page splits without hurting space
> utilization is well worthwhile. I can't see how what you describe
> could have that effect, though. If you expect the leaf density to be
> the same after a REINDEX, then why bother at all? There is no reason
> to think that that will be more effective than simple vacuuming.
> 
Ah,  I did not explain the idea welll enough.
The scenario (simplified) is this:
Time 0      FILLFACTORs all set to default 90%
            because we do not yet know what the steady-state density
            will turn out to be.
       {   workload runs for a few weeks  }
Time N      gather table and index stats,   discover growth and learn density.
            growth is more than autovacuum could control so
       {   ALTER INDEX ??? SET (fillfactor = AUTO); }
       {   REINDEX,   desiring to preserve current density whatever this is }
       {   workload runs for a few more weeks  }
Time 2*N    gather table and index stats,   discover little or no growth since time N.
            we have achieved steady-state in total number of pages.

Would this not work?

Cheers,   John




view thread (21+ messages)  latest in thread

Message-ID: <BYAPR06MB55596AEDE781F2EC8F7F2137A3F10@BYAPR06MB5559.namprd06.prod.outlook.com>
Permalink:  ../BYAPR06MB55596AEDE781F2EC8F7F2137A3F10@BYAPR06MB5559.namprd06.prod.outlook.com/
Also on:    postgresql.org/message-id/BYAPR06MB55596AEDE781F2EC8F7F2137A3F10@BYAPR06MB5559.namprd06.prod.outlook.com

 · 

reply

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: johnlumby@hotmail.com, pg@bowt.ie, tgl@sss.pgh.pa.us
  Subject: Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR
  In-Reply-To: <BYAPR06MB55596AEDE781F2EC8F7F2137A3F10@BYAPR06MB5559.namprd06.prod.outlook.com>
  References: <DM6PR06MB5562CE0EB876CD6C30430D36A3E30@DM6PR06MB5562.namprd06.prod.outlook.com> <CAH2-WzmX7FiVNuGbAhx4=AWWS1tV-w7F10jt1oMtbxMgjmT6NQ@mail.gmail.com> <DM6PR06MB55621884223DF97D296E2E4DA3E20@DM6PR06MB5562.namprd06.prod.outlook.com> <CAH2-WzkrwRfdw82Se7SdUBivuVy9-o7zByq=p5=ZKSdz=tVdcw@mail.gmail.com> <DM6PR06MB5562839D0229D832E1AE4742A3F60@DM6PR06MB5562.namprd06.prod.outlook.com> <CAH2-Wz=+RKhc96UjQ6+SV9NWoBfw2GzKt4D4k8te7BRR8bPLZg@mail.gmail.com> <BYAPR06MB555963F83B69BCACBCA703F9A3F10@BYAPR06MB5559.namprd06.prod.outlook.com> <CAH2-WzmCKO+umQEAs615FXj5HKm8qqk-tUVPN=vERZa5+JZB9A@mail.gmail.com> <BYAPR06MB5559195178EF8C5588854F91A3F10@BYAPR06MB5559.namprd06.prod.outlook.com> <BYAPR06MB55596AEDE781F2EC8F7F2137A3F10@BYAPR06MB5559.namprd06.prod.outlook.com>

* 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