Re: Why not try for a HOT update, even when PageIsFull()? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Why not try for a HOT update, even when PageIsFull()?
Date
Msg-id 202111191950.kjuy2nz66crg@alvherre.pgsql
Whole thread Raw
In response to Why not try for a HOT update, even when PageIsFull()?  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Why not try for a HOT update, even when PageIsFull()?
List pgsql-hackers
On 2021-Nov-17, Peter Geoghegan wrote:

> Commit 2fd8685e7f simplified the checking of modified attributes that
> takes place within heap_update(). This included a micro-optimization
> that affects pages marked PageIsFull(): when the target page is marked
> with PD_PAGE_FULL (which must have been set by a previous heap_update
> call), don't even try to use HOT -- assume that we have no chance in
> order to save a few cycles on determining HOT safety.

Hmm, I don't have any memory of introducing this; and if you look at the
thread, you'll notice that it got there between the first patch I posted
and the second one, without any mention of the reason.  I probably got
that code from the WARM patch series at some point, thinking that it was
an obvious optimization; but I'm fairly certain that we didn't run any
tailored micro-benchmark to justify it.  Pavan may have something to say
about it, so I CC him.

I certainly do not object to removing it.

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/
"Find a bug in a program, and fix it, and the program will work today.
Show the program how to find and fix a bug, and the program
will work forever" (Oliver Silfridge)



pgsql-hackers by date:

Previous
From: Virender Singla
Date:
Subject: Re: TOAST - why separate visibility map
Next
From: Tomas Vondra
Date:
Subject: Re: logical decoding and replication of sequences