Re: Improve eviction algorithm in ReorderBuffer - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Improve eviction algorithm in ReorderBuffer
Date
Msg-id 202312151010.y64axdxuzcvi@alvherre.pgsql
Whole thread Raw
In response to Improve eviction algorithm in ReorderBuffer  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Improve eviction algorithm in ReorderBuffer
List pgsql-hackers
On 2023-Dec-12, Masahiko Sawada wrote:

> To deal with this problem, I initially thought of the idea (a)
> mentioned in the comment; use a binary heap to maintain the
> transactions sorted by the amount of changes or the size. But it seems
> not a good idea to try maintaining all transactions by  its size since
> the size of each transaction could be changed frequently.

Hmm, maybe you can just use binaryheap_add_unordered and just let the
sizes change, and do binaryheap_build() at the point where the eviction
is needed.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"No necesitamos banderas
 No reconocemos fronteras"                  (Jorge González)



pgsql-hackers by date:

Previous
From: "Andrey M. Borodin"
Date:
Subject: Re: Transaction timeout
Next
From: Jakub Wartak
Date:
Subject: Re: trying again to get incremental backup