Re: Extension Enhancement: Buffer Invalidation in pg_buffercache
| От | Maksim Milyutin |
|---|---|
| Тема | Re: Extension Enhancement: Buffer Invalidation in pg_buffercache |
| Дата | |
| Msg-id | 7f4f2ef7-460a-4395-bd58-eca4fca7c4c9@gmail.com обсуждение исходный текст |
| Ответ на | Re: Extension Enhancement: Buffer Invalidation in pg_buffercache (Maksim Milyutin <milyutinma@gmail.com>) |
| Ответы |
Re: Extension Enhancement: Buffer Invalidation in pg_buffercache
|
| Список | pgsql-hackers |
On 14.04.2024 21:16, Maksim Milyutin wrote:
On 07.04.2024 02:07, Thomas Munro wrote:
So this is the version I plan to commit. +bool +EvictUnpinnedBuffer(Buffer buf) +{ ... + /* This will return false if it becomes dirty or someone else pins it. */ + result = InvalidateVictimBuffer(desc); + + UnpinBuffer(desc); + + return result; +}
Hi, Thomas!
Should not we call at the end the StrategyFreeBuffer() function to add target buffer to freelist and not miss it after invalidation?
Hello everyone!
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
-- Best regards, Maksim Milyutin
В списке pgsql-hackers по дате отправления: