From: | Maksim Milyutin <milyutinma(at)gmail(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Maxim Orlov <orlovmg(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Palak Chaturvedi <chaturvedipalak1911(at)gmail(dot)com>, Jim Nasby <jim(dot)nasby(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com> |
Subject: | Re: Extension Enhancement: Buffer Invalidation in pg_buffercache |
Date: | 2024-04-30 06:59:07 |
Message-ID: | fbdb6b7a-cab4-4002-8266-955d85d70171@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 29.04.2024 23:59, Thomas Munro wrote:
> On Tue, Apr 30, 2024 at 7:17 AM Thomas Munro<thomas(dot)munro(at)gmail(dot)com> wrote:
>> On Tue, Apr 30, 2024 at 6:47 AM Maksim Milyutin<milyutinma(at)gmail(dot)com> wrote:
>>>> Should not we call at the end the StrategyFreeBuffer() function to add target buffer to freelist and not miss it after invalidation?
>>> Please take a look at this issue, current implementation of EvictUnpinnedBuffer() IMO is erroneous - evicted buffers are lost permanently and will not be reused again
> I don't think that's true: it is not lost permanently, it'll be found
> by the regular clock hand. Perhaps it should be put on the freelist
> so it can be found again quickly, but I'm not sure that's a bug, is
> it?
Yeah, you are right. Thanks for clarification.
CLOCK algorithm will reuse it eventually but being of evicted cleared
buffer in freelist might greatly restrict the time of buffer allocation
when all others buffers were in use.
--
Best regards,
Maksim Milyutin
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2024-04-30 07:38:12 | Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation |
Previous Message | Amit Kapila | 2024-04-30 06:34:17 | Re: speed up a logical replica setup |