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

From Andres Freund
Subject Re: Teaching users how they can get the most out of HOT in Postgres 14
Date
Msg-id 20210412233032.5afvxvwkrvwsnuld@alap3.anarazel.de
Whole thread Raw
In response to 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
Hi,

On 2021-04-12 16:11:59 -0700, Peter Geoghegan wrote:
> Recent work from commit 5100010e taught VACUUM that it doesn't have to
> do index vacuuming in cases where there are practically zero (not
> necessarily exactly zero) tuples to delete from indexes.

FWIW, I'd not at all be surprised if this causes some issues. Consider
cases where all index lookups are via bitmap scans (which does not
support killtuples) - if value ranges are looked up often the repeated
heap fetches can absolutely kill query performance. I've definitely had
to make autovacuum more aggressive for cases like this or schedule
manual vacuums, and now that's silently not good enough anymore. Yes, 2%
of the table isn't all that much, but often enough all the updates and
lookups concentrate in one value range.

As far as I can see there's no reasonable way to disable this
"optimization", which scares me.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays
Next
From: Michael Paquier
Date:
Subject: Re: psql - add SHOW_ALL_RESULTS option