Re: Teaching users how they can get the most out of HOT in Postgres 14 - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Teaching users how they can get the most out of HOT in Postgres 14
Date
Msg-id YHTdTCeyglHWNT2a@paquier.xyz
Whole thread Raw
In response to Re: Teaching users how they can get the most out of HOT in Postgres 14  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Teaching users how they can get the most out of HOT in Postgres 14  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On Mon, Apr 12, 2021 at 04:35:13PM -0700, Peter Geoghegan wrote:
> On Mon, Apr 12, 2021 at 4:30 PM Andres Freund <andres@anarazel.de> wrote:
> > As far as I can see there's no reasonable way to disable this
> > "optimization", which scares me.
>
> I'm fine with adding a simple 'off' switch. What I'd like to avoid
> doing is making the behavior tunable, since it's likely to change in
> Postgres 15 and Postgres 16 anyway.

While going through this commit a couple of days ago, I really got to
wonder why you are controlling this stuff with a hardcoded value and I
found that scary, while what you should be using are two GUCs with the
reloptions that come with the feature (?):
- A threshold, as an integer, to define a number of pages.
- A scale factor to define a percentage of pages.

Also, I am a bit confused with the choice of BYPASS_THRESHOLD_PAGES as
parameter name.  For all the other parameters of autovacuum, we use
"threshold" for a fixed number of items, not a percentage of a given
item.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays
Next
From: Peter Geoghegan
Date:
Subject: Re: Teaching users how they can get the most out of HOT in Postgres 14