Re: Why not try for a HOT update, even when PageIsFull()?

2021-11-26 Thread Peter Geoghegan
On Sun, Nov 21, 2021 at 4:29 PM Peter Geoghegan  wrote:
> On Fri, Nov 19, 2021 at 11:51 AM Alvaro Herrera  
> wrote:
> > I certainly do not object to removing it.
>
> I'd like to do so soon. I'll wait a few more days, in case Pavan objects.

Pushed just now.

Thanks
-- 
Peter Geoghegan




Re: Why not try for a HOT update, even when PageIsFull()?

2021-11-21 Thread Peter Geoghegan
On Fri, Nov 19, 2021 at 11:51 AM Alvaro Herrera  wrote:
> 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.

I suspected that it was something like that. I agree that it's
unlikely that we'll be able to do another HOT update for as long as
the page has PD_PAGE_FULL set. But that's not saying much; it's also
unlikely that heap_update will find that PD_PAGE_FULL is set to begin
with. And, the chances of successfully applying HOT again are workload
dependent.

> I certainly do not object to removing it.

I'd like to do so soon. I'll wait a few more days, in case Pavan objects.

Thanks
-- 
Peter Geoghegan




Re: Why not try for a HOT update, even when PageIsFull()?

2021-11-19 Thread Alvaro Herrera
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)